Documentation
¶
Index ¶
- Variables
- func CreateAndLoadDotEnv(envfile string, configs []*AppCfg) error
- func HTTPError(err error) *echo.HTTPError
- type AppCfg
- type AppCfgAnnotation
- type AppCfgTmplData
- type EchoLogrus
- func (l *EchoLogrus) Debugj(j log.JSON)
- func (l *EchoLogrus) Errorj(j log.JSON)
- func (l *EchoLogrus) Fatalj(j log.JSON)
- func (l *EchoLogrus) Infoj(j log.JSON)
- func (l *EchoLogrus) Level() log.Lvl
- func (l *EchoLogrus) Output() io.Writer
- func (l *EchoLogrus) Panicj(j log.JSON)
- func (l *EchoLogrus) Prefix() string
- func (l *EchoLogrus) Printj(j log.JSON)
- func (l *EchoLogrus) SetHeader(string)
- func (l *EchoLogrus) SetLevel(lvl log.Lvl)
- func (l *EchoLogrus) SetPrefix(prefix string)
- func (l *EchoLogrus) Warnj(j log.JSON)
- type Error
- type Field
- type HealthCheck
- type Router
- type Routers
- type Server
- type SetRouteFn
- type ValidErr
Constants ¶
This section is empty.
Variables ¶
View Source
var HealthStatusOK = "OK"
HealthStatusOK is health status ok
View Source
var Stdout io.Writer = os.Stdout
Stdout standard output
Functions ¶
func CreateAndLoadDotEnv ¶
CreateAndLoadDotEnv to create and load envfile
Types ¶
type AppCfgAnnotation ¶
type AppCfgAnnotation struct {
TagName string // By default is `@app-cfg`
Template string // By default defined in defaultCfgTemplate variable
Target string // By default is `cmd/PROJECT_NAME/cfg_annotated.go`
DotEnv bool // If true then create and load “.env`
}
AppCfgAnnotation handle @app-cfg annotation e.g. `@app-cfg (prefix: "PREFIX" ctor_name:"CTOR")`
func (*AppCfgAnnotation) Annotate ¶
func (m *AppCfgAnnotation) Annotate(c *typannot.Context) error
Annotate AppCfg to prepare dependency-injection and env-file
func (*AppCfgAnnotation) CreateConfigs ¶
func (m *AppCfgAnnotation) CreateConfigs(c *typannot.Context) []*AppCfg
CreateConfigs create configs
type AppCfgTmplData ¶
AppCfgTmplData template
type EchoLogrus ¶
EchoLogrus is implementation of echo Logger
func WrapLogrus ¶
func WrapLogrus(logger *logrus.Logger) *EchoLogrus
WrapLogrus logrus logger in echo log interface
func (*EchoLogrus) SetHeader ¶
func (l *EchoLogrus) SetHeader(string)
SetHeader to set header (NOT SUPPORTED)
func (*EchoLogrus) SetLevel ¶
func (l *EchoLogrus) SetLevel(lvl log.Lvl)
SetLevel set level to logger from given log.Lvl
func (*EchoLogrus) SetPrefix ¶
func (l *EchoLogrus) SetPrefix(prefix string)
SetPrefix to set prefix
type HealthCheck ¶
HealthCheck to handle health-check
type Server ¶
type Server interface {
CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
Any(path string, handler echo.HandlerFunc, middleware ...echo.MiddlewareFunc) []*echo.Route
Add(method, path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
Match(methods []string, path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) []*echo.Route
Group(prefix string, m ...echo.MiddlewareFunc) *echo.Group
Use(m ...echo.MiddlewareFunc)
}
Server interface for echo.Echo and echo.Group
Click to show internal directories.
Click to hide internal directories.