runtime_chi

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: GPL-3.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleCurrent

func HandleCurrent[C context.Context](config *route.Configuration[C], path string, router chi.Router)

func HandleSubpath

func HandleSubpath[C context.Context](config *route.Configuration[C], router chi.Router)

func HttpHandler

func HttpHandler[C context.Context](middlewares []route.Middleware, config *route.Configuration[C]) http.Handler

func New

func New[C context.Context](configurations ...runtime.Configuration[*Runtime[C]]) runtime.Runtime

func WithController added in v0.0.6

func WithController[C context.Context](path string, method string, controller mvc.Controller[C], errorHandler mvc.Error[C]) runtime.Configuration[*Runtime[C]]

func WithCustom added in v0.0.9

func WithCustom[C context.Context](path string, method string, handler route.Handler[C], errorHandler route.Error) runtime.Configuration[*Runtime[C]]

func WithDecorator

func WithDecorator[C context.Context](decorator ...route.Decorator[C]) runtime.Configuration[*Runtime[C]]

func WithHttpHandler added in v0.0.8

func WithHttpHandler[C context.Context](path string, method string, handler http.Handler) runtime.Configuration[*Runtime[C]]

func WithMiddleware

func WithMiddleware[C context.Context](middleware ...route.Middleware) runtime.Configuration[*Runtime[C]]

func WithPage

func WithPage[C context.Context, M any](path string, method string, pageHandler page.Handler[C, M], errorHandler page.Error[C]) runtime.Configuration[*Runtime[C]]

func WithPort

func WithPort[C context.Context](port int) runtime.Configuration[*Runtime[C]]

func WithStatic

func WithStatic[C context.Context](prefix string, dir string) runtime.Configuration[*Runtime[C]]

func WithTls added in v0.0.5

func WithTls[C context.Context](certPath string, keyPath string) runtime.Configuration[*Runtime[C]]

Types

type Runtime

type Runtime[C context.Context] struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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