db

package
v0.0.0-...-9ca5070 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadAllKeys

func ReadAllKeys() ([]models.UserKeys, error)

Types

type KvDb

type KvDb struct {
	DbName     string
	BucketName string
	// contains filtered or unexported fields
}

func NewKeysDb

func NewKeysDb() (*KvDb, error)

func NewKvDb

func NewKvDb(dbName string, bucketName string) (*KvDb, error)

func NewUsersDb

func NewUsersDb() (*KvDb, error)

func (*KvDb) Close

func (k *KvDb) Close() error

func (*KvDb) Connect

func (k *KvDb) Connect() error

func (*KvDb) Read

func (k *KvDb) Read(key string) (string, error)

func (*KvDb) Write

func (k *KvDb) Write(key string, value string) error

type KvDbInteract

type KvDbInteract interface {
	Connect() error
	Read(key string) (string, error)
	Write(key string, value string) error
	Close() error
}

Jump to

Keyboard shortcuts

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