store

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrJson      = errors.Fmt("json marshal failed")
	ErrPass      = errors.Fmt("authentication failed(using password: yes)")
	ErrEncrypt   = errors.Fmt("encrypt failed")
	ErrNotExists = errors.Fmt("key not exists")
)
View Source
var ErrBadFormat = errors.Fmt("file is bad format")
View Source
var (
	HOME_NAME = ".gdbutil"
)

Functions

func Get

func Get(key, password string, o interface{}) error

func GetKeyPath

func GetKeyPath(key string) string

func GetTTL

func GetTTL(key, password string, v interface{}) error

func Remove

func Remove(key, password string) error

func Set

func Set(key, password string, o interface{}) error

func SetTTL

func SetTTL(key, password string, v interface{}, ttl time.Duration) error

Types

type File

type File struct {
	HasPassword bool
	Content     []byte
}

type TTLValue

type TTLValue struct {
	Data    []byte
	OutDate int64
}

Jump to

Keyboard shortcuts

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