Documentation ¶
Index ¶
- Constants
- type Store
- func (s *Store) AddRecipient(id string) error
- func (s *Store) Alias() string
- func (s *Store) Config() *config.Config
- func (s *Store) Copy(from, to string) error
- func (s *Store) Delete(name string) error
- func (s *Store) DeleteKey(name, key string) error
- func (s *Store) Equals(other *Store) bool
- func (s *Store) Exists(name string) bool
- func (s *Store) Fsck(prefix string, check, force bool) (map[string]uint64, error)
- func (s *Store) Get(name string) ([]byte, error)
- func (s *Store) GetBody(name string) ([]byte, error)
- func (s *Store) GetFirstLine(name string) ([]byte, error)
- func (s *Store) GetKey(name, key string) ([]byte, error)
- func (s *Store) GetTemplate(name string) ([]byte, error)
- func (s *Store) Git(args ...string) error
- func (s *Store) GitInit(alias, signKey string) error
- func (s *Store) HasTemplate(name string) bool
- func (s *Store) Init(path string, ids ...string) error
- func (s *Store) Initialized() bool
- func (s *Store) IsDir(name string) bool
- func (s *Store) List(prefix string) ([]string, error)
- func (s *Store) ListTemplates(prefix string) []string
- func (s *Store) LookupTemplate(name string) ([]byte, bool)
- func (s *Store) Move(from, to string) error
- func (s *Store) Path() string
- func (s *Store) Prune(tree string) error
- func (s *Store) Recipients() []string
- func (s *Store) RemoveRecipient(id string) error
- func (s *Store) RemoveTemplate(name string) error
- func (s *Store) Set(name string, content []byte, reason string) error
- func (s *Store) SetConfirm(name string, content []byte, reason string, cb store.RecipientCallback) error
- func (s *Store) SetKey(name, key, value string) error
- func (s *Store) SetTemplate(name string, content []byte) error
- func (s *Store) String() string
- func (s *Store) TemplateTree() (tree.Tree, error)
- func (s *Store) UpdateConfig(cfg *config.Config) error
Constants ¶
const (
// GPGID is the name of the file containing the recipient ids
GPGID = ".gpg-id"
)
const (
// TemplateFile is the name of a pass template
TemplateFile = ".pass-template"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is password store
func (*Store) AddRecipient ¶
AddRecipient adds a new recipient to the list
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) GetFirstLine ¶
GetFirstLine returns the first line of the plaintext of a single key
func (*Store) GetTemplate ¶
GetTemplate will return the content of the named template
func (*Store) GitInit ¶
GitInit initializes this store's git repo and recursively calls GitInit on all substores.
func (*Store) HasTemplate ¶
HasTemplate returns true if the template exists
func (*Store) Initialized ¶
Initialized returns true if the store is properly initialized
func (*Store) ListTemplates ¶
ListTemplates will list all templates in this store
func (*Store) LookupTemplate ¶
LookupTemplate will lookup and return a template
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) Recipients ¶
Recipients returns the list of recipients of this store
func (*Store) RemoveRecipient ¶
RemoveRecipient will remove the given recipient from the storefunc (s *Store) RemoveRecipient()id string) error {
func (*Store) RemoveTemplate ¶
RemoveTemplate will delete the named template if it exists
func (*Store) SetConfirm ¶
func (s *Store) SetConfirm(name string, content []byte, reason string, cb store.RecipientCallback) error
SetConfirm encodes and writes the cipertext of one entry to disk. This method can be passed a callback to confirm the recipients immedeately before encryption.
func (*Store) SetTemplate ¶
SetTemplate will (over)write the content to the template file
func (*Store) TemplateTree ¶
TemplateTree returns a tree of all templates