Documentation
¶
Overview ¶
Package services includes models and services that communicate with the database
Index ¶
- func ClearAllKeysHistory(tx *sql.Tx, prefix string)
- func ClearKeyHistory(tx *sql.Tx, key string)
- func GetValue(tx *sql.Tx, key string) (*string, *time.Time)
- func HideKey(tx *sql.Tx, key string)
- func InsertRawRows(tx *sql.Tx, rows []RawRow)
- func ListKeys(tx *sql.Tx, prefix string, matchType MatchType) []string
- func LockKey(tx *sql.Tx, key string, password string)
- func MigrateInvalidKeys()
- func MigrateOldDBName()
- func MoveKey(tx *sql.Tx, oldKey string, newKey string)
- func PruneKey(tx *sql.Tx, key string)
- func RunInTransaction(name string, fn func(tx *sql.Tx))
- func SearchKeys(tx *sql.Tx, part string, matchType MatchType) []string
- func SetValue(tx *sql.Tx, key string, value string, expiresAt *time.Time, isLocked bool)
- func ShowKey(tx *sql.Tx, key string)
- func UnlockKey(tx *sql.Tx, key string, password string) error
- type KVItem
- type MatchType
- type RawRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearAllKeysHistory ¶
func ClearKeyHistory ¶
func InsertRawRows ¶ added in v0.6.0
func MigrateInvalidKeys ¶ added in v0.6.0
func MigrateInvalidKeys()
MigrateInvalidKeys displays warning when it detects keys with @ in their names this check will always run in app start, it might be deleted in future releases
func MigrateOldDBName ¶ added in v0.6.0
func MigrateOldDBName()
MigrateOldDBName migrates old 'kv' db into new 'default' DB this check will always run in app start, it might be deleted in future releases
func RunInTransaction ¶ added in v0.1.4
RunInTransaction automatically cleans up DB then runs given function, all inside a transaction.
func SearchKeys ¶ added in v0.4.3
SearchKeys matches any key containing part as a substring, for use in completions
Types ¶
type KVItem ¶
type KVItem struct {
Key string `json:"key,omitempty" yaml:"key,omitempty"`
Value string `json:"value,omitempty" yaml:"value,omitempty"`
IsLocked bool `json:"isLocked,omitempty" yaml:"is-locked,omitempty"`
IsHidden bool `json:"isHidden,omitempty" yaml:"is-hidden,omitempty"`
ExpiresAt *time.Time `json:"expiresAt,omitempty" yaml:"expires-at,omitempty"`
Timestamp time.Time `json:"timestamp" yaml:"timestamp"`
}
Click to show internal directories.
Click to hide internal directories.