server

package
v0.0.0-...-314c428 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	Address() string
}

type Handler

type Handler interface {
	Config() HandlerConfig
	Handler(echo.Context) error
}

type HandlerConfig

type HandlerConfig struct {
	Method      string
	Path        string
	Middlewares []echo.MiddlewareFunc
}

type HandlerProvider

type HandlerProvider struct {
	dig.Out
	Handler Handler `group:"handlers"`
}

type Handlers

type Handlers struct {
	dig.In
	Handlers []Handler `group:"handlers"`
}

type Server

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

func New

func New(config Config, handlers Handlers) *Server

func (*Server) Close

func (s *Server) Close(context.Context) error

func (*Server) Run

func (s *Server) Run(context.Context) error

Jump to

Keyboard shortcuts

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