config

package
v1.2.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PwStoreDir

func PwStoreDir(mount string) string

PwStoreDir reads the password store dir from the environment or returns the default location ~/.password-store if the env is not set

Types

type Config

type Config struct {
	AlwaysTrust bool                 `json:"alwaystrust"` // always trust public keys when encrypting
	AskForMore  bool                 `json:"askformore"`  // ask for more data on generate
	AutoImport  bool                 `json:"autoimport"`  // import missing public keys w/o asking
	AutoPull    bool                 `json:"autopull"`    // pull from git before push
	AutoPush    bool                 `json:"autopush"`    // push to git remote after commit
	ClipTimeout int                  `json:"cliptimeout"` // clear clipboard after seconds
	Debug       bool                 `json:"debug"`       // enable debug output
	FsckFunc    store.FsckCallback   `json:"-"`
	ImportFunc  store.ImportCallback `json:"-"`
	LoadKeys    bool                 `json:"loadkeys"` // load missing keys from store
	Mounts      map[string]string    `json:"mounts,omitempty"`
	NoColor     bool                 `json:"nocolor"`     // disable colors in output
	NoConfirm   bool                 `json:"noconfirm"`   // do not confirm recipients when encrypting
	Path        string               `json:"path"`        // path to the root store
	PersistKeys bool                 `json:"persistkeys"` // store recipient keys in store
	SafeContent bool                 `json:"safecontent"` // avoid showing passwords in terminal
	Version     string               `json:"version"`
}

Config is the gopass config structure

func Load

func Load() *Config

Load will try to load the config from one of the default locations

func New

func New() *Config

New creates a new config with sane default values

func (*Config) ConfigMap

func (c *Config) ConfigMap() map[string]string

ConfigMap returns a map of stringified config values for easy printing

func (*Config) Save

func (c *Config) Save() error

Save saves the config

func (*Config) SetConfigValue

func (c *Config) SetConfigValue(key, value string) error

SetConfigValue will try to set the given key to the value in the config struct

Jump to

Keyboard shortcuts

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