keybase

package
v0.0.0-...-66acf6f Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: BSD-3-Clause, MIT Imports: 21 Imported by: 0

README

Keybase

Keybase specific behavior for updates.

Environment

To change delay (how often check occurs, 1m = 1 minute, 1h = 1 hour):

launchctl setenv KEYBASE_UPDATER_DELAY 1m

To make the updater always apply an update after a check (even if same version):

launchctl setenv KEYBASE_UPDATER_FORCE true

Then restart the updater:

keybase launchd restart keybase.updater

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheDir

func CacheDir(appName string) (string, error)

CacheDir returns where to store temporary files

func Dir

func Dir(appName string) (string, error)

Dir returns where to store config and log files

func LogDir

func LogDir(appName string) (string, error)

LogDir is where to log

func NewUpdaterContext

func NewUpdaterContext(appName string, pathToKeybase string, log Log, mode UpdaterMode) (updater.Context, *updater.Updater)

NewUpdaterContext returns an updater context for Keybase

Types

type Config

type Config interface {
	updater.Config
	// contains filtered or unexported methods
}

Config is Keybase specific configuration for the updater

type Log

type Log interface {
	Debug(...interface{})
	Info(...interface{})
	Debugf(s string, args ...interface{})
	Infof(s string, args ...interface{})
	Warningf(s string, args ...interface{})
	Errorf(s string, args ...interface{})
}

Log is the logging interface for the keybase package

type UpdateSource

type UpdateSource struct {
	// contains filtered or unexported fields
}

UpdateSource finds releases/updates on keybase.io

func NewUpdateSource

func NewUpdateSource(cfg *config, log Log) UpdateSource

NewUpdateSource contructs an update source for keybase.io

func (UpdateSource) Description

func (k UpdateSource) Description() string

Description returns description for update source

func (UpdateSource) FindUpdate

func (k UpdateSource) FindUpdate(options updater.UpdateOptions) (*updater.Update, error)

FindUpdate returns update for updater and options

type UpdaterMode

type UpdaterMode int

UpdaterMode describes how updater should behave.

const (
	Service      UpdaterMode // used in service mode; never ignores snooze
	Check                    // ignores snooze
	CheckPassive             // does not ignore snooze
)

func (UpdaterMode) IgnoreSnooze

func (m UpdaterMode) IgnoreSnooze() bool

IgnoreSnooze returns true if we should ignore snooze.

func (UpdaterMode) IsCheck

func (m UpdaterMode) IsCheck() bool

IsCheck returns true if we are not running in service mode.

Jump to

Keyboard shortcuts

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