g

package
v0.0.11 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB *gorm.DB
)

Functions

func Cache added in v0.0.2

func Cache() *cache.CacheManager

Cache 获取全局缓存管理器

func Cfg

func Cfg() *configs.ConfigEntity

func Cron added in v0.0.3

func Cron() *cron.Cron

func GetCacheInstance added in v0.0.3

func GetCacheInstance() *cache.CacheManager

GetCacheInstance 返回 ConfigDataEntity 的单例实例

func Log

func Log(name ...string) zlog.Logger

func RedisDB added in v0.0.3

func RedisDB() *redisdb.RedisManager

RedisDB 获取redis实例

func Try added in v0.0.3

func Try(ctx context.Context, try func(ctx context.Context)) (err error)

Try implements try... logistics using internal panic...recover. It returns error if any exception occurs, or else it returns nil.

func TryCatch added in v0.0.3

func TryCatch(ctx context.Context, try func(ctx context.Context), catch func(ctx context.Context, exception error))

TryCatch implements try...catch... logistics using internal panic...recover. It automatically calls function `catch` if any exception occurs and passes the exception as an error.

But, note that, if function `catch` also throws panic, the current goroutine will panic.

func Validator

func Validator() *valid.Validator

Types

type Array added in v0.0.2

type Array = []interface{} // Array is alias of frequently-used slice type []interface{}.

type ArrayAny added in v0.0.2

type ArrayAny = []interface{} // ArrayAny is alias of frequently-used slice type []interface{}.

type ArrayInt added in v0.0.2

type ArrayInt = []int // ArrayInt is alias of frequently-used slice type []int.

type ArrayStr added in v0.0.2

type ArrayStr = []string // ArrayStr is alias of frequently-used slice type []string.

type List added in v0.0.2

type List = []Map // List is alias of frequently-used slice type []Map.

type ListAnyAny added in v0.0.2

type ListAnyAny = []MapAnyAny // ListAnyAny is alias of frequently-used slice type []MapAnyAny.

type ListAnyBool added in v0.0.2

type ListAnyBool = []MapAnyBool // ListAnyBool is alias of frequently-used slice type []MapAnyBool.

type ListAnyInt added in v0.0.2

type ListAnyInt = []MapAnyInt // ListAnyInt is alias of frequently-used slice type []MapAnyInt.

type ListAnyStr added in v0.0.2

type ListAnyStr = []MapAnyStr // ListAnyStr is alias of frequently-used slice type []MapAnyStr.

type ListIntAny added in v0.0.2

type ListIntAny = []MapIntAny // ListIntAny is alias of frequently-used slice type []MapIntAny.

type ListIntBool added in v0.0.2

type ListIntBool = []MapIntBool // ListIntBool is alias of frequently-used slice type []MapIntBool.

type ListIntInt added in v0.0.2

type ListIntInt = []MapIntInt // ListIntInt is alias of frequently-used slice type []MapIntInt.

type ListIntStr added in v0.0.2

type ListIntStr = []MapIntStr // ListIntStr is alias of frequently-used slice type []MapIntStr.

type ListStrAny added in v0.0.2

type ListStrAny = []MapStrAny // ListStrAny is alias of frequently-used slice type []MapStrAny.

type ListStrBool added in v0.0.2

type ListStrBool = []MapStrBool // ListStrBool is alias of frequently-used slice type []MapStrBool.

type ListStrInt added in v0.0.2

type ListStrInt = []MapStrInt // ListStrInt is alias of frequently-used slice type []MapStrInt.

type ListStrStr added in v0.0.2

type ListStrStr = []MapStrStr // ListStrStr is alias of frequently-used slice type []MapStrStr.

type Map added in v0.0.2

type Map = map[string]interface{} // Map is alias of frequently-used map type map[string]interface{}.

type MapAnyAny added in v0.0.2

type MapAnyAny = map[interface{}]interface{} // MapAnyAny is alias of frequently-used map type map[interface{}]interface{}.

type MapAnyBool added in v0.0.2

type MapAnyBool = map[interface{}]bool // MapAnyBool is alias of frequently-used map type map[interface{}]bool.

type MapAnyInt added in v0.0.2

type MapAnyInt = map[interface{}]int // MapAnyInt is alias of frequently-used map type map[interface{}]int.

type MapAnyStr added in v0.0.2

type MapAnyStr = map[interface{}]string // MapAnyStr is alias of frequently-used map type map[interface{}]string.

type MapIntAny added in v0.0.2

type MapIntAny = map[int]interface{} // MapIntAny is alias of frequently-used map type map[int]interface{}.

type MapIntBool added in v0.0.2

type MapIntBool = map[int]bool // MapIntBool is alias of frequently-used map type map[int]bool.

type MapIntInt added in v0.0.2

type MapIntInt = map[int]int // MapIntInt is alias of frequently-used map type map[int]int.

type MapIntStr added in v0.0.2

type MapIntStr = map[int]string // MapIntStr is alias of frequently-used map type map[int]string.

type MapStrAny added in v0.0.2

type MapStrAny = map[string]interface{} // MapStrAny is alias of frequently-used map type map[string]interface{}.

type MapStrBool added in v0.0.2

type MapStrBool = map[string]bool // MapStrBool is alias of frequently-used map type map[string]bool.

type MapStrInt added in v0.0.2

type MapStrInt = map[string]int // MapStrInt is alias of frequently-used map type map[string]int.

type MapStrStr added in v0.0.2

type MapStrStr = map[string]string // MapStrStr is alias of frequently-used map type map[string]string.

type Meta

type Meta = meta.Meta

type Slice added in v0.0.2

type Slice = []interface{} // Slice is alias of frequently-used slice type []interface{}.

type SliceAny added in v0.0.2

type SliceAny = []interface{} // SliceAny is alias of frequently-used slice type []interface{}.

type SliceInt added in v0.0.2

type SliceInt = []int // SliceInt is alias of frequently-used slice type []int.

type SliceStr added in v0.0.2

type SliceStr = []string // SliceStr is alias of frequently-used slice type []string.

Jump to

Keyboard shortcuts

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