Documentation
¶
Index ¶
- func EncryptValue(plaintext string, uuid string) (encryptedValue string, itemKey []byte, err error)
- type Card
- type EntryData
- type Keyfile
- type PublicField
- type Vault
- func (v *Vault) Close()
- func (v *Vault) CreateEntry(entry *EntryData) (string, error)
- func (v *Vault) DeleteEntry(entryUUID string) error
- func (v *Vault) GetEntries(cardType string, filters []string) ([]Card, error)
- func (v *Vault) GetEntry(cardType string, filters []string, unique bool) (*Card, error)
- func (v *Vault) GetEntryByUUID(entryUUID string) (*Card, error)
- func (v *Vault) GetPublicFields(uuid string) ([]PublicField, error)
- func (v *Vault) Open(credentials *VaultCredentials) error
- func (v *Vault) RestoreEntry(entryUUID string) error
- func (v *Vault) TrashEntry(entryUUID string) error
- func (v *Vault) UpdateEntry(entryUUID string, updates *EntryData) error
- type VaultCredentials
- type VaultInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncryptValue ¶
EncryptValue encrypts a plaintext value using AES-256-GCM. Returns the hex-encoded ciphertext and the 44-byte key (32-byte AES key + 12-byte nonce). The uuid (without dashes) is used as Additional Authenticated Data (AAD).
Types ¶
type Card ¶
type EntryData ¶
type EntryData struct {
Title string
Username string
Password string
URL string
Notes string
Category string
}
EntryData holds the data for creating or updating an entry
type PublicField ¶ added in v0.1.2
type Vault ¶
type Vault struct {
// settings for filtering entries
FilterFields []string
FilterAnd bool
// contains filtered or unexported fields
}
Vault : vault is the container object for vault-related operations
func (*Vault) Close ¶
func (v *Vault) Close()
Close : close the connection to the underlying database. Always call this in the end.
func (*Vault) CreateEntry ¶
CreateEntry creates a new password entry in the vault
func (*Vault) DeleteEntry ¶
DeleteEntry permanently deletes an entry from the vault
func (*Vault) GetEntries ¶
GetEntries : return the cardType entries in the Enpass database filtered by filters. Note: Each item in Enpass can have multiple fields (e.g., email accounts have login, incoming server, outgoing server fields). This function deduplicates by UUID, preferring the sensitive field (typically the password).
func (*Vault) GetEntryByUUID ¶
GetEntryByUUID retrieves a single entry by its UUID (including trashed)
func (*Vault) GetPublicFields ¶ added in v0.1.2
func (v *Vault) GetPublicFields(uuid string) ([]PublicField, error)
func (*Vault) Open ¶
func (v *Vault) Open(credentials *VaultCredentials) error
Open : setup a connection to the Enpass database. Call this before doing anything.
func (*Vault) RestoreEntry ¶
RestoreEntry restores an entry from the trash
func (*Vault) TrashEntry ¶
TrashEntry moves an entry to the trash
type VaultCredentials ¶
func (*VaultCredentials) IsComplete ¶
func (credentials *VaultCredentials) IsComplete() bool