routes

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Any

func Any(path string, handler gin.HandlerFunc)

func Anym added in v0.3.1

func Anym(path string, middlewares []gin.HandlerFunc, handler gin.HandlerFunc)

func Delete

func Delete(path string, handler gin.HandlerFunc)

func Deletem added in v0.3.1

func Deletem(path string, middlewares []gin.HandlerFunc, handler gin.HandlerFunc)

func Get

func Get(path string, handler gin.HandlerFunc)

func GetRouter

func GetRouter() *router

function for bootstrap

func Getm added in v0.3.1

func Getm(path string, middlewares []gin.HandlerFunc, handler gin.HandlerFunc)

adds route with get method and specified middleware

func Groupbp

func Groupbp(basePath string, callback func(Group))

group only by base path

func Groupbpm

func Groupbpm(basePath string, method string, callback func(g Groupm))
func Head(path string, handler gin.HandlerFunc)

func Headm added in v0.3.1

func Headm(path string, middlewares []gin.HandlerFunc, handler gin.HandlerFunc)

func Options

func Options(path string, handler gin.HandlerFunc)

func Optionsm added in v0.3.1

func Optionsm(path string, middlewares []gin.HandlerFunc, handler gin.HandlerFunc)

func Patch

func Patch(path string, handler gin.HandlerFunc)

func Patchm added in v0.3.1

func Patchm(path string, middlewares []gin.HandlerFunc, handler gin.HandlerFunc)

func Post

func Post(path string, handler gin.HandlerFunc)

func Postm added in v0.3.1

func Postm(path string, middlewares []gin.HandlerFunc, handler gin.HandlerFunc)

func Put

func Put(path string, handler gin.HandlerFunc)

func Putm added in v0.3.1

func Putm(path string, middlewares []gin.HandlerFunc, handler gin.HandlerFunc)

func SetEngine

func SetEngine(engine *gin.Engine)

edit engine

Types

type Group

type Group struct {
	BasePath string
}

group basic groupping

func (*Group) Delete

func (g *Group) Delete(path string, handler gin.HandlerFunc)

func (*Group) Get

func (g *Group) Get(path string, handler gin.HandlerFunc)

func (*Group) Head

func (g *Group) Head(path string, handler gin.HandlerFunc)

func (*Group) Options

func (g *Group) Options(path string, handler gin.HandlerFunc)

func (*Group) Patch

func (g *Group) Patch(path string, handler gin.HandlerFunc)

func (*Group) Post

func (g *Group) Post(path string, handler gin.HandlerFunc)

func (*Group) Put

func (g *Group) Put(path string, handler gin.HandlerFunc)

type Groupm

type Groupm struct {
	BasePath string
	Method   string
}

group for groupping by base path and method

func (*Groupm) Add

func (g *Groupm) Add(path string, handler gin.HandlerFunc)

Jump to

Keyboard shortcuts

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