echo

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginsRoot = root + ".plugins"
)

Variables

This section is empty.

Functions

func GetJSONPrettyEnabled

func GetJSONPrettyEnabled() bool

func JSON

func JSON(c echo.Context, code int, i interface{}, err error) error

func JSONError

func JSONError(c echo.Context, err error) error

func WrapLogger

func WrapLogger(l log.Logger) wrappedLogger

Types

type Options

type Options struct {
	HideBanner bool
	Port       int
	Json       struct {
		Pretty struct {
			Enabled bool
		}
	}
}

func NewOptions

func NewOptions() (*Options, error)

func NewOptionsWithPath

func NewOptionsWithPath(path string) (opts *Options, err error)

type Plugin

type Plugin func(context.Context, *echo.Echo) error

type Server

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

func NewServer

func NewServer(ctx context.Context, plugins ...Plugin) *Server

func NewServerWithOptions

func NewServerWithOptions(ctx context.Context, opt *Options, plugins ...Plugin) *Server

func (*Server) Instance

func (s *Server) Instance() *echo.Echo

func (*Server) Serve

func (s *Server) Serve(ctx context.Context)

Jump to

Keyboard shortcuts

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