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 Config ¶
Config returns an instance of config object with specified name.
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 Redis ¶
Redis returns an instance of redis client with specified configuration group name.
func Resource ¶
Resource returns an instance of Resource. The parameter <name> is the name for the instance.
func Server ¶
Server returns an instance of http server with specified name.
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 TCPServer ¶
TCPServer returns an instance of tcp server with specified name.
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.
func UDPServer ¶
UDPServer returns an instance of udp server with specified name.
func View ¶
View returns an instance of template engine object with specified name.
Types ¶
type ArrayAny ¶
type ArrayAny = []interface{}
type MapAnyAny ¶
type MapAnyAny = map[interface{}]interface{}
type SliceAny ¶
type SliceAny = []interface{}