Documentation ¶
Index ¶
- func Cfg(name ...string) *gcfg.Config
- func Config(name ...string) *gcfg.Config
- func DB(name ...string) gdb.DB
- func Database(name ...string) gdb.DB
- func Dump(i ...interface{})
- func Export(i ...interface{}) string
- func GetLogLevel() int
- func I18n(name ...string) *gi18n.Manager
- func IsEmpty(value interface{}) bool
- func Redis(name ...string) *gredis.Redis
- func Res(name ...string) *gres.Resource
- func Resource(name ...string) *gres.Resource
- func Server(name ...interface{}) *ghttp.Server
- func SetDebug(debug bool)
- func SetLogLevel(level int)
- func SetServerGraceful(enabled bool)
- func TCPServer(name ...interface{}) *gtcp.Server
- func Throw(exception interface{})
- func TryCatch(try func(), catch ...func(exception interface{}))
- func UDPServer(name ...interface{}) *gudp.Server
- func View(name ...string) *gview.View
- func Wait()
- type Array
- type ArrayAny
- type ArrayInt
- type ArrayStr
- type List
- 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 Slice
- type SliceAny
- type SliceInt
- type SliceStr
- type Var
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Database ¶
Database returns an instance of database ORM object with specified configuration group name.
func Dump ¶
func Dump(i ...interface{})
Dump dumps a variable to stdout with more manually readable.
func Export ¶
func Export(i ...interface{}) string
Export exports a variable to string with more manually readable.
func I18n ¶
I18n returns an instance of gi18n.Manager. The parameter <name> is the name for the instance.
func IsEmpty ¶
func IsEmpty(value interface{}) bool
IsEmpty checks given value empty or not. It returns false if value is: integer(0), bool(false), slice/map(len=0), nil; or else true.
func Resource ¶
Resource returns an instance of Resource. The parameter <name> is the name for the instance.
func SetDebug ¶
func SetDebug(debug bool)
SetDebug disables/enables debug level for logging component globally.
func SetServerGraceful ¶
func SetServerGraceful(enabled bool)
SetServerGraceful enables/disables graceful reload feature of http Web Server. This feature is disabled in default.
func Throw ¶
func Throw(exception interface{})
Throw throws a exception, which can be caught by TryCatch function. It always be used in TryCatch function.
func TryCatch ¶
func TryCatch(try func(), catch ...func(exception interface{}))
TryCatch does the try...catch... mechanism.
Types ¶
type ListAnyBool ¶
type ListAnyBool = []map[interface{}]bool
type ListAnyInt ¶
type ListAnyInt = []map[interface{}]int
type ListAnyStr ¶
type ListAnyStr = []map[interface{}]string
type ListIntAny ¶
type ListIntAny = []map[int]interface{}
type ListIntBool ¶
type ListIntInt ¶
type ListIntStr ¶
type ListStrAny ¶
type ListStrAny = []map[string]interface{}
type ListStrBool ¶
type ListStrInt ¶
type ListStrStr ¶
type MapAnyBool ¶
type MapAnyBool = map[interface{}]bool