router

package
v0.0.0-...-945b644 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddGroup

func AddGroup(namespace string, routes []Route, r *httprouter.Router)

AddGroup groups the HTTP routes under given namespace.

Types

type Route

type Route struct {
	Method      string            // HTTP methods, e.g. GET, POST, PUT, PATCH, DELETE
	Path        string            // URL endpoint, e.g. /users
	HandlerFunc httprouter.Handle // route method handler
}

Route represents an HTTP route definition.

Jump to

Keyboard shortcuts

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