ginserv

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: MIT Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind added in v0.1.2

func Bind(records []RouterRecord, efunc ErrorCodeFunc)

Bind TODO

func HandleError added in v0.1.2

func HandleError(f HandlerFunc, efunc ErrorCodeFunc) gin.HandlerFunc

HandleError TODO

func LoadGlobalMiddlewares

func LoadGlobalMiddlewares(conf *viper.Viper, engine *gin.Engine)

LoadGlobalMiddlewares TODO

func NewEngine

func NewEngine(conf *viper.Viper) *gin.Engine

NewEngine TODO

func NewServer

func NewServer(conf *viper.Viper, engine *gin.Engine) *http.Server

NewServer create HTTP server

func UseLog

func UseLog(engine *gin.Engine)

UseLog TODO

Types

type ErrorCodeFunc added in v0.1.2

type ErrorCodeFunc func(err error) int

ErrorCodeFunc TODO

type HandlerFunc added in v0.1.2

type HandlerFunc func(*gin.Context) (sth.Result, error)

HandlerFunc TODO

type IRoutesHTTPFunc

type IRoutesHTTPFunc func(string, ...gin.HandlerFunc) gin.IRoutes

IRoutesHTTPFunc TODO

type RouterGroup

type RouterGroup gin.IRouter

RouterGroup TODO

func NewAPIGroup

func NewAPIGroup(conf *viper.Viper, engine *gin.Engine) RouterGroup

NewAPIGroup TODO

type RouterRecord added in v0.1.2

type RouterRecord struct {
	M IRoutesHTTPFunc
	P string
	H HandlerFunc
}

RouterRecord TODO

Jump to

Keyboard shortcuts

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