router

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	StaticDirectory string `yaml:"static_dir"`
	AppDirectory    string `yaml:"app_dir"`
}

func Configure

func Configure(provider config.Provider) (*Options, error)

type Params

type Params struct {
	fx.In

	Renderer  echo.Renderer
	Validator echo.Validator
	Logger    *slog.Logger
	Options   *Options
}

type Router

type Router struct {
	*echo.Echo
}

func New

func New(p Params) Router

func (Router) MapHome

func (r Router) MapHome(home echo.HandlerFunc, mw ...echo.MiddlewareFunc)

func (Router) MapLinode

func (r Router) MapLinode(linode *controller.Linode, mw ...echo.MiddlewareFunc)

func (Router) MapSystemd

func (r Router) MapSystemd(systemd *controller.Systemd, mw ...echo.MiddlewareFunc)

func (Router) Start

func (r Router) Start(addr string) error

Jump to

Keyboard shortcuts

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