Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEntryNotFound = errors.New("not exists by key") ErrCounterLimitExceeded = errors.New("counter limit exceeded") )
Functions ¶
This section is empty.
Types ¶
type IKeyValue ¶
type IKeyValue interface {
Get(ctx context.Context, key string) (KeyValueResult, error)
Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error
Delete(ctx context.Context, key string) error
IncrementCounterWithLimit(ctx context.Context, key string, counterMax int64, ttl time.Duration) error
Keys(ctx context.Context, pattern string) ([]string, error)
Close() error
}
func NewInMemory ¶
func NewInMemory() IKeyValue
func NewRedisStorage ¶
type KeyValueResult ¶
type KeyValueResult []byte
func (KeyValueResult) Bytes ¶
func (o KeyValueResult) Bytes() []byte
func (KeyValueResult) String ¶
func (o KeyValueResult) String() string
Click to show internal directories.
Click to hide internal directories.