freecache

package
v0.0.0-...-d5480cd Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

type Bool bool

type CacheInterface

type CacheInterface interface {
	Get(key string, valStruct interface{}) interface{}
	Set(key string, value interface{}) error
	Verify(key string, value interface{}, valStruct interface{}) bool
	Del(key string) bool
	Clear()
}

type StoreDefault

type StoreDefault struct {
	Expiration int
	PreKey     string
}

func GetStoreDefault

func GetStoreDefault() *StoreDefault

func (*StoreDefault) Clear

func (sd *StoreDefault) Clear()

func (*StoreDefault) Del

func (sd *StoreDefault) Del(key string) bool

func (*StoreDefault) Get

func (sd *StoreDefault) Get(key string, valStruct interface{}) interface{}

通用方法区

func (*StoreDefault) Set

func (sd *StoreDefault) Set(key string, value interface{}) error

func (*StoreDefault) Verify

func (sd *StoreDefault) Verify(key string, value interface{}, valStruct interface{}) bool

type StoreJWT

type StoreJWT struct {
	Expiration int
	PreKey     string
	Context    context.Context
}

func GetStoreJWT

func GetStoreJWT() *StoreJWT

func (*StoreJWT) Del

func (sj *StoreJWT) Del(key string) error

func (*StoreJWT) Get

func (sj *StoreJWT) Get(key string, clear bool) string

func (*StoreJWT) Set

func (sj *StoreJWT) Set(key string, value string) error

func (*StoreJWT) UseWithCtx

func (sj *StoreJWT) UseWithCtx(ctx context.Context) *StoreJWT

func (*StoreJWT) Verify

func (sj *StoreJWT) Verify(key string, answer string, clear bool) bool

type String

type String string

Jump to

Keyboard shortcuts

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