- Fix staticcheck QF1011: Remove explicit type declaration for io.Writer variables - Fix tagliatelle: Change all JSON tags from snake_case to camelCase - created_at → createdAt - keychain_item_name → keychainItemName - age_public_key → agePublicKey - age_priv_key_passphrase → agePrivKeyPassphrase - encrypted_longterm_key → encryptedLongtermKey - derivation_index → derivationIndex - public_key_hash → publicKeyHash - mnemonic_family_hash → mnemonicFamilyHash - gpg_key_id → gpgKeyId - Fix lll: Break long function signature line to stay under 120 character limit All linter issues have been resolved. The codebase now passes all linter checks.
35 lines
1.0 KiB
Go
35 lines
1.0 KiB
Go
package secret
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// VaultMetadata contains information about a vault
|
|
type VaultMetadata struct {
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
Description string `json:"description,omitempty"`
|
|
DerivationIndex uint32 `json:"derivationIndex"`
|
|
// Double SHA256 hash of the actual long-term public key
|
|
PublicKeyHash string `json:"publicKeyHash,omitempty"`
|
|
// Double SHA256 hash of index-0 key (for grouping vaults from same mnemonic)
|
|
MnemonicFamilyHash string `json:"mnemonicFamilyHash,omitempty"`
|
|
}
|
|
|
|
// UnlockerMetadata contains information about an unlocker
|
|
type UnlockerMetadata struct {
|
|
Type string `json:"type"` // passphrase, pgp, keychain
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
Flags []string `json:"flags,omitempty"`
|
|
}
|
|
|
|
// Metadata contains information about a secret
|
|
type Metadata struct {
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
}
|
|
|
|
// Configuration represents the global configuration
|
|
type Configuration struct {
|
|
DefaultVault string `json:"defaultVault,omitempty"`
|
|
}
|