12345678910111213141516171819202122232425262728293031323334353637 |
- package v1
- import (
- "github.com/gogf/gf/v2/frame/g"
- "nodeMonitor/internal/model/entity"
- )
- type NodeReq struct {
- g.Meta `path:"/add" tags:"add" method:"post" summary:"增加节点"`
- Name string `p:"name" v:"required#节点名称不能为空"`
- Host string `p:"host" v:"required#节点不能为空"`
- Port int `p:"port" v:"required#节点端口不能为空"`
- Url string `p:"url"`
- }
- type NodeRes struct {
- //g.Meta `mime:"application/json"`
- }
- type NodeDelReq struct {
- g.Meta `path:"/del" tags:"del" method:"post" summary:"删除节点"`
- Host string `p:"host" v:"required#节点不能为空"`
- }
- type NodeDelRes struct {
- //g.Meta `mime:"application/json"`
- }
- type NodeAllReq struct {
- g.Meta `path:"/all" tags:"del" method:"get" summary:"获取全部节点"`
- }
- type NodeALlRes struct {
- g.Meta `mime:"application/json"`
- NodeList []*entity.Node `json:"nodeList"`
- }
|