updates

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2019 License: AGPL-3.0 Imports: 25 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")
)

Functions

func CheckDir added in v0.2.3

func CheckDir(dirPath string) error

func CheckForUpdates added in v0.2.3

func CheckForUpdates() error

func GetIdentifierAndVersion added in v0.2.3

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

func GetVersionedPath added in v0.2.3

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

func LoadIndexes added in v0.2.3

func LoadIndexes() error

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)

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.

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

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