echoHttp

package
v0.0.0-...-6a52fcc Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

func NewServer

func NewServer(config *ServerConfig) *Server

func (*Server) AddMiddlewares

func (s *Server) AddMiddlewares(middlewares ...echo.MiddlewareFunc)

func (*Server) GetBasePath

func (s *Server) GetBasePath() string

func (*Server) GetEchoInstance

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

func (*Server) GracefulShutdown

func (s *Server) GracefulShutdown(ctx context.Context) error

func (*Server) RunServer

func (s *Server) RunServer(ctx context.Context, configEcho func(echo *echo.Echo)) error

func (*Server) SetupDefaultMiddlewares

func (s *Server) SetupDefaultMiddlewares()

type ServerConfig

type ServerConfig struct {
	Port     int
	BasePath string
	IsDev    bool
}

type ServerInterface

type ServerInterface interface {
	RunServer(ctx context.Context, configEcho func(echoServer *echo.Echo)) error
	GracefulShutdown(ctx context.Context) error
	GetEchoInstance() *echo.Echo
	SetupDefaultMiddlewares()
	AddMiddlewares(middlewares ...echo.MiddlewareFunc)
	GetBasePath() string
}

Directories

Path Synopsis
handlers

Jump to

Keyboard shortcuts

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