router

package
v0.0.0-...-2176025 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter() *mux.Router

NewRouter creates new router and populates it with routes.

Types

type Route

type Route struct {
	// Name of the route, used for creating URL from name.
	Name string

	// Path of the route.
	Path string

	// Can only authorized user view the route.
	AuthorizedOnly bool

	// Will the route use a custom Content-Type header. Default is application/json.
	CustomContentType bool

	// Handlers for different http methods.
	GET, POST, PUT, DELETE http.Handler
}

Jump to

Keyboard shortcuts

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