nezha/model/server_group_api.go

18 lines
387 B
Go
Raw Normal View History

2024-10-21 11:00:51 -04:00
package model
2024-12-16 06:40:37 -05:00
import "github.com/gin-gonic/gin"
2024-10-21 11:00:51 -04:00
type ServerGroupForm struct {
2024-11-16 07:57:03 -05:00
Name string `json:"name" minLength:"1"`
2024-10-21 11:00:51 -04:00
Servers []uint64 `json:"servers"`
}
type ServerGroupResponseItem struct {
Group ServerGroup `json:"group"`
Servers []uint64 `json:"servers"`
}
2024-12-16 06:40:37 -05:00
func (sg *ServerGroupResponseItem) HasPermission(c *gin.Context) bool {
return sg.Group.HasPermission(c)
}