storage

package
v0.0.0-...-a96ba29 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const NotFound = "storage: not found"

Variables

This section is empty.

Functions

func AutoMigrateDB

func AutoMigrateDB()

func ConnectCache

func ConnectCache()

func ConnectDB

func ConnectDB()

Types

type MemoryStorage

type MemoryStorage interface {
	Get(key string) (string, error)
	GetInt(key string) (int, error)
	GetBytes(key string) ([]byte, error)
	Set(key string, value interface{}, exp time.Duration) error
	IncrBy(key string, value int64) error
	Delete(key string) error
	Reset() error
	Close() error
}
var (
	DB    *gorm.DB
	Cache MemoryStorage
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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