router

package
v0.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc `json:"-"`
}

func (Route) UpdateHandlerFunc

func (r Route) UpdateHandlerFunc(f http.HandlerFunc) Route

type Router

type Router struct {
	*mux.Router
	MiddlewareFunc func(http.Request)
}

func NewRouter

func NewRouter() *Router

func (*Router) WithRoutes

func (router *Router) WithRoutes(routes Routes) *Router

type Routes

type Routes map[string]Route

func DownloadRoutes

func DownloadRoutes(handler *handler.Handler) (routes Routes)

func GameRoutes

func GameRoutes(handler *handler.Handler) (routes Routes)

func UserRoutes

func UserRoutes(handler *handler.Handler) (routes Routes)

func (*Routes) UpdateHandlerFunc

func (r *Routes) UpdateHandlerFunc(key string, f http.HandlerFunc)

Jump to

Keyboard shortcuts

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