server

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: MIT Imports: 9 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)

Start starts echo server

Types

type Config

type Config struct {
	Port                string
	ReadTimeoutSeconds  int
	WriteTimeoutSeconds int
	Debug               bool
}

Config represents server specific config

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

Jump to

Keyboard shortcuts

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