http

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware struct {
	Logger *logger.Logger
}

Middleware implements all the REST middleware methods.

func (*Middleware) AccessLogger

func (m *Middleware) AccessLogger(next echo.HandlerFunc) echo.HandlerFunc

AccessLogger middleware handles access logging.

func (*Middleware) CORS

func (m *Middleware) CORS(next echo.HandlerFunc) echo.HandlerFunc

CORS is a Cross-Origin Resource Sharing (CORS) middleware.

func (*Middleware) Recovery

func (m *Middleware) Recovery(next echo.HandlerFunc) echo.HandlerFunc

Recovery is a panic recovery middleware.

func (*Middleware) Secure

func (m *Middleware) Secure(next echo.HandlerFunc) echo.HandlerFunc

Secure defends against cross-site scripting (XSS) attack, content type sniffing, clickjacking, insecure connection and other code injection attacks.

type Server

type Server struct {
	Config     *config.Config
	Logger     *logger.Logger
	Middleware *Middleware
	// contains filtered or unexported fields
}

Server is the HTTP server of this application.

func (*Server) Start

func (s *Server) Start()

Start sets up all the dependencies and routes on the server, and calls ListenAndServe on it.

Jump to

Keyboard shortcuts

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