config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

Config represents a user's configuration of Fluidkeys

func Load

func Load(fluidkeysDirectory string) (*Config, error)

Load attempts to load `config.toml` from inside the given fluidKeysDirectory. If the file is not present, Load will try to create it and will return an error if it can't. If the file is present but doesn't parse correctly, it will return an error.

func (*Config) GetFilename

func (c *Config) GetFilename() string

GetFilename returns the filename where the given config is stored

func (*Config) RunFromCron

func (c *Config) RunFromCron() bool

RunFromCron returns whether the user's config allows Fluidkeys to be run from cron

func (*Config) SetMaintainAutomatically

func (c *Config) SetMaintainAutomatically(fingerprint fpr.Fingerprint, value bool) error

SetMaintainAutomatically sets whether the given key should be maintained in the background.

func (*Config) SetPublishToAPI

func (c *Config) SetPublishToAPI(fingerprint fpr.Fingerprint, value bool) error

SetPublishToAPI sets whether the given key should be uploaded to the Fluidkeys directory to allow others to search for it by email address.

func (*Config) SetStorePassword

func (c *Config) SetStorePassword(fingerprint fpr.Fingerprint, value bool) error

SetStorePassword sets whether the password for the given key should be stored in the user's login keyring

func (*Config) ShouldMaintainAutomatically

func (c *Config) ShouldMaintainAutomatically(fingerprint fpr.Fingerprint) bool

ShouldMaintainAutomatically returns whether the given key should be maintained in the background. The default is false.

func (*Config) ShouldPublishToAPI

func (c *Config) ShouldPublishToAPI(fingerprint fpr.Fingerprint) bool

ShouldPublishToAPI returns whether the given key should be uploaded to the Fluidkeys directory to allow others to search for it by email address. The default is false.

func (*Config) ShouldStorePassword

func (c *Config) ShouldStorePassword(fingerprint fpr.Fingerprint) bool

ShouldStorePassword returns whether the given key's password should be stored in the system keyring when successfully entered (avoiding future password prompts). The default is false.

Jump to

Keyboard shortcuts

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