router

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SendOk    = "SendOk"
	SendBad   = "SendBad"
	CheckAuth = "CheckAuth"
)

Variables

This section is empty.

Functions

func Call

func Call(ctx context.Context, service interface{}, methodName string, request string) (response interface{}, err error)

func RegApiHandler

func RegApiHandler(bind Apier) gin.HandlerFunc

RegApiHandler 根据*uri执行对应方法

Types

type Apier

type Apier interface {
	//200
	SendOk(c *gin.Context, body any)
	//500
	SendBad(c *gin.Context, message string, body any)
	//401
	CheckAuth(c *gin.Context, body any) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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