http

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: GPL-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const GROUP_ROUTES = `group:"httproutes"`

Variables

Functions

func AsRouteGroup

func AsRouteGroup(handler any) any

func RegisterRoutes

func RegisterRoutes(routes []RouteGroup, server *Http)

Types

type Configuration

type Configuration struct {
	Address   string      `hcl:"address"`
	Ratelimit int         `hcl:"rate_limit"`
	Debug     bool        `hcl:"debug"`
	TLS       *TLSOptions `hcl:"tls,block"`
}

type Http

type Http struct {
	Address string
	Engine  *echo.Echo
}

func NewEcho

func NewEcho(config Configuration, log *zap.Logger, lc fx.Lifecycle) *Http

func (*Http) DisableDebugging added in v0.7.0

func (h *Http) DisableDebugging()

func (*Http) EnableDebugging added in v0.7.0

func (h *Http) EnableDebugging()

func (*Http) Use

func (h *Http) Use(middleware echo.MiddlewareFunc)

type RouteGroup

type RouteGroup interface {
	ApiGroup() string
	Version() string
	Handler(*echo.Group)
}

type TLSOptions added in v0.8.0

type TLSOptions struct {
	CertFile string `hcl:"cert_file"`
	KeyFile  string `hcl:"key_file"`
}

Jump to

Keyboard shortcuts

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