Documentation ¶
Index ¶
- func HTTPErrorHandler(obs *observance.Obs) func(err error, c echo.Context)
- func New(obs *observance.Obs, CORSOrigins string, timeout ...string) (*echo.Echo, chan struct{}, error)
- type Logger
- func (l Logger) Debug(i ...interface{})
- func (l Logger) Debugf(format string, args ...interface{})
- func (l Logger) Debugj(j log.JSON)
- func (l Logger) Error(i ...interface{})
- func (l Logger) Errorf(format string, args ...interface{})
- func (l Logger) Errorj(j log.JSON)
- func (l Logger) Fatal(i ...interface{})
- func (l Logger) Fatalf(format string, args ...interface{})
- func (l Logger) Fatalj(j log.JSON)
- func (l Logger) Info(i ...interface{})
- func (l Logger) Infof(format string, args ...interface{})
- func (l Logger) Infoj(j log.JSON)
- func (l Logger) Level() log.Lvl
- func (l Logger) Output() io.Writer
- func (l Logger) Panic(i ...interface{})
- func (l Logger) Panicf(format string, args ...interface{})
- func (l Logger) Panicj(j log.JSON)
- func (l Logger) Prefix() string
- func (l Logger) Print(i ...interface{})
- func (l Logger) Printf(format string, args ...interface{})
- func (l Logger) Printj(j log.JSON)
- func (l Logger) SetHeader(h string)
- func (l Logger) SetLevel(v log.Lvl)
- func (l Logger) SetPrefix(p string)
- func (l Logger) Warn(i ...interface{})
- func (l Logger) Warnf(format string, args ...interface{})
- func (l Logger) Warnj(j log.JSON)
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPErrorHandler ¶
func HTTPErrorHandler(obs *observance.Obs) func(err error, c echo.Context)
HTTPErrorHandler retruns an error handler that can be used in echo to overwrite the default Echo error handler. It can send responses for echo.HTTPError, htttperrors.HTTPError and standard errors. Standard errors also get logged.
Types ¶
type Logger ¶
type Logger struct {
observance.Logger
}
Logger is a wrapper for the logrus fieldlogger that fulfills the echo logger interface
func (Logger) Level ¶
Level is NOT IMPLEMENTED, it is only present to fulfill the echo logger interface
func (Logger) Prefix ¶
Prefix is NOT IMPLEMENTED, it is only present to fulfill the echo logger interface
func (Logger) SetHeader ¶
SetHeader is NOT IMPLEMENTED, it is only present to fulfill the echo logger interface
func (Logger) SetLevel ¶
SetLevel is NOT IMPLEMENTED, it is only present to fulfill the echo logger interface
func (Logger) SetPrefix ¶
SetPrefix is NOT IMPLEMENTED, it is only present to fulfill the echo logger interface
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator points to 3rd party validator package (library) which actually does the real validation
func NewValidator ¶
func NewValidator() *Validator
NewValidator creates new instance of the go-playground/validator