This commit is contained in:
aozhiwei 2024-06-20 21:35:50 +08:00
parent c0d7840cb9
commit 9904a9ed77
9 changed files with 0 additions and 142 deletions

View File

@ -1,20 +0,0 @@
package ca
import (
"github.com/gin-gonic/gin"
)
type AnncApi struct {
}
func (this *AnncApi) GetAnnouncement(c *gin.Context) {
rspObj := struct {
ErrCode int32 `json:"errcode"`
ErrMsg string `json:"errmsg"`
}{
ErrCode: 0,
ErrMsg: "",
}
c.JSON(200, rspObj)
}

View File

@ -1,9 +0,0 @@
package ca
type ApiGroup struct {
LoginApi
AnncApi
ServerSwitchApi
}
var ApiGroupApp = new(ApiGroup)

View File

@ -1,31 +0,0 @@
package ca
import (
"github.com/gin-gonic/gin"
)
type LoginApi struct {
}
func (this *LoginApi) GetNonce(c *gin.Context) {
rspObj := struct {
ErrCode int32 `json:"errcode"`
ErrMsg string `json:"errmsg"`
}{
ErrCode: 0,
ErrMsg: "",
}
c.JSON(200, rspObj)
}
func (this *LoginApi) Auth(c *gin.Context) {
rspObj := struct {
ErrCode int32 `json:"errcode"`
ErrMsg string `json:"errmsg"`
}{
ErrCode: 0,
ErrMsg: "",
}
c.JSON(200, rspObj)
}

View File

@ -1,31 +0,0 @@
package ca
import (
"github.com/gin-gonic/gin"
)
type ServerSwitchApi struct {
}
func (this *ServerSwitchApi) GetSwitch(c *gin.Context) {
rspObj := struct {
ErrCode int32 `json:"errcode"`
ErrMsg string `json:"errmsg"`
}{
ErrCode: 0,
ErrMsg: "",
}
c.JSON(200, rspObj)
}
func (this *ServerSwitchApi) GetWhiteList(c *gin.Context) {
rspObj := struct {
ErrCode int32 `json:"errcode"`
ErrMsg string `json:"errmsg"`
}{
ErrCode: 0,
ErrMsg: "",
}
c.JSON(200, rspObj)
}

View File

@ -1,12 +0,0 @@
package ca
import (
"f5"
"main/api/ca"
)
type AnncRouter struct{}
func (this *AnncRouter) InitAnncRouter() {
f5.GetApp().RegisterCaHandle("Annc", "getAnnouncement", ca.ApiGroupApp.AnncApi.GetAnnouncement)
}

View File

@ -1,7 +0,0 @@
package ca
type RouterGroup struct {
LoginRouter
AnncRouter
ServerSwitchRouter
}

View File

@ -1,13 +0,0 @@
package ca
import (
"f5"
"main/api/ca"
)
type LoginRouter struct{}
func (this *LoginRouter) InitLoginRouter() {
f5.GetApp().RegisterCaHandle("Login", "getNonce", ca.ApiGroupApp.LoginApi.GetNonce)
f5.GetApp().RegisterCaHandle("Login", "auth", ca.ApiGroupApp.LoginApi.Auth)
}

View File

@ -1,13 +0,0 @@
package ca
import (
"f5"
"main/api/ca"
)
type ServerSwitchRouter struct{}
func (this *ServerSwitchRouter) InitServerSwitchRouter() {
f5.GetApp().RegisterCaHandle("ServerSwitch", "getSwitch", ca.ApiGroupApp.ServerSwitchApi.GetSwitch)
f5.GetApp().RegisterCaHandle("ServerSwitch", "getWhiteList", ca.ApiGroupApp.ServerSwitchApi.GetWhiteList)
}

View File

@ -2,12 +2,10 @@ package router
import ( import (
"f5" "f5"
"main/router/ca"
"main/router/nft" "main/router/nft"
) )
type routerMgr struct { type routerMgr struct {
ca ca.RouterGroup
nft nft.RouterGroup nft nft.RouterGroup
} }
@ -15,10 +13,6 @@ func (this *routerMgr) Init() {
/* /*
f5.GetApp().GetGinEngine().Use(middleware.Cors()) f5.GetApp().GetGinEngine().Use(middleware.Cors())
*/ */
this.ca.InitLoginRouter()
this.ca.InitAnncRouter()
this.ca.InitServerSwitchRouter()
this.nft.NftMetaRouter.InitRouter() this.nft.NftMetaRouter.InitRouter()
this.nft.NftDetailRouter.InitRouter() this.nft.NftDetailRouter.InitRouter()