Documentation ¶
Index ¶
- Variables
- type List
- func (l *List) LPeek(key string) (item []byte, err error)
- func (l *List) LPop(key string) (item []byte, err error)
- func (l *List) LPush(key string, values ...[]byte) (size int, err error)
- func (l *List) LRange(key string, start, end int) (list [][]byte, err error)
- func (l *List) LRem(key string, count int, value []byte) (int, error)
- func (l *List) LRemNum(key string, count int, value []byte) (int, error)
- func (l *List) LSet(key string, index int, value []byte) error
- func (l *List) Ltrim(key string, start, end int) error
- func (l *List) RPeek(key string) (item []byte, size int, err error)
- func (l *List) RPop(key string) (item []byte, err error)
- func (l *List) RPush(key string, values ...[]byte) (size int, err error)
- func (l *List) Size(key string) (int, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrListNotFound is returned when the list not found. ErrListNotFound = errors.New("the list not found") // ErrIndexOutOfRange is returned when use LSet function set index out of range. ErrIndexOutOfRange = errors.New("index out of range") //ErrCount is returned when count is error. ErrCount = errors.New("err count") )
Functions ¶
This section is empty.
Types ¶
type List ¶
List represents the list.
func New ¶
func New() *List
New returns returns a newly initialized List Object that implements the List.
func (*List) LRem ¶
LRem removes the first count occurrences of elements equal to value from the list stored at key. The count argument influences the operation in the following ways: count > 0: Remove elements equal to value moving from head to tail. count < 0: Remove elements equal to value moving from tail to head. count = 0: Remove all elements equal to value.
func (*List) Ltrim ¶
Ltrim trim an existing list so that it will contain only the specified range of elements specified.
Click to show internal directories.
Click to hide internal directories.