init commit
This commit is contained in:
1 parent
eda2b643b9
commit
3efed3defe
5834 files changed
+636508
No files matched your search
@@ -0,0 +1,39 @@
|
||||
package controller
|
||||
|
||||
import "github.com/gin-gonic/gin"
|
||||
|
||||
// 获取HTTP服务
|
||||
func (c *Controller) fetchHttpService(context *gin.Context) {
|
||||
inst := c.service.FetchHttpService(context.Query("name"))
|
||||
context.JSON(200, gin.H{
|
||||
"code": 0,
|
||||
"instance": inst,
|
||||
})
|
||||
}
|
||||
|
||||
// 获取所有HTTP服务
|
||||
func (c *Controller) fetchAllHttpService(context *gin.Context) {
|
||||
svc := c.service.FetchAllHttpService()
|
||||
context.JSON(200, gin.H{
|
||||
"code": 0,
|
||||
"service": svc,
|
||||
})
|
||||
}
|
||||
|
||||
// 获取RPC服务
|
||||
func (c *Controller) fetchRpcService(context *gin.Context) {
|
||||
inst := c.service.FetchRpcService(context.Query("name"))
|
||||
context.JSON(200, gin.H{
|
||||
"code": 0,
|
||||
"instance": inst,
|
||||
})
|
||||
}
|
||||
|
||||
// 获取所有RPC服务
|
||||
func (c *Controller) fetchAllRpcService(context *gin.Context) {
|
||||
svc := c.service.FetchAllRpcService()
|
||||
context.JSON(200, gin.H{
|
||||
"code": 0,
|
||||
"service": svc,
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user