router

package
v0.0.0-...-de72672 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRoute

func AddRoute(group, url, method string, fun any)

AddRoute Add Transition Route

func DealRoute

func DealRoute()

DealRoute All transition routing methods for handling external exposure

Types

type PrefixRouteTree

type PrefixRouteTree interface {
	// contains filtered or unexported methods
}

PrefixRouteTree Prefix route tree node abstract

type RouteGroup

type RouteGroup interface {
	Get(string, any) RouteGroup
	Post(string, any) RouteGroup
	Put(string, any) RouteGroup
	Delete(string, any) RouteGroup
	Group(string) RouteGroup
}

RouteGroup Route group abstract interface

func NewGroup

func NewGroup(url string) RouteGroup

NewGroup Create a routing group struct object

type RouteModel

type RouteModel interface {
	GetHttpContentType() *httpContentType
	GetType() reflect.Type
	GetValue() reflect.Value
	GetParamNames() []string
}

RouteModel Route features abstract interface model

func Get

func Get(u, method string, r *http.Request) (string, RouteModel)

Get Based on the URL, method finds the corresponding routing model

Jump to

Keyboard shortcuts

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