Documentation
¶
Index ¶
- type Context
- func (ctx *Context) GetDatabase() **sqlx.DB
- func (ctx *Context) GetElasticDB() **elasticsearch.Client
- func (ctx *Context) GetHTTPGroup(srvName, grName string) *echo.Group
- func (ctx *Context) GetHTTPServer(name string) *echo.Echo
- func (ctx *Context) GetMongoDB() **mongo.Client
- func (ctx *Context) GetPackageLogger(emptyStruct interface{}) (log zerolog.Logger)
- func (ctx *Context) RegisterConfig(config *cfg.AppCfg)
- func (ctx *Context) RegisterDatabase(db **sqlx.DB)
- func (ctx *Context) RegisterElasticDB(db **elasticsearch.Client)
- func (ctx *Context) RegisterHTTPGroup(srvName, grName string, gr *echo.Group)
- func (ctx *Context) RegisterHTTPServer(name string, srv *echo.Echo)
- func (ctx *Context) RegisterLogger()
- func (ctx *Context) RegisterMongoDB(mongodb **mongo.Client)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Log zerolog.Logger DB **sqlx.DB MongoDB **mongo.Client ElasticDB **elasticsearch.Client Config *cfg.AppCfg HTTPServers map[string]*echo.Echo HTTPGroups map[string]*echo.Group }
func NewContext ¶
func NewContext() *Context
func (*Context) GetDatabase ¶
func (*Context) GetElasticDB ¶
func (ctx *Context) GetElasticDB() **elasticsearch.Client
func (*Context) GetHTTPGroup ¶
func (*Context) GetHTTPServer ¶
func (*Context) GetMongoDB ¶
func (*Context) GetPackageLogger ¶
func (*Context) RegisterConfig ¶
func (*Context) RegisterDatabase ¶
func (*Context) RegisterElasticDB ¶
func (ctx *Context) RegisterElasticDB(db **elasticsearch.Client)
func (*Context) RegisterHTTPGroup ¶
func (*Context) RegisterHTTPServer ¶
func (*Context) RegisterLogger ¶
func (ctx *Context) RegisterLogger()
func (*Context) RegisterMongoDB ¶
Click to show internal directories.
Click to hide internal directories.