router

package
v0.0.2-0...-b3cfdcc Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MethodPost   = "POST"
	MethodGet    = "GET"
	MethodPut    = "PUT"
	MethodDelete = "DELETE"
	MethodPatch  = "PATCH"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerType

type HandlerType func(c *gin.Context)

type Route

type Route interface {
	Method() string
	Path() string
	Handler() HandlerType
}

Route defines an individual API route in the sysdig-monitor server

type Router

type Router interface {
	Routes() []Route
	AddRoute(path, method string, handler HandlerType)
}

Router defines an interface to specify a group of routes ot add to the server

func NewGroupRouter

func NewGroupRouter(prefix string) Router

func NewRouter

func NewRouter() Router

Jump to

Keyboard shortcuts

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