Versions in this module Expand all Collapse all v1 v1.0.6 Feb 25, 2026 v1.0.5 Feb 25, 2026 Changes in this version + const TokenPrefix + func Parse(raw string) (tokenID string, secret string, err error) + func SaveVault(v *Vault) error + func VaultPath() (string, error) + func Verify(raw string, rec StoredToken) (string, bool) + type CreateOptions struct + BindToDevice bool + DevicePepper []byte + ExpiresAt *time.Time + MaxUses int + SyncEnabled bool + type ExecPayload struct + DisplayLabel string + HostID int + HostKeyPolicy string + Hostname string + KeepAliveSeconds int + KeyType string + PasswordBackendUnix string + Port int + Secret string + Term string + Username string + type HostGrant struct + DisplayLabel string + HostID int + type ResolveResult struct + DBUnlockSecret string + HostID int + HostLabel string + LegacyPayload *ExecPayload + TokenID string + TokenIndex int + type StoredToken struct + CreatedAt time.Time + DeletedAt *time.Time + ExpiresAt *time.Time + Hash string + Hosts []StoredTokenHost + LastUsedAt *time.Time + MaxUses int + Name string + RevokedAt *time.Time + Salt string + SyncEnabled bool + TokenID string + UnlockBound bool + UnlockData string + UnlockSalt string + UpdatedAt time.Time + UseCount int + func CreateToken(name string, grants []HostGrant, dbUnlockSecret string, opts CreateOptions) (string, StoredToken, error) + func (t StoredToken) IsLegacyPayload() bool + func (t StoredToken) IsUsable() bool + type StoredTokenHost struct + DisplayLabel string + HostID int + Payload string + PayloadSalt string + type SyncTokenDef struct + CreatedAt time.Time + DeletedAt *time.Time + ExpiresAt *time.Time + Hosts []SyncTokenHost + MaxUses int + Name string + RevokedAt *time.Time + SyncEnabled bool + TokenID string + UpdatedAt time.Time + type SyncTokenHost struct + DisplayLabel string + HostID int + type TokenSummary struct + CreatedAt time.Time + DeletedAt *time.Time + ExpiresAt *time.Time + HostCount int + LastUsedAt *time.Time + Legacy bool + MaxUses int + Name string + RevokedAt *time.Time + SyncEnabled bool + TokenID string + UpdatedAt time.Time + Usable bool + UseCount int + type Vault struct + Tokens []StoredToken + Version int + func LoadVault() (*Vault, error) + func (v *Vault) ActivateToken(tokenID string, dbUnlockSecret string, devicePepper []byte) (string, error) + func (v *Vault) AddToken(rawToken string, rec StoredToken) error + func (v *Vault) DeleteRevokedToken(tokenID string) (bool, error) + func (v *Vault) ExportSyncDefinitions() []SyncTokenDef + func (v *Vault) ListSummaries() []TokenSummary + func (v *Vault) MarkUsed(tokenIndex int) + func (v *Vault) MergeSyncDefinitions(defs []SyncTokenDef) bool + func (v *Vault) Resolve(rawToken string, targetLabel string, devicePepper []byte) (ResolveResult, error) + func (v *Vault) RevokeToken(tokenID string) bool + func (v *Vault) SyncHostLabels(labels map[int]string) bool