Version: v1.2.0 Latest Latest

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

Go to latest
Published: Aug 6, 2019 License: MIT Imports: 17 Imported by: 0




This section is empty.


This section is empty.


func HTTPErrorHandler

func HTTPErrorHandler(logger observance.Logger) 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.

func New

func New(logger observance.Logger, CORSOrigins string, timeout ...string) (*echo.Echo, chan struct{}, error)

New creates an echo server instance with the given logger, CORS middleware if CORSOrigins was supplied and optionally a timeout setting that is applied for read and write.


type Logger

type Logger struct {

Logger is a wrapper for the logrus fieldlogger that fulfills the echo logger interface

func (Logger) Debug

func (l Logger) Debug(i ...interface{})

Debug implements echo.Logger#Debug.

func (Logger) Debugf

func (l Logger) Debugf(format string, args ...interface{})

Debugf implements echo.Logger#Debugf.

func (Logger) Debugj

func (l Logger) Debugj(j log.JSON)

Debugj implements echo.Logger#Debugj.

func (Logger) Error

func (l Logger) Error(i ...interface{})

Error implements echo.Logger#Error.

func (Logger) Errorf

func (l Logger) Errorf(format string, args ...interface{})

Errorf implements echo.Logger#Errorf.

func (Logger) Errorj

func (l Logger) Errorj(j log.JSON)

Errorj implements echo.Logger#Errorj.

func (Logger) Fatal

func (l Logger) Fatal(i ...interface{})

Fatal implements echo.Logger#Fatal.

func (Logger) Fatalf

func (l Logger) Fatalf(format string, args ...interface{})

Fatalf implements echo.Logger#Fatalf.

func (Logger) Fatalj

func (l Logger) Fatalj(j log.JSON)

Fatalj implements echo.Logger#Fatalj.

func (Logger) Info

func (l Logger) Info(i ...interface{})

Info implements echo.Logger#Info.

func (Logger) Infof

func (l Logger) Infof(format string, args ...interface{})

Infof implements echo.Logger#Infof.

func (Logger) Infoj

func (l Logger) Infoj(j log.JSON)

Infoj implements echo.Logger#Infoj.

func (Logger) Level

func (l Logger) Level() log.Lvl

Level is NOT IMPLEMENTED, it is only present to fulfill the echo logger interface

func (Logger) Output

func (l Logger) Output() io.Writer

Output returns the default output.

func (Logger) Panic

func (l Logger) Panic(i ...interface{})

Panic implements echo.Logger#Panic.

func (Logger) Panicf

func (l Logger) Panicf(format string, args ...interface{})

Panicf implements echo.Logger#Panicf.

func (Logger) Panicj

func (l Logger) Panicj(j log.JSON)

Panicj implements echo.Logger#Panicj.

func (Logger) Prefix

func (l Logger) Prefix() string

Prefix is NOT IMPLEMENTED, it is only present to fulfill the echo logger interface

func (Logger) Print

func (l Logger) Print(i ...interface{})

Print implements echo.Logger#Print.

func (Logger) Printf

func (l Logger) Printf(format string, args ...interface{})

Printf implements echo.Logger#Printf.

func (Logger) Printj

func (l Logger) Printj(j log.JSON)

Printj implements echo.Logger#Printj.

func (Logger) SetHeader

func (l Logger) SetHeader(h string)

SetHeader is NOT IMPLEMENTED, it is only present to fulfill the echo logger interface

func (Logger) SetLevel

func (l Logger) SetLevel(v log.Lvl)

SetLevel is NOT IMPLEMENTED, it is only present to fulfill the echo logger interface

func (Logger) SetPrefix

func (l Logger) SetPrefix(p string)

SetPrefix is NOT IMPLEMENTED, it is only present to fulfill the echo logger interface

func (Logger) Warn

func (l Logger) Warn(i ...interface{})

Warn implements echo.Logger#Warn.

func (Logger) Warnf

func (l Logger) Warnf(format string, args ...interface{})

Warnf implements echo.Logger#Warnf.

func (Logger) Warnj

func (l Logger) Warnj(j log.JSON)

Warnj implements echo.Logger#Warnj.

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

func (*Validator) Validate

func (v *Validator) Validate(i interface{}) error

Validate performs validation of any data type which is mapped according to rules of the 3rd party validation library

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to