http_router

package
v0.0.0-...-f13fc7a Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

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

func (*Node) DeepCopy

func (node *Node) DeepCopy() *Node

func (*Node) DeepRange

func (node *Node) DeepRange(f func(handle *RouterInfo))

func (*Node) GetValue

func (node *Node) GetValue(path string) (handle *RouterInfo, params *Param, isMatch bool)

type Param

type Param struct {
	Keys   []string
	Values []string
}

func (*Param) GetValue

func (param *Param) GetValue(key string) string

type Router

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

func New

func New() *Router

func (*Router) AddRoute

func (router *Router) AddRoute(Type, method, url string, handle *RouterInfo) error

func (*Router) DeepCopy

func (router *Router) DeepCopy() *Router

func (*Router) GetRouter

func (router *Router) GetRouter(Type, method, url string) *RouterInfo

func (*Router) RangeRoute

func (router *Router) RangeRoute(f func(Type, method string, route *RouterInfo))

type RouterInfo

type RouterInfo struct {
	Type         string
	Method       string
	FunctionName string
	InstanceUUID string
}

Jump to

Keyboard shortcuts

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