routes

package
v0.0.0-...-6b47afd Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserRoutes = Routes{
	Route{
		"GetAllUsers",
		"GET",
		"/",
		controllers.GetAllUsers,
	},
	Route{
		"CreateUser",
		"POST",
		"/",
		controllers.CreateUser,
	},
	Route{
		"GetImage",
		"GET",
		"/image",
		controllers.GetImage,
	},
	Route{
		"GetUserByID",
		"GET",
		"/{id}",
		controllers.GetUserByID,
	},
}

UserRoutes contains all routes for the "/users" endpoint.

Functions

func NewRouter

func NewRouter() *http.ServeMux

Types

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc
}

type Routes

type Routes []Route

Jump to

Keyboard shortcuts

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