http

package
v0.0.0-...-684225f Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

func NewLogMiddleware

func NewLogMiddleware(ctx context.Context, serviceName string) Middleware

type Server

type Server struct {
	Logger      *log.Logger
	Router      *router.Router
	Middlewares []Middleware
}

func New

func New(ctx context.Context) *Server

func (*Server) AddMiddleware

func (s *Server) AddMiddleware(middlewares ...Middleware)

func (*Server) DELETE

func (s *Server) DELETE(path string, handle fasthttp.RequestHandler)

func (*Server) GET

func (s *Server) GET(path string, handle fasthttp.RequestHandler)

func (*Server) HEAD

func (s *Server) HEAD(path string, handle fasthttp.RequestHandler)

func (*Server) Handle

func (s *Server) Handle(method, path string, handle fasthttp.RequestHandler)

func (*Server) OPTIONS

func (s *Server) OPTIONS(path string, handle fasthttp.RequestHandler)

func (*Server) PATCH

func (s *Server) PATCH(path string, handle fasthttp.RequestHandler)

func (*Server) POST

func (s *Server) POST(path string, handle fasthttp.RequestHandler)

func (*Server) PUT

func (s *Server) PUT(path string, handle fasthttp.RequestHandler)

func (*Server) Serve

func (s *Server) Serve(port string)

Jump to

Keyboard shortcuts

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