router

package
v0.2.1-0...-b9ab31a Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetURIParams

func GetURIParams(api *router.API, rawURL url.URL) url.Values

GetURIParams returns the values retrieved from the rawURL

func IsWildCardBackendPath

func IsWildCardBackendPath(api *router.API) bool

IsWildCardBackendPath checks whether the configured path of the upstream restful service contains parameters

Types

type Node

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

Node defines the single method of the router configured API

type Route

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

Route defines the tree of router APIs

func NewRoute

func NewRoute() *Route

NewRoute returns an empty router tree

func (*Route) ClearAPI

func (rt *Route) ClearAPI() error

ClearAPI clear the api

func (*Route) FindAPI

func (rt *Route) FindAPI(fullPath string, httpverb config.HTTPVerb) (*router.API, bool)

FindAPI returns the api that meets the

func (*Route) PutAPI

func (rt *Route) PutAPI(api router.API) error

PutAPI puts an api into the resource

func (*Route) UpdateAPI

func (rt *Route) UpdateAPI(api router.API) error

UpdateAPI update the api method in the existing router node

Jump to

Keyboard shortcuts

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