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 ListKeys(tx *sql.Tx, prefix string, matchType MatchType) []string
- func LockKey(tx *sql.Tx, key string, password string)
- func PruneKey(tx *sql.Tx, key string)
- func RenameKey(tx *sql.Tx, oldKey string, newKey string)
- func RunInTransaction(fn func(tx *sql.Tx))
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearAllKeysHistory ¶
func ClearKeyHistory ¶
func RunInTransaction ¶ added in v0.1.4
RunInTransaction automatically cleans up DB then runs given function, all inside a transaction.
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.