general_scope

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GeneralScopeStore

type GeneralScopeStore[T interface{}] struct {
	scope.ScopeBaseStore
}

func (*GeneralScopeStore[T]) CheckGet

func (s *GeneralScopeStore[T]) CheckGet(key, scope string) (*T, error)

func (*GeneralScopeStore[T]) Del

func (s *GeneralScopeStore[T]) Del(key, scope string) (int64, error)

func (*GeneralScopeStore[T]) Get

func (s *GeneralScopeStore[T]) Get(key, scope string) (*T, error)

func (*GeneralScopeStore[T]) Set

func (s *GeneralScopeStore[T]) Set(key, scope string, m *T) error

type IGeneralScopeStore

type IGeneralScopeStore[T interface{}] interface {
	Set(key, scope string, m *T) error
	Get(key, scope string) (*T, error)
	Del(key, scope string) (int64, error)
	Exists(key, scope string) (bool, error)
	CheckGet(key, scope string) (*T, error)
}

func New

func New[T interface{}](cache cache.Cache, keyFunc scope.KeyFunc) (IGeneralScopeStore[T], error)

func NewWithTTL

func NewWithTTL[T interface{}](cache cache.Cache, keyFunc scope.KeyFunc, ttl time.Duration) (IGeneralScopeStore[T], error)

Jump to

Keyboard shortcuts

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