Versions in this module Expand all Collapse all v0 v0.3.0 Sep 26, 2021 v0.2.1 Sep 15, 2021 v0.2.0 Sep 15, 2021 Changes in this version + var ErrUnsupported = errors.New("Checker not support this type") + func Check(v interface{}) error + func NewCustomHTTPErrorHandler(e *echo.Echo, logf Logf) echo.HTTPErrorHandler + func NewCustomValidator() echo.Validator + type App struct + func New(config Config) *App + func (a *App) Context() Context + func (a *App) Logf(format string, args ...interface{}) + func (a *App) Migrate(migrators ...Migrator) + func (a *App) RegisterModules(modules ...Module) + func (a *App) Start() func() + type BizErr struct + Type ErrType + func NewBadArgs(code string, cause error) BizErr + func NewSrvErr(code string, cause error) BizErr + func (be BizErr) Caller() (file string, line int, fn string) + func (be BizErr) Error() string + func (be BizErr) Is(err error) bool + func (be BizErr) Unwrap() error + type Checker interface + Check func(v interface{}) error + func NewChecker(ruleTagName, titleTagName string, errorMsgMap map[string]string) Checker + type Config struct + APIAddr string + EnableDBLog bool + Log Log + MysqlDSN string + Redis Redis + func MustLoadConfig(fn string) Config + type Context interface + GET func(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) + GetDB func() *gorm.DB + GetRedis func() *redis.Client + Logf func(format string, args ...interface{}) + POST func(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) + Provide func(id string, obj interface{}) + Publish func(topic string, payload string) + RegisterShutdown func(hook OnShutdown) + Schedule func(expr string, job Job) + Subscribe func(topic string, cb func(string)) + Take func(id string) interface{} + Use func(middlewares ...echo.MiddlewareFunc) + type ErrType int + const BadArgs + const SrvErr + type ErrorArray []ErrorData + func (eArr ErrorArray) Error() string + type ErrorData struct + Errors []string + Field string + Title string + type FineErr struct + Caller string + Code int + Message string + func NewFineErr(code int, message string) *FineErr + func TraceError(err error) *FineErr + func (fe *FineErr) Error() string + func (fe *FineErr) SetError(err error) *FineErr + type Job func(context.Context) error + type Log struct + Compress bool + Level string + MaxAge int + MaxBackups int + MaxSize int + Output string + type Logf func(format string, args ...interface{}) + type Migrator func(db *gorm.DB) error + type Module interface + Init func(ac Context) + func Provide(id string, obj interface{}) Module + type ModuleFunc func(ac Context) + func (mf ModuleFunc) Init(ac Context) + type OnShutdown func() + type PubSub interface + Close func() + Publish func(topic string, payload string) + Subscribe func(topic string, cb func(string)) + type Redis struct + Addr string + DB int + Password string v0.1.2 Aug 26, 2021 v0.1.1 Aug 25, 2021 v0.1.0 Aug 25, 2021