echox

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cache

func Cache(age time.Duration) echo.MiddlewareFunc

func ConfigValidator

func ConfigValidator(e *echo.Echo)

ConfigValidator enable echo use ext validation framework ref: https://github.com/go-playground/validator

func Dump

func Dump(filename ...string) echo.MiddlewareFunc

func HTTPErrorHandler

func HTTPErrorHandler(err error, c echo.Context)

func IntranetOnly added in v1.0.17

func IntranetOnly(next echo.HandlerFunc) echo.HandlerFunc

IntranetOnly middleware for only allow intranet access

func JWT

func JWT(key []byte, method *jwt.SigningMethodHMAC, skipper func(echo.Context) bool) echo.MiddlewareFunc

func NoCache

func NoCache(next echo.HandlerFunc) echo.HandlerFunc

func NoIndex

func NoIndex(next echo.HandlerFunc) echo.HandlerFunc

Types

type EchoValidator added in v1.0.11

type EchoValidator struct {
	Validator *validator.Validate
	// contains filtered or unexported fields
}

func (*EchoValidator) Bind added in v1.0.11

func (t *EchoValidator) Bind(i interface{}, c echo.Context) error

func (*EchoValidator) Validate added in v1.0.11

func (t *EchoValidator) Validate(i interface{}) error

type Timestamp

type Timestamp time.Time

func (*Timestamp) MarshalJSON

func (t *Timestamp) MarshalJSON() ([]byte, error)

MarshalJSON echo api json response

func (*Timestamp) Scan

func (t *Timestamp) Scan(src interface{}) error

read from database conversion

func (Timestamp) String

func (t Timestamp) String() string

for sql log, print readable format

func (*Timestamp) UnmarshalJSON

func (t *Timestamp) UnmarshalJSON(p []byte) error

func (*Timestamp) UnmarshalParam

func (t *Timestamp) UnmarshalParam(src string) error

UnmarshalParam echo api @see https://echo.labstack.com/guide/request

func (Timestamp) Value

func (t Timestamp) Value() (driver.Value, error)

insert into database conversion

Jump to

Keyboard shortcuts

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