forked from Silverfish/proton-bridge
Other(refactor): Implement locations in Bridge
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
package bridge
|
||||
|
||||
func (bridge *Bridge) ProvideLogsPath() (string, error) {
|
||||
panic("TODO")
|
||||
return bridge.locations.ProvideLogsPath()
|
||||
}
|
||||
|
||||
func (bridge *Bridge) GetLicenseFilePath() string {
|
||||
panic("TODO")
|
||||
return bridge.locations.GetLicenseFilePath()
|
||||
}
|
||||
|
||||
func (bridge *Bridge) GetDependencyLicensesLink() string {
|
||||
panic("TODO")
|
||||
return bridge.locations.GetDependencyLicensesLink()
|
||||
}
|
||||
|
||||
@ -24,9 +24,13 @@ import (
|
||||
)
|
||||
|
||||
type Locator interface {
|
||||
ProvideLogsPath() (string, error)
|
||||
|
||||
GetLicenseFilePath() string
|
||||
GetDependencyLicensesLink() string
|
||||
|
||||
Clear() error
|
||||
ClearUpdates() error
|
||||
ProvideLogsPath() (string, error)
|
||||
}
|
||||
|
||||
type CacheProvider interface {
|
||||
|
||||
@ -45,6 +45,14 @@ func (l *fakeLocations) ProvideSettingsPath() (string, error) {
|
||||
return l.dir, nil
|
||||
}
|
||||
|
||||
func (l *fakeLocations) GetDependencyLicensesLink() string {
|
||||
return "/path/to/dependencies"
|
||||
}
|
||||
|
||||
func (l *fakeLocations) GetLicenseFilePath() string {
|
||||
return "/path/to/license"
|
||||
}
|
||||
|
||||
func (l *fakeLocations) Clear() error {
|
||||
return os.RemoveAll(l.dir)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user