Documentation
¶
Index ¶
- Variables
- func DownloadUpdates() (err error)
- func GetIdentifierAndVersion(versionedPath string) (identifier, version string, ok bool)
- func GetVersionedPath(identifier, version string) (versionedPath string)
- func LoadIndexes() error
- func LoadLatest() error
- func ScanForLatest(baseDir string, hardFail bool) (latest map[string]string, lastError error)
- func SetDatabaseRoot(path string)
- func UpdateIndexes() (err error)
- type File
Constants ¶
This section is empty.
Variables ¶
var ( ErrNotFound = errors.New("the requested file could not be found") ErrNotAvailableLocally = errors.New("the requested file is not available locally") )
Errors
Functions ¶
func DownloadUpdates ¶ added in v0.3.1
func DownloadUpdates() (err error)
DownloadUpdates checks if updates are available and downloads updates of used components.
func GetIdentifierAndVersion ¶ added in v0.2.3
GetIdentifierAndVersion splits the given file path into its identifier and version.
func GetVersionedPath ¶ added in v0.2.3
GetVersionedPath combines the identifier and version and returns it as a file path.
func LoadIndexes ¶ added in v0.2.3
func LoadIndexes() error
LoadIndexes loads the current update indexes from disk.
func LoadLatest ¶ added in v0.2.3
func LoadLatest() error
LoadLatest (re)loads the latest available updates from disk.
func ScanForLatest ¶
ScanForLatest scan the local update directory and returns a map of the latest/newest component versions.
func SetDatabaseRoot ¶ added in v0.2.3
func SetDatabaseRoot(path string)
SetDatabaseRoot tells the updates module where the database is - and where to put its stuff.
func UpdateIndexes ¶ added in v0.3.1
func UpdateIndexes() (err error)
UpdateIndexes downloads the current update indexes.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File represents a file from the update system.
func GetLocalFile ¶ added in v0.2.5
GetLocalFile returns the latest generic file identified by the given identifier, that is available locally.
func GetLocalPlatformFile ¶ added in v0.2.5
GetLocalPlatformFile returns the latest platform specific file identified by the given identifier, that is available locally.
func GetPlatformFile ¶
GetPlatformFile returns the latest platform specific file identified by the given identifier.
func (*File) Blacklist ¶
func (f *File) Blacklist()
Blacklist notifies the update system that this file is somehow broken, and should be ignored from now on.
func (*File) ReportError ¶
func (f *File) ReportError()
ReportError reports an error back to Safing. This will not automatically blacklist the file.