store

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrContextNotFoundCache 上下文不存在Cache错误
	ErrContextNotFoundCache = errors.New("上下文中没有获取到Cache")
)

Functions

func ExpressionByCache added in v0.4.0

func ExpressionByCache(ctx context.Context, cacheKey string, expression *gorm.DB, values interface{}) (err error)

ExpressionByCache ...

func ExpressionByCacheCode added in v0.4.0

func ExpressionByCacheCode(ctx context.Context, cacheKey string, expression *gorm.DB) (items []*model.CacheCodePrimaryKey, err error)

ExpressionByCacheCode ...

func ExpressionByCacheID added in v0.4.0

func ExpressionByCacheID(ctx context.Context, cacheKey string, expression *gorm.DB) (items []*model.CacheIDPrimaryKey, err error)

ExpressionByCacheID ...

func FromCacheContext

func FromCacheContext(ctx context.Context) (sdkCache.Cacher, error)

FromCacheContext 从缓存上下文中获取缓存对象

func FromSkipCacheContext

func FromSkipCacheContext(ctx context.Context) (skip bool)

FromSkipCacheContext 从上下文中获取跳过缓存变量

func NewCacheContext

func NewCacheContext(ctx context.Context, cache sdkCache.Cacher) context.Context

NewCacheContext 创建缓存对象到上下文中

func NewSkipCacheContext

func NewSkipCacheContext(ctx context.Context, skip ...bool) context.Context

NewSkipCacheContext 创建跳过缓存到上下文

func ScanByCacheCode

func ScanByCacheCode(ctx context.Context, cacheKey string, table interface{}, query interface{}, args ...interface{}) (items []*model.CacheCodePrimaryKey, err error)

ScanByCacheCode ...

func ScanByCacheID

func ScanByCacheID(ctx context.Context, cacheKey string, table interface{}, query interface{}, args ...interface{}) (items []*model.CacheIDPrimaryKey, err error)

ScanByCacheID ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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