gormup

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyFetched = errors.New("already fetched")
View Source
var ErrNotChanged = errors.New("not changed")

Functions

func Register

func Register(db *gorm.DB, cfg Config)

func WithoutQueryCache

func WithoutQueryCache(db *gorm.DB) *gorm.DB

func WithoutReduceUpdate

func WithoutReduceUpdate(db *gorm.DB) *gorm.DB

Types

type Config

type Config struct {
	Store               Store
	WithoutQueryCache   bool
	WithoutReduceUpdate bool
}

type Store

type Store interface {
	Set(ctx context.Context, key string, val any)
	Get(ctx context.Context, key string) (any, bool)
	Delete(ctx context.Context, key string)
}

func NewStore

func NewStore() Store

Jump to

Keyboard shortcuts

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