Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KnownInstallers ¶
KnownInstallers returns a map of browser-to-Installer that this package knows about for this platform.
Types ¶
type App ¶
type App struct { Name string `json:"name"` Description string `json:"description"` Path string `json:"path"` Type string `json:"type"` }
App contains the metadata that defines a NativeMessaging app.
type AppManifest ¶
type AppManifest interface { // ID returns the app identifier, usually the same as the name. ID() string // BinPath returns the path of the binary for the NativeMessaging app target. BinPath() string }
AppManifest is a serializable App metadata container
type FirefoxApp ¶
FirefoxApp is the App metadata but includes Firefox-specific fields.
type Installer ¶
type Installer interface { Install(u User, app AppManifest) error Uninstall(u User, app AppManifest) error }
Installer handles writing whitelist information for enabling the NativeMessaging app.
type User ¶
type User interface { // IsAdmin returns true if the user is root, usually uid == 0 IsAdmin() bool // PrefixPath is where paths relative to that user should be. Usually $HOME. PrefixPath() string }
User is an interface for an OS user.
type UserPath ¶
UserPath is a straightforward implementation of User.
func CurrentUser ¶
CurrentUser returns a UserPath representing the current user.
Click to show internal directories.
Click to hide internal directories.