Documentation ¶
Index ¶
- type Store
- func (r *Store) AddMount(ctx context.Context, alias, path string, keys ...string) error
- func (r *Store) AddRecipient(ctx context.Context, store, rec string) error
- func (r *Store) Alias() string
- func (r *Store) Copy(ctx context.Context, from, to string) error
- func (r *Store) Delete(ctx context.Context, name string) error
- func (r *Store) Exists(ctx context.Context, name string) bool
- func (r *Store) Format(maxDepth int) (string, error)
- func (r *Store) Fsck(ctx context.Context, prefix string) (map[string]uint64, error)
- func (r *Store) GPGVersion(ctx context.Context) semver.Version
- func (r *Store) Get(ctx context.Context, name string) (*secret.Secret, error)
- func (r *Store) GetSubStore(name string) (*sub.Store, error)
- func (r *Store) GetTemplate(ctx context.Context, name string) ([]byte, error)
- func (r *Store) Git(ctx context.Context, name string, recurse, force bool, args ...string) error
- func (r *Store) GitInit(ctx context.Context, name, sk, userName, userEmail string) error
- func (r *Store) GitInitConfig(ctx context.Context, name, sk, userName, userEmail string) error
- func (r *Store) GitVersion(ctx context.Context) semver.Version
- func (r *Store) HasTemplate(ctx context.Context, name string) bool
- func (r *Store) ImportMissingPublicKeys(ctx context.Context) error
- func (r *Store) Init(ctx context.Context, alias, path string, ids ...string) error
- func (r *Store) Initialized() bool
- func (r *Store) IsDir(ctx context.Context, name string) bool
- func (r *Store) List(maxDepth int) ([]string, error)
- func (r *Store) ListRecipients(ctx context.Context, store string) []string
- func (r *Store) LookupTemplate(ctx context.Context, name string) ([]byte, bool)
- func (r *Store) MountPoints() []string
- func (r *Store) Mounts() map[string]string
- func (r *Store) Move(ctx context.Context, from, to string) error
- func (r *Store) Path() string
- func (r *Store) Prune(ctx context.Context, tree string) error
- func (r *Store) RecipientsTree(ctx context.Context, pretty bool) (tree.Tree, error)
- func (r *Store) RemoveMount(ctx context.Context, alias string) error
- func (r *Store) RemoveRecipient(ctx context.Context, store, rec string) error
- func (r *Store) RemoveTemplate(ctx context.Context, name string) error
- func (r *Store) SaveRecipients(ctx context.Context) error
- func (r *Store) Set(ctx context.Context, name string, sec *secret.Secret) error
- func (r *Store) SetTemplate(ctx context.Context, name string, content []byte) error
- func (r *Store) String() string
- func (r *Store) TemplateTree() (tree.Tree, error)
- func (r *Store) Tree() (tree.Tree, 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) 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) GetSubStore ¶ added in v1.4.0
GetSubStore returns an exact match for a mount point or an error if this mount point does not exist
func (*Store) GetTemplate ¶
GetTemplate will return the content of the named template
func (*Store) GitInitConfig ¶ added in v1.6.0
GitInitConfig initializes the git repos local config
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) 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) SaveRecipients ¶ added in v1.3.0
SaveRecipients persists the recipients to disk. Only useful if persist keys is enabled
func (*Store) SetTemplate ¶
SetTemplate will (over)write the content to the template file
func (*Store) TemplateTree ¶
TemplateTree returns a tree of all templates