server

package
v0.0.0-...-7f74711 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2020 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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