web

package
v0.0.0-...-96f436b Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(p RouterParams) yodel.Router

Types

type App

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

func NewApp

func NewApp(
	server Server,
	handler http.Handler,
	log *trace.Logger,
) *App

func (*App) Launch

func (app *App) Launch(ctx context.Context, port int) error

type RouterParams

type RouterParams struct {
	dig.In
	Routes []yodel.Route `group:"routes"`

	Renderer     echo.Renderer
	Validator    echo.Validator
	SessionStore sessions.Store
	Log          *trace.Logger
	Config       *config.WebConfig
}

type Server

type Server interface {
	Serve(net.Listener, http.Handler) error
}

func NewServer

func NewServer(cfg *config.RootConfig) (Server, error)

type ServerFunc

type ServerFunc func(net.Listener, http.Handler) error

func (ServerFunc) Serve

func (fn ServerFunc) Serve(l net.Listener, h http.Handler) error

Jump to

Keyboard shortcuts

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