Documentation
¶
Index ¶
- func EncryptValue(plaintext string, uuid string) (encryptedValue string, itemKey []byte, err error)
- type Card
- type EntryData
- type Keyfile
- 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) 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 ¶ added in v1.9.0
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 ¶ added in v1.9.0
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 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 ¶ added in v1.9.0
CreateEntry creates a new password entry in the vault
func (*Vault) DeleteEntry ¶ added in v1.9.0
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 ¶ added in v1.9.0
GetEntryByUUID retrieves a single entry by its UUID (including trashed)
func (*Vault) Open ¶ added in v1.4.0
func (v *Vault) Open(credentials *VaultCredentials) error
Open : setup a connection to the Enpass database. Call this before doing anything.
func (*Vault) RestoreEntry ¶ added in v1.9.0
RestoreEntry restores an entry from the trash
func (*Vault) TrashEntry ¶ added in v1.9.0
TrashEntry moves an entry to the trash
type VaultCredentials ¶ added in v1.4.0
func (*VaultCredentials) IsComplete ¶ added in v1.4.0
func (credentials *VaultCredentials) IsComplete() bool