routes

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 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 Delete

func Delete(path string, handler gin.HandlerFunc)

func Get

func Get(path string, handler gin.HandlerFunc)

func GetRouter

func GetRouter() *router

function for bootstrap

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 Options

func Options(path string, handler gin.HandlerFunc)

func Patch

func Patch(path string, handler gin.HandlerFunc)

func Post

func Post(path string, handler gin.HandlerFunc)

func Put

func Put(path string, 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