Documentation ¶
Index ¶
- type Store
- func (r *Store) AddMount(alias, path string, keys ...string) error
- func (r *Store) AddRecipient(store, rec string) error
- func (s *Store) Alias() string
- func (s *Store) AskForMore() bool
- func (s *Store) AutoSync() bool
- func (s *Store) ClipTimeout() int
- func (s *Store) Config() *config.Config
- func (r *Store) Copy(from, to string) error
- func (r *Store) Delete(name string) error
- func (r *Store) DeleteKey(name, key string) error
- func (r *Store) Exists(name string) bool
- func (r *Store) Format(maxDepth int) (string, error)
- func (r *Store) Fsck(prefix string, check, force bool) (map[string]uint64, error)
- func (r *Store) GPGVersion() semver.Version
- func (r *Store) Get(name string) ([]byte, error)
- func (r *Store) GetBody(name string) ([]byte, error)
- func (r *Store) GetFirstLine(name string) ([]byte, error)
- func (r *Store) GetKey(name, key string) ([]byte, error)
- func (r *Store) GetTemplate(name string) ([]byte, error)
- func (r *Store) Git(name string, recurse, force bool, args ...string) error
- func (r *Store) GitInit(name, sk, userName, userEmail string) error
- func (r *Store) GitVersion() semver.Version
- func (r *Store) HasTemplate(name string) bool
- func (r *Store) ImportMissingPublicKeys() error
- func (r *Store) Init(alias, path string, ids ...string) error
- func (r *Store) Initialized() bool
- func (r *Store) IsDir(name string) bool
- func (r *Store) List(maxDepth int) ([]string, error)
- func (r *Store) ListRecipients(store string) []string
- func (r *Store) LookupTemplate(name string) ([]byte, bool)
- func (r *Store) MountPoints() []string
- func (r *Store) Mounts() map[string]string
- func (r *Store) Move(from, to string) error
- func (s *Store) NoConfirm() bool
- func (s *Store) NoPager() bool
- func (s *Store) Path() string
- func (r *Store) Prune(tree string) error
- func (r *Store) RecipientsTree(pretty bool) (tree.Tree, error)
- func (r *Store) RemoveMount(alias string) error
- func (r *Store) RemoveRecipient(store, rec string) error
- func (r *Store) RemoveTemplate(name string) error
- func (s *Store) SafeContent() bool
- func (r *Store) SaveRecipients() error
- func (r *Store) Set(name string, content []byte, reason string) error
- func (r *Store) SetConfirm(name string, content []byte, reason string, cb store.RecipientCallback) error
- func (r *Store) SetKey(name, key, value string) error
- func (r *Store) SetPassword(name string, password []byte) error
- func (r *Store) SetTemplate(name string, content []byte) error
- func (r *Store) String() string
- func (r *Store) TemplateTree() (tree.Tree, error)
- func (r *Store) Tree() (tree.Tree, error)
- func (s *Store) UpdateConfig(cfg *config.Config) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the public facing password store
func (*Store) AddRecipient ¶
AddRecipient adds a single recipient to the given store
func (*Store) AskForMore ¶
AskForMore returns true if generate should ask for more information
func (*Store) ClipTimeout ¶
ClipTimeout returns the value of clip timeout
func (*Store) Copy ¶
Copy will copy one entry to another location. Multi-store copies are supported. Each entry has to be decoded and encoded for the destination to make sure it's encrypted for the right set of recipients.
func (*Store) GPGVersion ¶ added in v1.3.0
GPGVersion returns GPG version information
func (*Store) GetFirstLine ¶
GetFirstLine returns the first line of the plaintext of a single key
func (*Store) GetKey ¶
GetKey will return a single named entry from a structured document (YAML) in secret name. If no such key exists or yaml decoding fails it will return an error
func (*Store) GetTemplate ¶
GetTemplate will return the content of the named template
func (*Store) GitVersion ¶ added in v1.3.0
GitVersion returns git version information
func (*Store) HasTemplate ¶
HasTemplate returns true if the template exists
func (*Store) ImportMissingPublicKeys ¶ added in v1.3.0
ImportMissingPublicKeys import missing public keys in any substore
func (*Store) Initialized ¶
Initialized checks on disk if .gpg-id was generated and thus returns true.
func (*Store) ListRecipients ¶
ListRecipients lists all recipients for the given store
func (*Store) LookupTemplate ¶
LookupTemplate will lookup and return a template
func (*Store) MountPoints ¶
MountPoints returns a sorted list of mount points. It encodes the logic that the longer a mount point the more specific it is. This allows to "shadow" a shorter mount point by a longer one.
func (*Store) Move ¶
Move will move one entry from one location to another. Cross-store moves are supported. Moving an entry will decode it from the old location, encode it for the destination store with the right set of recipients and remove it from the old location afterwards.
func (*Store) NoPager ¶ added in v1.3.0
NoPager retuns true if the user doesn't want a pager for longer output
func (*Store) RecipientsTree ¶
RecipientsTree returns a tree view of all stores' recipients
func (*Store) RemoveMount ¶
RemoveMount removes and existing mount
func (*Store) RemoveRecipient ¶
RemoveRecipient removes a single recipient from the given store
func (*Store) RemoveTemplate ¶
RemoveTemplate will delete the named template if it exists
func (*Store) SafeContent ¶
SafeContent returns the value of safe content
func (*Store) SaveRecipients ¶ added in v1.3.0
SaveRecipients persists the recipients to disk. Only useful if persist keys is enabled
func (*Store) SetConfirm ¶
func (r *Store) SetConfirm(name string, content []byte, reason string, cb store.RecipientCallback) error
SetConfirm calls Set with confirmation callback
func (*Store) SetKey ¶
SetKey sets a single key in structured document (YAML) to the given value. If the secret name is non-empty but no YAML it will return an error.
func (*Store) SetPassword ¶ added in v1.3.0
SetPassword Update only the first line in an already existing entry
func (*Store) SetTemplate ¶
SetTemplate will (over)write the content to the template file
func (*Store) TemplateTree ¶
TemplateTree returns a tree of all templates