updates

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2019 License: AGPL-3.0 Imports: 26 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func GetIdentifierAndVersion(versionedPath string) (identifier, version string, ok bool)

GetIdentifierAndVersion splits the given file path into its identifier and version.

func GetVersionedPath added in v0.2.3

func GetVersionedPath(identifier, version string) (versionedPath string)

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

func ScanForLatest(baseDir string, hardFail bool) (latest map[string]string, lastError error)

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 GetFile

func GetFile(identifier string) (*File, error)

GetFile returns the latest generic file identified by the given identifier.

func GetLocalFile added in v0.2.5

func GetLocalFile(identifier string) (*File, error)

GetLocalFile returns the latest generic file identified by the given identifier, that is available locally.

func GetLocalPlatformFile added in v0.2.5

func GetLocalPlatformFile(identifier string) (*File, error)

GetLocalPlatformFile returns the latest platform specific file identified by the given identifier, that is available locally.

func GetPlatformFile

func GetPlatformFile(identifier string) (*File, error)

GetPlatformFile returns the latest platform specific file identified by the given identifier.

func NewFile added in v0.2.3

func NewFile(filepath string, version string, stable bool) *File

NewFile combines update file attributes into an easy to use object.

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) Open

func (f *File) Open()

Open opens the file and returns the

func (*File) Path

func (f *File) Path() string

Path returns the filepath of the file.

func (*File) ReportError

func (f *File) ReportError()

ReportError reports an error back to Safing. This will not automatically blacklist the file.

func (*File) Stable

func (f *File) Stable() bool

Stable returns whether the file is from a stable release.

func (*File) Version

func (f *File) Version() string

Version returns the version of the file.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL