Documentation ¶
Index ¶
- Variables
- func AppBundleForPath() (string, error)
- func AutoInstall(context Context, binPath string, force bool, timeout time.Duration, log Log) (newProc bool, err error)
- func AutoInstallWithStatus(context Context, binPath string, force bool, timeout time.Duration, log Log) keybase1.InstallResult
- func BinPath() (string, error)
- func CheckIfValidLocation() *keybase1.Error
- func DefaultKBFSLabel(runMode libkb.RunMode) string
- func DefaultLaunchdEnvVars(label string) []launchd.EnvVar
- func DefaultServiceLabel(runMode libkb.RunMode) string
- func DefaultUpdaterLabel(runMode libkb.RunMode) string
- func Install(context Context, binPath string, sourcePath string, components []string, ...) keybase1.InstallResult
- func InstallAuto(context Context, binPath string, sourcePath string, timeout time.Duration, ...) keybase1.InstallResult
- func InstallKBFS(context Context, binPath string, force bool, skipMountIfNotAvailable bool, ...) error
- func InstallKBNM(context Context, binPath string, log Log) error
- func InstallLogPath() (string, error)
- func InstallService(context Context, binPath string, force bool, timeout time.Duration, log Log) error
- func InstallUpdater(context Context, keybaseBinPath string, force bool, timeout time.Duration, ...) error
- func IsInUse(mountDir string, log Log) bool
- func KBFSBinPath(runMode libkb.RunMode, binPath string) (string, error)
- func KBFSBundleVersion(context Context, binPath string) (string, error)
- func KBFSServiceStatus(context Context, label string, wait time.Duration, log Log) (status keybase1.ServiceStatus)
- func KeybaseFuseStatus(bundleVersion string, log Log) keybase1.FuseStatus
- func KeybaseFuseStatusForAppBundle(appPath string, log Log) (keybase1.FuseStatus, error)
- func KeybaseServiceStatus(context Context, label string, wait time.Duration, log Log) (status keybase1.ServiceStatus)
- func ListServices(context Context, wait time.Duration, log Log) (*keybase1.ServicesStatus, error)
- func OSVersion() (semver.Version, error)
- func ResolveInstallStatus(version string, bundleVersion string, lastExitStatus string, log Log) (installStatus keybase1.InstallStatus, installAction keybase1.InstallAction, ...)
- func RunApp(context Context, log Log) error
- func ServiceStatus(context Context, label ServiceLabel, wait time.Duration, log Log) (*keybase1.ServiceStatus, error)
- func SystemLogPath() string
- func TerminateApp(context Context, log Log) error
- func Uninstall(context Context, components []string, log Log) keybase1.UninstallResult
- func UninstallKBFS(runMode libkb.RunMode, mountDir string, forceUnmount bool, log Log) error
- func UninstallKBFSOnStop(context Context, log Log) error
- func UninstallKBFSServices(runMode libkb.RunMode, log Log) error
- func UninstallKBNM(log Log) error
- func UninstallKeybaseServices(runMode libkb.RunMode, log Log) error
- func UninstallUpdaterService(runMode libkb.RunMode, log Log) error
- func UpdaterBinPath() (string, error)
- func UpdaterServiceStatus(context Context, label string) keybase1.ServiceStatus
- type ComponentName
- type Context
- type Log
- type ServiceLabel
Constants ¶
This section is empty.
Variables ¶
var ComponentNames = []ComponentName{ComponentNameCLI, ComponentNameService, ComponentNameKBFS, ComponentNameUpdater, ComponentNameFuse, ComponentNameHelper, ComponentNameApp, ComponentNameKBNM, ComponentNameCLIPaths}
ComponentNames are all the valid component names
Functions ¶
func AppBundleForPath ¶ added in v1.0.17
AppBundleForPath returns path to app bundle
func AutoInstall ¶
func AutoInstall(context Context, binPath string, force bool, timeout time.Duration, log Log) (newProc bool, err error)
AutoInstall runs the auto install
func AutoInstallWithStatus ¶
func AutoInstallWithStatus(context Context, binPath string, force bool, timeout time.Duration, log Log) keybase1.InstallResult
AutoInstallWithStatus runs the auto install and returns a result
func CheckIfValidLocation ¶
CheckIfValidLocation checks if the current environment is running from a valid location. For example, this will return an error if this isn't running from /Applications/Keybase.app on MacOS.
func DefaultKBFSLabel ¶
DefaultKBFSLabel returns the default label for KBFS service in launchd
func DefaultLaunchdEnvVars ¶
DefaultLaunchdEnvVars returns default environment vars for launchd
func DefaultServiceLabel ¶
DefaultServiceLabel returns the default label for Keybase service in launchd
func DefaultUpdaterLabel ¶ added in v1.0.17
DefaultUpdaterLabel returns the default label for the update service in launchd
func Install ¶
func Install(context Context, binPath string, sourcePath string, components []string, force bool, timeout time.Duration, log Log) keybase1.InstallResult
Install installs specified components
func InstallAuto ¶ added in v1.0.29
func InstallAuto(context Context, binPath string, sourcePath string, timeout time.Duration, log Log) keybase1.InstallResult
InstallAuto installs everything it can without asking for privileges or extensions. If the user has already installed Fuse, we install everything.
func InstallKBFS ¶ added in v1.0.18
func InstallKBFS(context Context, binPath string, force bool, skipMountIfNotAvailable bool, timeout time.Duration, log Log) error
InstallKBFS installs the KBFS launchd service
func InstallKBNM ¶ added in v1.0.21
InstallKBNM installs the Keybase NativeMessaging whitelist
func InstallLogPath ¶ added in v1.0.18
InstallLogPath doesn't exist on darwin as an independent log file (see desktop app log)
func InstallService ¶ added in v1.0.18
func InstallService(context Context, binPath string, force bool, timeout time.Duration, log Log) error
InstallService installs the launchd service
func InstallUpdater ¶ added in v1.0.18
func InstallUpdater(context Context, keybaseBinPath string, force bool, timeout time.Duration, log Log) error
InstallUpdater installs the updater launchd service
func IsInUse ¶ added in v1.0.16
IsInUse returns true if the mount is in use. This may be used by the updater to determine if it's safe to apply an update and restart.
func KBFSBinPath ¶ added in v1.0.17
KBFSBinPath returns the path to the KBFS executable. If binPath (directory) is specifed, it will override the default (which is in the same directory where the keybase executable is).
func KBFSBundleVersion ¶
KBFSBundleVersion returns the bundle (not installed) version for KBFS
func KBFSServiceStatus ¶
func KBFSServiceStatus(context Context, label string, wait time.Duration, log Log) (status keybase1.ServiceStatus)
KBFSServiceStatus returns service status for KBFS
func KeybaseFuseStatus ¶
func KeybaseFuseStatus(bundleVersion string, log Log) keybase1.FuseStatus
KeybaseFuseStatus returns Fuse status
func KeybaseFuseStatusForAppBundle ¶
func KeybaseFuseStatusForAppBundle(appPath string, log Log) (keybase1.FuseStatus, error)
KeybaseFuseStatusForAppBundle returns Fuse status for application at appPath
func KeybaseServiceStatus ¶
func KeybaseServiceStatus(context Context, label string, wait time.Duration, log Log) (status keybase1.ServiceStatus)
KeybaseServiceStatus returns service status for Keybase service
func ListServices ¶
ListServices returns status for all services
func ResolveInstallStatus ¶
func ResolveInstallStatus(version string, bundleVersion string, lastExitStatus string, log Log) (installStatus keybase1.InstallStatus, installAction keybase1.InstallAction, status keybase1.Status)
ResolveInstallStatus will determine necessary install actions for the current environment
func ServiceStatus ¶
func ServiceStatus(context Context, label ServiceLabel, wait time.Duration, log Log) (*keybase1.ServiceStatus, error)
ServiceStatus returns status for a service named by label
func SystemLogPath ¶ added in v1.0.18
func SystemLogPath() string
SystemLogPath is where privileged keybase processes log to on darwin
func TerminateApp ¶ added in v1.0.17
TerminateApp will stop the Keybase (UI) app
func Uninstall ¶
func Uninstall(context Context, components []string, log Log) keybase1.UninstallResult
Uninstall uninstalls all keybase services
func UninstallKBFS ¶ added in v1.0.16
UninstallKBFS uninstalls all KBFS services, unmounts and optionally removes the mount directory
func UninstallKBFSOnStop ¶ added in v1.0.18
UninstallKBFSOnStop removes KBFS services and unmounts and removes /keybase from the system
func UninstallKBFSServices ¶ added in v1.0.18
UninstallKBFSServices removes KBFS service (including homebrew)
func UninstallKBNM ¶ added in v1.0.21
UninstallKBNM removes the Keybase NativeMessaging whitelist
func UninstallKeybaseServices ¶ added in v1.0.18
UninstallKeybaseServices removes the keybase service (includes homebrew)
func UninstallUpdaterService ¶ added in v1.0.18
UninstallUpdaterService removes updater launchd service
func UpdaterBinPath ¶ added in v1.0.17
UpdaterBinPath returns the path to the updater executable, by default is in the same directory as the keybase executable.
func UpdaterServiceStatus ¶ added in v1.0.17
func UpdaterServiceStatus(context Context, label string) keybase1.ServiceStatus
UpdaterServiceStatus returns service status for the Updater service
Types ¶
type ComponentName ¶
type ComponentName string
ComponentName defines a component name
const ( // ComponentNameCLI is the command line component ComponentNameCLI ComponentName = "cli" // ComponentNameService is the service component ComponentNameService ComponentName = "service" // ComponentNameKBFS is the KBFS component ComponentNameKBFS ComponentName = "kbfs" // ComponentNameKBNM is the Keybase NativeMessaging client component ComponentNameKBNM ComponentName = "kbnm" // ComponentNameUpdater is the updater component ComponentNameUpdater ComponentName = "updater" // ComponentNameApp is the UI app ComponentNameApp ComponentName = "app" // ComponentNameFuse is the Fuse component ComponentNameFuse ComponentName = "fuse" // ComponentNameHelper is the privileged helper tool ComponentNameHelper ComponentName = "helper" // ComponentNameMountDir is the mount directory ComponentNameMountDir ComponentName = "mountdir" // ComponentNameCLIPaths is for /etc/paths.d/Keybase ComponentNameCLIPaths ComponentName = "clipaths" // ComponentNameUnknown is placeholder for unknown components ComponentNameUnknown ComponentName = "unknown" )
func ComponentNameFromString ¶
func ComponentNameFromString(s string) ComponentName
ComponentNameFromString returns ComponentName from a string
func (ComponentName) Description ¶ added in v1.0.17
func (c ComponentName) Description() string
Description returns description for component name
func (ComponentName) String ¶
func (c ComponentName) String() string
String returns string for ComponentName
type Context ¶
type Context interface { GetConfigDir() string GetCacheDir() string GetRuntimeDir() string GetMountDir() (string, error) GetLogDir() string GetRunMode() libkb.RunMode GetServiceInfoPath() string GetKBFSInfoPath() string }
Context is the enviroment for this package
type Log ¶ added in v1.0.17
type Log interface { Debug(s string, args ...interface{}) Info(s string, args ...interface{}) Warning(s string, args ...interface{}) Errorf(s string, args ...interface{}) }
Log is the logging interface for this package
type ServiceLabel ¶
type ServiceLabel string
ServiceLabel is an identifier string for a service
const ( // AppServiceLabel is the service label for the keybase launchd service in Keybase.app AppServiceLabel ServiceLabel = "keybase.service" // AppKBFSLabel is the service label for the kbfs launchd service in Keybase.app AppKBFSLabel ServiceLabel = "keybase.kbfs" // AppUpdaterLabel is the service label for the updater launchd service in Keybase.app AppUpdaterLabel ServiceLabel = "keybase.updater" // BrewServiceLabel is the service label for the updater launchd service in homebrew BrewServiceLabel ServiceLabel = "homebrew.mxcl.keybase" // BrewKBFSLabel is the service label for the kbfs launchd service in homebrew BrewKBFSLabel ServiceLabel = "homebrew.mxcl.kbfs" // UnknownLabel is an empty/unknown label UnknownLabel ServiceLabel = "" )
func NewServiceLabel ¶
func NewServiceLabel(s string) (ServiceLabel, error)
NewServiceLabel constructs a service label
func (ServiceLabel) ComponentName ¶
func (l ServiceLabel) ComponentName() ComponentName
ComponentName returns the component name for a service label
func (ServiceLabel) String ¶ added in v1.0.17
func (l ServiceLabel) String() string