Documentation ¶
Index ¶
- func CleanMountAlias(alias string) string
- type AlreadyMountedError
- type NotInitializedError
- 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) CheckRecipients(ctx context.Context, store string) error
- func (r *Store) Concurrency() int
- func (r *Store) Convert(ctx context.Context, name string, cryptoBe backend.CryptoBackend, ...) error
- func (r *Store) Copy(ctx context.Context, from, to string) error
- func (r *Store) Crypto(ctx context.Context, name string) backend.Crypto
- func (r *Store) Delete(ctx context.Context, name string) error
- func (r *Store) Exists(ctx context.Context, name string) bool
- func (r *Store) Format(ctx context.Context, maxDepth int) (string, error)
- func (s *Store) Fsck(ctx context.Context, store, path string) error
- func (r *Store) Get(ctx context.Context, name string) (gopass.Secret, error)
- func (r *Store) GetRevision(ctx context.Context, name, revision string) (context.Context, gopass.Secret, error)
- func (r *Store) GetSubStore(name string) (*leaf.Store, error)
- func (r *Store) GetTemplate(ctx context.Context, name string) ([]byte, error)
- func (r *Store) HasSubDirs(ctx context.Context, name string) (bool, error)
- 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) IsDir(ctx context.Context, name string) bool
- func (r *Store) IsInitialized(ctx context.Context) (bool, error)
- func (r *Store) Link(ctx context.Context, from, to string) error
- func (r *Store) List(ctx context.Context, maxDepth int) ([]string, error)
- func (r *Store) ListRecipients(ctx context.Context, store string) []string
- func (r *Store) ListRevisions(ctx context.Context, name string) ([]backend.Revision, error)
- func (r *Store) Lock() error
- func (r *Store) LookupTemplate(ctx context.Context, name string) (string, []byte, bool)
- func (r *Store) MountPoint(name string) string
- 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) RCSAddRemote(ctx context.Context, name, remote, url string) error
- func (r *Store) RCSInit(ctx context.Context, name, userName, userEmail string) error
- func (r *Store) RCSInitConfig(ctx context.Context, name, userName, userEmail string) error
- func (r *Store) RCSPull(ctx context.Context, name, origin, remote string) error
- func (r *Store) RCSPush(ctx context.Context, name, origin, remote string) error
- func (r *Store) RCSRemoveRemote(ctx context.Context, name, remote string) error
- func (r *Store) RCSStatus(ctx context.Context, name string) error
- func (r *Store) RecipientsTree(ctx context.Context, pretty bool) (*tree.Root, 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, ack bool) error
- func (r *Store) Set(ctx context.Context, name string, sec gopass.Byter) error
- func (r *Store) SetTemplate(ctx context.Context, name string, content []byte) error
- func (r *Store) Storage(ctx context.Context, name string) backend.Storage
- func (r *Store) String() string
- func (r *Store) TemplateTree(ctx context.Context) (*tree.Root, error)
- func (r *Store) Tree(ctx context.Context) (*tree.Root, error)
- func (r *Store) WithStoreConfig(ctx context.Context) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanMountAlias ¶ added in v1.15.9
CleanMountAlias removes all leading and trailing slashes from a mount alias. Note: Slashes inside the alias are valid and will be kept.
Types ¶
type AlreadyMountedError ¶
type AlreadyMountedError string
AlreadyMountedError is an error that is returned when a store is already mounted on a given mount point.
func (AlreadyMountedError) Error ¶
func (a AlreadyMountedError) Error() string
type NotInitializedError ¶
type NotInitializedError struct {
// contains filtered or unexported fields
}
NotInitializedError is an error that is returned when a not initialized store should be mounted.
func (NotInitializedError) Alias ¶
func (n NotInitializedError) Alias() string
Alias returns the store alias this error was generated for.
func (NotInitializedError) Error ¶
func (n NotInitializedError) Error() string
func (NotInitializedError) Path ¶
func (n NotInitializedError) Path() string
Path returns the store path this error was generated for.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the public facing password store. It contains one or more leaf stores.
func (*Store) AddRecipient ¶
AddRecipient adds a single recipient to the given store.
func (*Store) CheckRecipients ¶ added in v1.15.3
CheckRecipients checks all current recipients to make sure that they are valid, e.g. not expired.
func (*Store) Concurrency ¶ added in v1.14.0
Concurrency returns the concurrency level supported by this store, which is the minimum of all mount points, limited by the number of cores.
func (*Store) Convert ¶
func (r *Store) Convert(ctx context.Context, name string, cryptoBe backend.CryptoBackend, storageBe backend.StorageBackend, move bool) error
Convert will try to convert a given mount to a different set of backends.
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) GetRevision ¶
func (r *Store) GetRevision(ctx context.Context, name, revision string) (context.Context, gopass.Secret, error)
GetRevision will try to retrieve the given revision from the sync backend.
func (*Store) GetSubStore ¶
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) HasSubDirs ¶
HasSubDirs returns true if the named entity has subdirectories.
func (*Store) HasTemplate ¶
HasTemplate returns true if the template exists.
func (*Store) ImportMissingPublicKeys ¶
ImportMissingPublicKeys import missing public keys in any substore.
func (*Store) IsInitialized ¶
IsInitialized 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) ListRevisions ¶
ListRevisions will list all revisions for the named entity.
func (*Store) Lock ¶ added in v1.12.0
Lock drops all cached credentials, if any. Mostly only useful for the gopass REPL.
func (*Store) LookupTemplate ¶
LookupTemplate will lookup and return a template.
func (*Store) MountPoint ¶
MountPoint returns the most-specific mount point for the given key.
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) RCSAddRemote ¶
RCSAddRemote adds a git remote.
func (*Store) RCSInitConfig ¶
RCSInitConfig initializes the git repos local config.
func (*Store) RCSRemoveRemote ¶
RCSRemoveRemote removes a git remote.
func (*Store) RCSStatus ¶
RCSStatus show the git status. TODO this should likely iterate over all stores.
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 ¶
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.