context

package
v0.0.0-...-3b7be81 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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
	Config      *cfg.AppCfg
	HTTPServers map[string]*echo.Echo
	HTTPGroups  map[string]*echo.Group
}

func NewContext

func NewContext() *Context

func (*Context) GetDatabase

func (ctx *Context) GetDatabase() **sqlx.DB

func (*Context) GetHTTPGroup

func (ctx *Context) GetHTTPGroup(srvName, grName string) *echo.Group

func (*Context) GetHTTPServer

func (ctx *Context) GetHTTPServer(name string) *echo.Echo

func (*Context) GetMongoDB

func (ctx *Context) GetMongoDB() **mongo.Client

func (*Context) GetPackageLogger

func (ctx *Context) GetPackageLogger(emptyStruct interface{}) (log zerolog.Logger)

func (*Context) RegisterConfig

func (ctx *Context) RegisterConfig(config *cfg.AppCfg)

func (*Context) RegisterDatabase

func (ctx *Context) RegisterDatabase(db **sqlx.DB)

func (*Context) RegisterHTTPGroup

func (ctx *Context) RegisterHTTPGroup(srvName, grName string, gr *echo.Group)

func (*Context) RegisterHTTPServer

func (ctx *Context) RegisterHTTPServer(name string, srv *echo.Echo)

func (*Context) RegisterLogger

func (ctx *Context) RegisterLogger()

func (*Context) RegisterMongoDB

func (ctx *Context) RegisterMongoDB(mongodb **mongo.Client)

Jump to

Keyboard shortcuts

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