server

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 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 Application

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

func NewApplication

func NewApplication(l logger.Logger, filter *Filter, fs fs.FS) *Application

func (*Application) Handle

func (a *Application) Handle(pattern string, handler http.HandlerFunc)

func (*Application) ServeHTTP

func (a *Application) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Filter

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

func NewFilter

func NewFilter(rules []*Rule) (*Filter, error)

func (*Filter) Match

func (f *Filter) Match(method, route string) bool

type Route

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

type Rule

type Rule struct {
	Method string `yaml:"method"`
	Route  string `yaml:"route"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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