router

package
v0.0.0-...-1f5092a Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handle

type MyRouter

type MyRouter struct {
	Httprouter     *router.Router
	WrappedHandler http.Handler
	Options        *Options
}

func NewRouter

func NewRouter(opt *Options) *MyRouter

func (*MyRouter) DELETE

func (mr *MyRouter) DELETE(path string, reqHandler Handle)

func (*MyRouter) GET

func (mr *MyRouter) GET(path string, reqHandler Handle)

func (*MyRouter) Group

func (mr *MyRouter) Group(path string, fn func(r *MyRouter))

func (*MyRouter) Handle

func (mr *MyRouter) Handle(path, method string, reqHandler Handle)

func (*MyRouter) PATCH

func (mr *MyRouter) PATCH(path string, reqHandler Handle)

func (*MyRouter) POST

func (mr *MyRouter) POST(path string, reqHandler Handle)

func (*MyRouter) PUT

func (mr *MyRouter) PUT(path string, reqHandler Handle)

type Options

type Options struct {
	Prefix string
}

type Router

type Router interface {
	GET(path string, reqHandler Handle)
	POST(path string, reqHandler Handle)
	PUT(path string, reqHandler Handle)
	PATCH(path string, reqHandler Handle)
	DELETE(path string, reqHandler Handle)

	Handle(path, method string, reqHandler Handle)
	Group(path string, fn func(r *MyRouter))
}

Directories

Path Synopsis
auth

Jump to

Keyboard shortcuts

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