router

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: Apache-2.0 Imports: 11 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(method, pattern string, handle Handler)

func R

func R() *chi.Mux

func TE added in v1.8.0

func TE(t *testing.T, cases ...TC)

Types

type Group

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

func NewGroup

func NewGroup(prefix string, middlewares ...func(http.Handler) http.Handler) *Group

func (*Group) Handle

func (g *Group) Handle(method, pattern string, handle Handler)

type Handler

type Handler func(c *cx.Context)

type TC added in v1.8.0

type TC struct {
	Method  string
	Pattern string
	Body    string

	Dump bool

	WarpReq func(t *testing.T, req *http.Request)
	Verify  func(t *testing.T, resp *http.Response, code int, body string)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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