config

package
v0.0.0-...-35d8e6d Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = &Config{
	PrivateKeys:    ExpandWithHome("~/.mypass/private_keys"),
	CachedPassword: ExpandWithHome("~/.mypass/cached_pass"),
	DatabasePath:   ExpandWithHome("~/.mypass/db.sqlite"),
	Backend:        "sqlite3",
}

Functions

func ExpandWithHome

func ExpandWithHome(p string) string

func LoadCachedPassword

func LoadCachedPassword() error

func LoadDatabase

func LoadDatabase() (*models.Database, error)

func LoadPrivateKeys

func LoadPrivateKeys() error

Types

type Config

type Config struct {
	// Stored private keys
	PrivateKeys string `yaml:"private_keys"`
	// Cached password path
	CachedPassword  string `yaml:"cached_password"`
	DatabasePath    string `yaml:"database"`
	EncryptionLevel int    `yaml:"encryption_level"`
	Backend         string `yaml:"backend"`
}

Config location ~/.config/mypass/config.yaml

func (*Config) ToYaml

func (cfg *Config) ToYaml() ([]byte, error)

Jump to

Keyboard shortcuts

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