server

package
v0.0.0-...-a6ef0dd Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *echo.Echo

New instantates new Echo server

func Start

func Start(e *echo.Echo, cfg *config.Server)

Start starts echo server

Types

type CustomBinder

type CustomBinder struct {
	// contains filtered or unexported fields
}

CustomBinder struct

func NewBinder

func NewBinder() *CustomBinder

NewBinder initializes custom server binder

func (*CustomBinder) Bind

func (cb *CustomBinder) Bind(i interface{}, c echo.Context) error

Bind tries to bind request into interface, and if it does then validate it

type CustomValidator

type CustomValidator struct {
	V *validator.Validate
}

CustomValidator holds custom validator

func (*CustomValidator) Validate

func (cv *CustomValidator) Validate(i interface{}) error

Validate validates the request

type TemplateRenderer

type TemplateRenderer struct {
	// contains filtered or unexported fields
}

func (*TemplateRenderer) Render

func (t *TemplateRenderer) Render(w io.Writer, name string, data interface{}, c echo.Context) error

Jump to

Keyboard shortcuts

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