model

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vault

type Vault struct {
	Version int          `json:"version"`
	Entries []VaultEntry `json:"entries"`
	Groups  []VaultGroup `json:"groups"`
}

func EmptyVault

func EmptyVault() Vault

func (Vault) FilteredEntries

func (vault Vault) FilteredEntries(query string) []VaultEntry

func (Vault) GroupsByID

func (vault Vault) GroupsByID() map[string]VaultGroup

func (Vault) MarshalJSON

func (vault Vault) MarshalJSON() ([]byte, error)

func (*Vault) UnmarshalJSON

func (vault *Vault) UnmarshalJSON(data []byte) error

type VaultEntry

type VaultEntry struct {
	Type     string
	UUID     string
	Name     string
	Issuer   string
	Secret   string
	Algo     string
	Digits   int
	Period   *int
	Counter  *int
	Note     string
	Favorite bool
	Icon     any
	IconMime any
	IconHash any
	Groups   []string
	Pin      *string
}

func (VaultEntry) DisplayName

func (entry VaultEntry) DisplayName() string

func (VaultEntry) IsCounterBased

func (entry VaultEntry) IsCounterBased() bool

func (VaultEntry) IsTimeBased

func (entry VaultEntry) IsTimeBased() bool

func (VaultEntry) MarshalJSON

func (entry VaultEntry) MarshalJSON() ([]byte, error)

func (VaultEntry) Matches

func (entry VaultEntry) Matches(query string, groupsByID map[string]VaultGroup) bool

func (*VaultEntry) UnmarshalJSON

func (entry *VaultEntry) UnmarshalJSON(data []byte) error

type VaultGroup

type VaultGroup struct {
	UUID string `json:"uuid"`
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL