keyvalue

package
v0.0.0-...-2dc6276 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	ChangeDB(string) error      // change db(bucket) if needed
	Get([]byte) ([]byte, error) // get value by key
	Put([]byte, []byte) error   // put key value pair
	Close() error               // close conn
}

func NewClient

func NewClient(uri string) (Client, error)

now just use mongo

type ClientBblot

type ClientBblot struct {
	// contains filtered or unexported fields
}

func NewBblotClient

func NewBblotClient(cfg *OptionsBblot) (*ClientBblot, error)

func (*ClientBblot) ChangeDB

func (s *ClientBblot) ChangeDB(name string) error

func (*ClientBblot) Close

func (s *ClientBblot) Close() error

func (*ClientBblot) Get

func (s *ClientBblot) Get(key []byte) ([]byte, error)

func (*ClientBblot) Put

func (s *ClientBblot) Put(key, value []byte) error

type OptionsBblot

type OptionsBblot struct {
	Path    string
	Bucket  string
	Options *bolt.Options
}

func Uri2BblotOption

func Uri2BblotOption(uri string) (*OptionsBblot, error)

Jump to

Keyboard shortcuts

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