router

package
v0.0.0-...-dd01cb3 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(conf *Config) (http.Handler, error)

Types

type Config

type Config struct {
	Middlewares     []Middleware
	Routes          []Route
	NotFoundHandler http.Handler
}

func LoadConfigFromEnv

func LoadConfigFromEnv() *Config

type Middleware

type Middleware = func(http.Handler) http.Handler

type Route

type Route struct {
	Desc        string
	Path        string
	Method      string
	Queries     []string
	Handler     http.HandlerFunc
	Middlewares []Middleware
}

Jump to

Keyboard shortcuts

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