Documentation ¶
Index ¶
- Variables
- func Cache() *cache.CacheManager
- func Cfg() *configs.ConfigEntity
- func Cron() *cron.Cron
- func GetCacheInstance() *cache.CacheManager
- func Log(name ...string) zlog.Logger
- func RedisDB() *redisdb.RedisManager
- func Try(ctx context.Context, try func(ctx context.Context)) (err error)
- func TryCatch(ctx context.Context, try func(ctx context.Context), ...)
- func Validator() *valid.Validator
- type Array
- type ArrayAny
- type ArrayInt
- type ArrayStr
- type List
- type ListAnyAny
- type ListAnyBool
- type ListAnyInt
- type ListAnyStr
- type ListIntAny
- type ListIntBool
- type ListIntInt
- type ListIntStr
- type ListStrAny
- type ListStrBool
- type ListStrInt
- type ListStrStr
- type Map
- type MapAnyAny
- type MapAnyBool
- type MapAnyInt
- type MapAnyStr
- type MapIntAny
- type MapIntBool
- type MapIntInt
- type MapIntStr
- type MapStrAny
- type MapStrBool
- type MapStrInt
- type MapStrStr
- type Meta
- type Slice
- type SliceAny
- type SliceInt
- type SliceStr
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DB *gorm.DB
)
Functions ¶
func Cfg ¶
func Cfg() *configs.ConfigEntity
func GetCacheInstance ¶ added in v0.0.3
func GetCacheInstance() *cache.CacheManager
GetCacheInstance 返回 ConfigDataEntity 的单例实例
func Try ¶ added in v0.0.3
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.
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 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 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 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{}.
Click to show internal directories.
Click to hide internal directories.