node

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	Handler() http.Handler
}

type Node

type Node struct {
	//Root is the mountpoint for this node
	Root string
	Tags []string

	Middleware     []func(next http.Handler) http.Handler
	DefaultOptions Handler
	// Tree reads as routePath -> map of http verb to its usecase
	Tree map[Route]map[string]Handler
	// contains filtered or unexported fields
}

func New

func New(server *web.Service, options ...func(n *Node)) *Node

func (*Node) Mount

func (a *Node) Mount() error

func (*Node) Routes

func (a *Node) Routes() string

func (*Node) Use

func (a *Node) Use(middleware ...func(next http.Handler) http.Handler)

func (*Node) Validate

func (a *Node) Validate() error

type Route

type Route string

Jump to

Keyboard shortcuts

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