cache

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct{}

func NewCache

func NewCache() *Cache

func (*Cache) Get

func (c *Cache) Get(key string) (interface{}, bool)

func (*Cache) Set

func (c *Cache) Set(key string, value interface{}) bool

type Hash

type Hash struct{}

func NewHash

func NewHash() *Hash

func (*Hash) Get

func (h *Hash) Get(key string) (interface{}, bool)

func (*Hash) Key

func (h *Hash) Key(key string) string

func (*Hash) Set

func (h *Hash) Set(key string, value interface{}) bool

type List

type List struct{}

func NewList

func NewList() *List

func (*List) Get

func (l *List) Get(key string) ([]string, bool)

func (*List) Key

func (l *List) Key(key string) string

func (*List) Set

func (l *List) Set(key, value string) bool

type Score added in v0.3.2

type Score int64

func (Score) Less added in v0.3.2

func (this Score) Less(other interface{}) bool

type Set

type Set struct{}

func NewSet

func NewSet() *Set

func (*Set) Get

func (s *Set) Get(key string) ([]string, bool)

func (*Set) Key

func (s *Set) Key(key string) string

func (*Set) Set

func (s *Set) Set(key string, value string) bool

type String

type String struct{}

func NewString

func NewString() *String

func (*String) Get

func (s *String) Get(key string) (string, bool)

func (*String) Key

func (s *String) Key(key string) string

func (*String) Set

func (s *String) Set(key, value string) bool

type Zset added in v0.3.2

type Zset struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewZset added in v0.3.2

func NewZset() *Zset

func (*Zset) Get added in v0.3.2

func (z *Zset) Get(key string, start, end int) ([]string, bool)

func (*Zset) Key added in v0.3.2

func (z *Zset) Key(key string) string

func (*Zset) Len added in v0.3.2

func (z *Zset) Len(key string) (int, bool)

func (*Zset) Rank added in v0.3.2

func (z *Zset) Rank(key, value string) (int, bool)

func (*Zset) Set added in v0.3.2

func (z *Zset) Set(key string, value string, score int64) (int, bool)

Jump to

Keyboard shortcuts

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