urls

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMux

func NewMux() *gin.Engine

Types

type Router

type Router struct {
	Mux       *gin.Engine
	Endpoints map[string]map[string]func(*gin.Context)
}

func NewRouter

func NewRouter(mux *gin.Engine) Router

func (*Router) AddRoute

func (r *Router) AddRoute(route string, handlers map[string]func(*gin.Context))

example r.AddRoute("/", map[string]func(*gin.Context){"GET": handlers.IndexHandler})

func (*Router) Parse

func (r *Router) Parse() *gin.Engine

Parse method will add routes to gin and return it

Jump to

Keyboard shortcuts

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