Documentation ¶
Index ¶
- Variables
- type CharsParameter
- type GenerateParameter
- type Identity
- type MasterKey
- type MasterKeyUnlock
- type PasswordEstimate
- type PasswordStrength
- type Secret
- type SecretAttachment
- type SecretCurrent
- type SecretEntry
- type SecretList
- type SecretListFilter
- type SecretProperty
- type SecretPropertyList
- type SecretType
- type SecretTypeDefinition
- type SecretVersion
- type SecretVersions
- type Status
- type WordsParameter
Constants ¶
This section is empty.
Variables ¶
var PropertyNotes = SecretProperty{Name: "notes", Display: "Notes", MultiLine: true}
var PropertyPassword = SecretProperty{Name: "password", Display: "Password", Blurred: true}
var PropertyProductVersion = SecretProperty{Name: "productVersion", Display: "Version"}
var PropertyRegCode = SecretProperty{Name: "regCode", Display: "Licence code", MultiLine: true}
var PropertyRegName = SecretProperty{Name: "regName", Display: "Licenced to"}
var PropertySID = SecretProperty{Name: "sid", Display: "Sid", Blurred: true}
var PropertyTOTPUrl = SecretProperty{Name: "totpUrl", Display: "TOTP Url", OTPParams: true}
var PropertyUsername = SecretProperty{Name: "username", Display: "Username"}
var SecretProperties = SecretPropertyList{ PropertyUsername, PropertyPassword, PropertyTOTPUrl, PropertySID, PropertyNotes, PropertyRegName, PropertyRegCode, PropertyProductVersion, }
var SecretTypes = []SecretTypeDefinition{ {Type: SecretTypeLogin, Display: "Login", Properties: []SecretProperty{ PropertyUsername, PropertyPassword, PropertyTOTPUrl, PropertyNotes, }}, {Type: SecretTypeNote, Display: "Note", Properties: []SecretProperty{ PropertyNotes, }}, {Type: SecretTypeWLAN, Display: "WLAN", Properties: []SecretProperty{ PropertySID, PropertyPassword, PropertyNotes, }}, {Type: SecretTypeLicence, Display: "Licence", Properties: []SecretProperty{ PropertyRegName, PropertyRegCode, PropertyProductVersion, PropertyNotes, }}, }
Functions ¶
This section is empty.
Types ¶
type CharsParameter ¶
type CharsParameter struct { NumChars int `json:"num_chars"` IncludeUpper bool `json:"include_upper"` IncludeNumbers bool `json:"include_numbers"` IncludeSymbols bool `json:"include_symbols"` RequireUpper bool `json:"require_upper"` RequireNumber bool `json:"require_number"` RequireSymbol bool `json:"require_symbol"` ExcludeSimilar bool `json:"exclude_similar"` ExcludeAmbiguous bool `json:"exclude_ambiguous"` }
type GenerateParameter ¶
type GenerateParameter struct { Chars *CharsParameter `json:"chars,omitempty"` Words *WordsParameter `json:"words,omitempty"` }
type MasterKey ¶
type MasterKey struct { Locked bool `json:"locked"` AutolockAt *time.Time `json:"autolock_at,omitempty"` }
MasterKey contains information about an available masterkey (and its status)
type MasterKeyUnlock ¶
type MasterKeyUnlock struct { Identity // NODE: Tempoary measure until there is proper pinentry Passphrase string `json:"passphrase"` }
MasterKeyUnlock is required to unlock a masterkey (might become obsolete)
type PasswordEstimate ¶
type PasswordEstimate struct { Password string `json:"password"` Inputs []string `json:"inputs,omitempty"` }
PasswordEstimate options to estimate the strength of a password
type PasswordStrength ¶
type PasswordStrength struct { Entropy float64 `json:"entropy"` CrackTime float64 `json:"crackTime"` CrackTimeDisplay string `json:"crackTimeDisplay"` Score int `json:"score"` }
PasswordStrength contains details about the strength of a password
type Secret ¶
type Secret struct { SecretCurrent Versions SecretVersions `json:"versions"` PasswordStrengths map[string]*PasswordStrength `json:"password_strengths"` }
Secret holds all information of a secret (including all previous versions)
type SecretAttachment ¶
type SecretAttachment struct { Name string `json:"name"` MimeType string `json:"mimeType"` Content []byte `json:"content"` }
SecretAttachment is an attachment to a secret
type SecretCurrent ¶
type SecretCurrent struct { ID string `json:"id"` Type SecretType `json:"type"` Current *SecretVersion `json:"current,omitempty"` }
SecretCurrent contains the current (head) version of a secret
type SecretEntry ¶
type SecretEntry struct { ID string `json:"id"` Name string `json:"name"` NameHighlights []int `json:"nameHighlights"` Type SecretType `json:"type"` Tags []string `json:"tags"` URLs []string `json:"urls"` Timestamp time.Time `json:"timestamp"` Deleted bool `json:"deleted"` }
SecretEntry is a reference to a stored secret
func (*SecretEntry) HasTag ¶
func (e *SecretEntry) HasTag(tag string) bool
func (*SecretEntry) MatchesURL ¶
func (e *SecretEntry) MatchesURL(urlStr string) bool
type SecretList ¶
type SecretList struct { AllTags []string `json:"all_tags"` Entries []*SecretEntry `json:"entries"` }
SecretList contains a list of all SecretEntries
type SecretListFilter ¶
type SecretListFilter struct { URL string `json:"url,omitempty"` Tag string `json:"tag,omitempty"` Type SecretType `json:"type,omitempty"` Name string `json:"name,omitempty"` Deleted bool `json:"deleted,omitempty"` }
SecretListFilter filter options to query secret list
type SecretProperty ¶
type SecretPropertyList ¶
type SecretPropertyList []SecretProperty
func (SecretPropertyList) Len ¶
func (p SecretPropertyList) Len() int
func (SecretPropertyList) Less ¶
func (p SecretPropertyList) Less(i, j int) bool
func (SecretPropertyList) Sort ¶
func (p SecretPropertyList) Sort()
func (SecretPropertyList) Swap ¶
func (p SecretPropertyList) Swap(i, j int)
type SecretType ¶
type SecretType string
SecretType is the type of the secret to store
const ( // SecretTypeLogin is a generic login (of a webpage) SecretTypeLogin SecretType = "login" // SecretTypeNote is a general secret note SecretTypeNote SecretType = "note" // SecretTypeLicence is some kind of software licence (key) SecretTypeLicence SecretType = "licence" // SecretTypeWLAN is a wlan password SecretTypeWLAN SecretType = "wlan" // SecretTypePassword is some kind of generic password/key SecretTypePassword SecretType = "password" )
type SecretTypeDefinition ¶
type SecretTypeDefinition struct { Type SecretType Display string Properties []SecretProperty }
type SecretVersion ¶
type SecretVersion struct { Timestamp time.Time `json:"timestamp"` Name string `json:"name"` Tags []string `json:"tags"` URLs []string `json:"urls"` Properties map[string]string `json:"properties"` Attachments []SecretAttachment `json:"attachment"` Deleted bool `json:"deleted"` }
SecretVersion is a concret version of a secret
type SecretVersions ¶
type SecretVersions []*SecretVersion
SecretVersions is a sequence of SecretVersion
func (SecretVersions) Len ¶
func (s SecretVersions) Len() int
func (SecretVersions) Less ¶
func (s SecretVersions) Less(i, j int) bool
func (SecretVersions) Swap ¶
func (s SecretVersions) Swap(i, j int)
type Status ¶
type Status struct { Initialized bool `json:"initialized"` Locked bool `json:"locked"` AutolockAt *time.Time `json:"autolock_at,omitempty"` Version string `json:"version"` }
Status contains relevant status information of the daemon