keystore

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const FILENAME = "keepassxc.keystore"

Variables

View Source
var (
	ErrEmptyKeystore              = errors.New("keystore does not contain any profiles")
	ErrToManyProfiles             = errors.New("keystore has multiple profiles, please specify the one to use")
	ErrDefaultProfileDoesNotExist = errors.New("default profile does not exist")
)

Functions

This section is empty.

Types

type Keystore

type Keystore struct {
	Default  string     `json:"default"`
	Profiles []*Profile `json:"profiles"`
	// contains filtered or unexported fields
}

func Load

func Load() (*Keystore, error)

func (*Keystore) Add

func (k *Keystore) Add(prof *Profile) error

func (*Keystore) DefaultProfile added in v1.3.0

func (k *Keystore) DefaultProfile() (*Profile, error)

func (*Keystore) Get

func (k *Keystore) Get(name string) (*Profile, error)

func (*Keystore) Save

func (k *Keystore) Save() error

type Profile

type Profile struct {
	Name string `json:"name"`
	Key  string `json:"key"`
}

func (*Profile) NaclKey

func (p *Profile) NaclKey() nacl.Key

Jump to

Keyboard shortcuts

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