ds

package
v1.10.4 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCorruptedData = errors.New("corrupted data")
)

Functions

This section is empty.

Types

type Key added in v1.10.0

type Key struct {
	Name       string
	Expiration int64
}

func DecodeKey added in v1.10.3

func DecodeKey(b []byte) (*Key, error)

Decode decodes the key.

func NewKey added in v1.10.0

func NewKey(name string, expiration int64) *Key

NewKey returns a new key.

func (*Key) Encode added in v1.10.3

func (k *Key) Encode() []byte

Encode encodes the key.

type Value added in v1.6.0

type Value interface {
	Type() ValueType
	GetValue() []byte
}

type ValueType added in v1.6.0

type ValueType uint8
const (
	// 0 => none, (key didn't exist)
	// 1 => string,
	// 2 => set,
	// 3 => list,
	// 4 => zset,
	// 5 => hash
	// 6 => stream
	None ValueType = iota
	String
	Set
	List
	ZSet
	Hash
)

func StringToDataType added in v1.6.0

func StringToDataType(s string) ValueType

func (ValueType) String added in v1.6.0

func (d ValueType) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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