stdxgit.sr.ht/~pingoo/stdx/httpx/hostrouter Index | Files

package hostrouter

import "git.sr.ht/~pingoo/stdx/httpx/hostrouter"

Index

Types

type Routes

type Routes map[string]chi.Router

func New

func New() Routes

func (Routes) Map

func (hr Routes) Map(host string, h chi.Router)

func (Routes) Match

func (hr Routes) Match(rctx *chi.Context, method, path string) bool

func (Routes) Middlewares

func (hr Routes) Middlewares() chi.Middlewares

func (Routes) Routes

func (hr Routes) Routes() []chi.Route

func (Routes) ServeHTTP

func (hr Routes) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (Routes) Unmap

func (hr Routes) Unmap(host string)

Source Files

hostrouter.go

Version
v0.0.0-20240218134121-094174641f6e (latest)
Published
Feb 18, 2024
Platform
linux/amd64
Imports
3 packages
Last checked
4 months ago

Tools for package owners.