beego

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitCTL

func InitCTL(conf *Config)

Types

type CTL

type CTL struct {
	Config *Config
	Cache  cache.Cache
}
var Ctl *CTL

func (*CTL) ClearAll

func (bc *CTL) ClearAll() error

func (*CTL) Decr

func (bc *CTL) Decr(k string) error

func (*CTL) Delete

func (bc *CTL) Delete(k string) error

func (*CTL) Get

func (bc *CTL) Get(k string) interface{}

func (*CTL) GetMulti

func (bc *CTL) GetMulti(keys []string) interface{}

func (*CTL) IsExist

func (bc *CTL) IsExist(k string) bool

func (*CTL) Put

func (bc *CTL) Put(k string, v interface{}, d time.Duration) error

type Config

type Config struct {
	Name   string            `json:"name" yaml:"name"`     // 缓存名
	Config map[string]string `json:"config" json:"config"` // 配置信息
}

func (*Config) ConfigJson

func (conf *Config) ConfigJson() string

获取配置信息

func (*Config) Format

func (conf *Config) Format() string

配置信息格式化

func (*Config) NewBeegoCache

func (conf *Config) NewBeegoCache() cache.Cache

初始化beego缓存

Jump to

Keyboard shortcuts

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