init: web_hgcg_server 初始化提交
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// type FunHandle func(*gin.Context) (proto.Message, string, string, pkt_pub.EType)
|
||||
|
||||
type ApiOpType int
|
||||
|
||||
const (
|
||||
ApiGet ApiOpType = 1
|
||||
ApiPost ApiOpType = 2
|
||||
ApiPut ApiOpType = 3
|
||||
)
|
||||
|
||||
// API接口设置
|
||||
type ApiSet struct {
|
||||
Path string // 路径
|
||||
OpType ApiOpType // 操作类型
|
||||
Fun gin.HandlerFunc // 函数句柄
|
||||
IsWhite bool // 是否白名单
|
||||
Desc string // 描述
|
||||
}
|
||||
|
||||
var ApiSetMaps = map[string]ApiSet{}
|
||||
Reference in New Issue
Block a user