general_store

package
v0.0.21 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GeneralStore

type GeneralStore[T interface{}] struct {
	store.BaseStore
}

func (*GeneralStore[T]) CheckGet

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

func (*GeneralStore[T]) Del

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

func (*GeneralStore[T]) Get

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

func (*GeneralStore[T]) Set

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

type IGeneralStore

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

func New

func New[T interface{}](cache cache.Cache) (IGeneralStore[T], error)

Jump to

Keyboard shortcuts

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