g

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cfg

func Cfg(name ...string) *gcfg.Config

Cfg is alias of Config. See Config.

func Client

func Client() *ghttp.Client

Client is a convenience function, that creates and returns a new HTTP client.

func Config

func Config(name ...string) *gcfg.Config

Config returns an instance of config object with specified name.

func DB

func DB(name ...string) gdb.DB

DB is alias of Database. See Database.

func Database

func Database(name ...string) gdb.DB

Database returns an instance of database ORM object with specified configuration group name.

func I18n

func I18n(name ...string) *gi18n.Manager

I18n returns an instance of gi18n.Manager. The parameter <name> is the name for the instance.

func Log

func Log(name ...string) *glog.Logger

Log returns an instance of glog.Logger. The parameter <name> is the name for the instance.

func Model

func Model(tables string, db ...string) *gdb.Model

Model creates and returns a model from specified database or default database configuration. The optional parameter <db> specifies the configuration group name of the database, which is "default" in default.

func Redis

func Redis(name ...string) *gredis.Redis

Redis returns an instance of redis client with specified configuration group name.

func Res

func Res(name ...string) *gres.Resource

Res is alias of Resource. See Resource.

func Resource

func Resource(name ...string) *gres.Resource

Resource returns an instance of Resource. The parameter <name> is the name for the instance.

func Server

func Server(name ...interface{}) *ghttp.Server

Server returns an instance of http server with specified name.

func TCPServer

func TCPServer(name ...interface{}) *gtcp.Server

TCPServer returns an instance of tcp server with specified name.

func Table

func Table(tables string, db ...string) *gdb.Model

Table is alias of Model.

func UDPServer

func UDPServer(name ...interface{}) *gudp.Server

UDPServer returns an instance of udp server with specified name.

func View

func View(name ...string) *gview.View

View returns an instance of template engine object with specified name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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