Versions in this module Expand all Collapse all v0 v0.2.0 Mar 27, 2023 v0.1.0 Jun 22, 2022 Changes in this version + var ErrNotSupported = errors.New("operating system not supported") + var LogDebug func(string, ...interface{}) + var LogError func(string, ...interface{}) + var LogInfo func(string, ...interface{}) + func Apply(update io.Reader, opts Options) error + func ManualUpdate(s Source, publicKey ed25519.PublicKey) error + func RollbackError(err error) error + type Config struct + Current *Version + ExitCallback func(error) + ProgressCallback func(float64, error) + PublicKey ed25519.PublicKey + RestartConfirmCallback func() bool + Schedule Schedule + Source Source + UpgradeConfirmCallback func(string) bool + type HTTPSource struct + func (h *HTTPSource) Get(v *Version) (io.ReadCloser, int64, error) + func (h *HTTPSource) GetSignature() ([64]byte, error) + func (h *HTTPSource) LatestVersion() (*Version, error) + type Options struct + Checksum []byte + Hash crypto.Hash + OldSavePath string + Patcher Patcher + PublicKey crypto.PublicKey + Signature []byte + TargetMode os.FileMode + TargetPath string + Verifier Verifier + func (o *Options) CheckPermissions() error + func (o *Options) SetPublicKeyPEM(pembytes []byte) error + type Patcher interface + Patch func(old io.Reader, new io.Writer, patch io.Reader) error + func NewBSDiffPatcher() Patcher + type Repeating int + const Daily + const Hourly + const Monthly + const None + type Schedule struct + At ScheduleAt + FetchOnStart bool + Interval time.Duration + type ScheduleAt struct + type Source interface + Get func(*Version) (io.ReadCloser, int64, error) + GetSignature func() ([64]byte, error) + LatestVersion func() (*Version, error) + func NewHTTPSource(client *http.Client, base string) Source + type Updater struct + func Manage(conf *Config) (*Updater, error) + func (u *Updater) CheckNow() error + func (u *Updater) Restart() error + type Verifier interface + VerifySignature func(checksum, signature []byte, h crypto.Hash, publicKey crypto.PublicKey) error + func NewECDSAVerifier() Verifier + func NewRSAVerifier() Verifier + type Version struct + Build int + Date time.Time + Number string