web

package
v0.0.0-...-8f21188 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const DebugMode = "debug"
View Source
const ReleaseMode = "release"

Variables

This section is empty.

Functions

func SetMode

func SetMode(mode string)

Types

type App

type App struct {
	*gin.Engine
}

func CreateApp

func CreateApp() *App

func (*App) DELETE

func (group *App) DELETE(relativePath string, handlers Callback)

DELETE is a shortcut for router.Handle("DELETE", path, handlers).

func (*App) GET

func (group *App) GET(relativePath string, handlers Callback)

GET is a shortcut for router.Handle("GET", path, handlers).

func (*App) HEAD

func (group *App) HEAD(relativePath string, handlers Callback)

HEAD is a shortcut for router.Handle("HEAD", path, handlers).

func (*App) OPTIONS

func (group *App) OPTIONS(relativePath string, handlers Callback)

OPTIONS is a shortcut for router.Handle("OPTIONS", path, handlers).

func (*App) PATCH

func (group *App) PATCH(relativePath string, handlers Callback)

PATCH is a shortcut for router.Handle("PATCH", path, handlers).

func (*App) POST

func (group *App) POST(relativePath string, handlers Callback)

POST is a shortcut for router.Handle("POST", path, handlers).

func (*App) PUT

func (group *App) PUT(relativePath string, handlers Callback)

PUT is a shortcut for router.Handle("PUT", path, handlers).

type Callback

type Callback func(ctx *Context) (Data, error)

type Context

type Context struct {
	UserID uint64
	*gin.Context
}

func MakeContext

func MakeContext(oc *gin.Context) *Context

type Data

type Data interface{}

Jump to

Keyboard shortcuts

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