Versions in this module Expand all Collapse all v1 v1.1.0 Jan 11, 2025 v1.0.0 Dec 16, 2024 Changes in this version + var ErrAlreadyExists = errors.New("cannot create a new keystore a valid keystore already exist at the location") + var ErrKeyDoesntExists = errors.New("cannot retrieve the key") + var ErrNotListing = errors.New("the configured keystore is not listing") + var ErrNotWritable = errors.New("the configured keystore is not writable") + func ResolverWrap(keystore Keystore) func(string) (string, parse.Config, error) + type Config struct + Path string + type FileKeystore struct + Path string + func (k *FileKeystore) ConfiguredPath() string + func (k *FileKeystore) Create(override bool) error + func (k *FileKeystore) Delete(key string) error + func (k *FileKeystore) GetConfig() (*config.Config, error) + func (k *FileKeystore) IsPersisted() bool + func (k *FileKeystore) List() ([]string, error) + func (k *FileKeystore) Package() ([]byte, error) + func (k *FileKeystore) Retrieve(key string) (*SecureString, error) + func (k *FileKeystore) Save() error + func (k *FileKeystore) Store(key string, value []byte) error + type Keystore interface + GetConfig func() (*config.Config, error) + IsPersisted func() bool + Retrieve func(key string) (*SecureString, error) + func Factory(c *config.Config, defaultPath string, strictPerms bool) (Keystore, error) + func NewFileKeystore(keystoreFile string) (Keystore, error) + func NewFileKeystoreWithPassword(keystoreFile string, password *SecureString) (Keystore, error) + func NewFileKeystoreWithPasswordAndStrictPerms(keystoreFile string, password *SecureString, strictPerms bool) (Keystore, error) + func NewFileKeystoreWithStrictPerms(keystoreFile string, strictPerms bool) (Keystore, error) + type ListingKeystore interface + List func() ([]string, error) + func AsListingKeystore(store Keystore) (ListingKeystore, error) + type Packager interface + ConfiguredPath func() string + Package func() ([]byte, error) + type SecureString struct + func NewSecureString(value []byte) *SecureString + func (s *SecureString) Get() ([]byte, error) + func (s SecureString) GoString() string + func (s SecureString) String() string + type WritableKeystore interface + Create func(override bool) error + Delete func(key string) error + Save func() error + Store func(key string, secret []byte) error + func AsWritableKeystore(store Keystore) (WritableKeystore, error)