corehttp

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartApi

func StartApi(ctx *context.CoreContext) error

Types

type HandlerFunc

type HandlerFunc func(c *MyContext)

type Keys

type Keys struct {
	PublicKey string `json:"public_key"`
}

type MyContext

type MyContext struct {
	*gin.Context
	CoreContext *context.CoreContext
}

MyContext extend gin.Context

type MyRouterGroup

type MyRouterGroup struct {
	*gin.RouterGroup
	CoreContext *context.CoreContext
}

MyRouterGroup extend gin.RouterGroup

func (*MyRouterGroup) GET

func (r *MyRouterGroup) GET(relativePath string, handlers ...HandlerFunc) gin.IRoutes

GET extend group GET

func (*MyRouterGroup) Group

func (group *MyRouterGroup) Group(relativePath string, handlers ...HandlerFunc) *MyRouterGroup

func (*MyRouterGroup) POST

func (r *MyRouterGroup) POST(relativePath string, handlers ...HandlerFunc) gin.IRoutes

POST extend group POST

func (*MyRouterGroup) Use

func (r *MyRouterGroup) Use(middlewares ...func(c *MyContext)) gin.IRoutes

Use extend register with middle

type MyServer

type MyServer struct {
	*gin.Engine
	CoreContext *context.CoreContext
}

func NewMyServer

func NewMyServer(ctx *context.CoreContext) *MyServer

NewMyServer new gin server

func (*MyServer) GET

func (server *MyServer) GET(relativePath string, handlers ...HandlerFunc) gin.IRoutes

GET extent GET

func (*MyServer) Group

func (server *MyServer) Group(relativePath string, handlers ...HandlerFunc) *MyRouterGroup

Group rewrite route register

func (*MyServer) POST

func (server *MyServer) POST(relativePath string, handlers ...HandlerFunc) gin.IRoutes

POST extend POST

Jump to

Keyboard shortcuts

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