kv

package
v2.8.18 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BitGet

func BitGet(ctx context.Context, key string, idx int) (bool, error)

func BitSet

func BitSet(ctx context.Context, key string, idx int, val bool, ttl time.Duration) error

func BitSets

func BitSets(ctx context.Context, key string, val bool, ttl time.Duration, idx ...int) error

func Decr

func Decr(ctx context.Context, key string, val int, ttl time.Duration) (int, error)

func Delete

func Delete(ctx context.Context, key string) error

func Get

func Get(ctx context.Context, key string, rcv *string) error

func Incr

func Incr(ctx context.Context, key string, val int, ttl time.Duration) (int, error)

func MGet

func MGet(ctx context.Context, key string, rcv interface{}) error

func MSet

func MSet(ctx context.Context, key string, val interface{}, ttl time.Duration) error

func Register

func Register(i Interface)

func Set

func Set(ctx context.Context, key string, val string, ttl time.Duration) error

func TTL

func TTL(ctx context.Context, key string) (time.Duration, error)

Types

type Interface

type Interface interface {
	Name() string
	BitSet(ctx context.Context, key string, idx int, val bool, ttl time.Duration) error
	BitSets(ctx context.Context, key string, val bool, ttl time.Duration, idx ...int) error
	BitGet(ctx context.Context, key string, idx int) (bool, error)
	Set(ctx context.Context, key string, val string, ttl time.Duration) error
	Get(ctx context.Context, key string, rcv *string) error
	MSet(ctx context.Context, key string, val interface{}, ttl time.Duration) error
	MGet(ctx context.Context, key string, rcv interface{}) error
	Decr(ctx context.Context, key string, val int, ttl time.Duration) (int, error)
	Incr(ctx context.Context, key string, val int, ttl time.Duration) (int, error)
	TTL(ctx context.Context, key string) (time.Duration, error)
	Delete(ctx context.Context, key string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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