list

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Before = "before"
	After  = "after"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LIndex

type LIndex struct {
	redis.BaseCmd
	// contains filtered or unexported fields
}

Returns an element from a list by its index. LINDEX key index https://redis.io/commands/lindex

func ParseLIndex

func ParseLIndex(b redis.BaseCmd) (LIndex, error)

func (LIndex) Run

func (cmd LIndex) Run(w redis.Writer, red redis.Redka) (any, error)

type LInsert

type LInsert struct {
	redis.BaseCmd
	// contains filtered or unexported fields
}

Inserts an element before or after another element in a list. LINSERT key <BEFORE | AFTER> pivot element https://redis.io/commands/linsert

func ParseLInsert

func ParseLInsert(b redis.BaseCmd) (LInsert, error)

func (LInsert) Run

func (cmd LInsert) Run(w redis.Writer, red redis.Redka) (any, error)

type LLen

type LLen struct {
	redis.BaseCmd
	// contains filtered or unexported fields
}

Returns the length of a list. LLEN key https://redis.io/commands/llen

func ParseLLen

func ParseLLen(b redis.BaseCmd) (LLen, error)

func (LLen) Run

func (cmd LLen) Run(w redis.Writer, red redis.Redka) (any, error)

type LPop

type LPop struct {
	redis.BaseCmd
	// contains filtered or unexported fields
}

Returns the first element of a list after removing it. LPOP key https://redis.io/commands/lpop

func ParseLPop

func ParseLPop(b redis.BaseCmd) (LPop, error)

func (LPop) Run

func (cmd LPop) Run(w redis.Writer, red redis.Redka) (any, error)

type LPush

type LPush struct {
	redis.BaseCmd
	// contains filtered or unexported fields
}

Prepends an element to a list. Creates the key if it doesn't exist. LPUSH key element https://redis.io/commands/lpush

func ParseLPush

func ParseLPush(b redis.BaseCmd) (LPush, error)

func (LPush) Run

func (cmd LPush) Run(w redis.Writer, red redis.Redka) (any, error)

type LRange

type LRange struct {
	redis.BaseCmd
	// contains filtered or unexported fields
}

Returns a range of elements from a list. LRANGE key start stop https://redis.io/commands/lrange

func ParseLRange

func ParseLRange(b redis.BaseCmd) (LRange, error)

func (LRange) Run

func (cmd LRange) Run(w redis.Writer, red redis.Redka) (any, error)

type LRem

type LRem struct {
	redis.BaseCmd
	// contains filtered or unexported fields
}

Removes elements from a list. LREM key count element https://redis.io/commands/lrem

func ParseLRem

func ParseLRem(b redis.BaseCmd) (LRem, error)

func (LRem) Run

func (cmd LRem) Run(w redis.Writer, red redis.Redka) (any, error)

type LSet

type LSet struct {
	redis.BaseCmd
	// contains filtered or unexported fields
}

Sets the value of an element in a list by its index. LSET key index element https://redis.io/commands/lset

func ParseLSet

func ParseLSet(b redis.BaseCmd) (LSet, error)

func (LSet) Run

func (cmd LSet) Run(w redis.Writer, red redis.Redka) (any, error)

type LTrim

type LTrim struct {
	redis.BaseCmd
	// contains filtered or unexported fields
}

Removes elements from both ends a list. LTRIM key start stop https://redis.io/commands/ltrim

func ParseLTrim

func ParseLTrim(b redis.BaseCmd) (LTrim, error)

func (LTrim) Run

func (cmd LTrim) Run(w redis.Writer, red redis.Redka) (any, error)

type RPop

type RPop struct {
	redis.BaseCmd
	// contains filtered or unexported fields
}

Returns the last element of a list after removing it. RPOP key https://redis.io/commands/rpop

func ParseRPop

func ParseRPop(b redis.BaseCmd) (RPop, error)

func (RPop) Run

func (cmd RPop) Run(w redis.Writer, red redis.Redka) (any, error)

type RPopLPush

type RPopLPush struct {
	redis.BaseCmd
	// contains filtered or unexported fields
}

Returns the last element of a list after removing and pushing it to another list. RPOPLPUSH source destination https://redis.io/commands/rpoplpush

func ParseRPopLPush

func ParseRPopLPush(b redis.BaseCmd) (RPopLPush, error)

func (RPopLPush) Run

func (cmd RPopLPush) Run(w redis.Writer, red redis.Redka) (any, error)

type RPush

type RPush struct {
	redis.BaseCmd
	// contains filtered or unexported fields
}

Appends an element to a list. Creates the key if it doesn't exist. RPUSH key element https://redis.io/commands/rpush

func ParseRPush

func ParseRPush(b redis.BaseCmd) (RPush, error)

func (RPush) Run

func (cmd RPush) Run(w redis.Writer, red redis.Redka) (any, error)

Jump to

Keyboard shortcuts

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