cache

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2022 License: Apache-2.0 Imports: 4 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) (map[string]interface{}, bool)

func (*Hash) Key

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

func (*Hash) Set

func (h *Hash) Set(key string, value map[string]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) Push

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

func (*List) Set

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

type Set

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

func NewSet

func NewSet() *Set

func (*Set) Get

func (s *Set) Get(key string) (map[string]struct{}, bool)

func (*Set) Key

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

func (*Set) Push

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

func (*Set) Set

func (s *Set) Set(key string, value map[string]struct{}) 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

Jump to

Keyboard shortcuts

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