mirror of
https://github.com/nezhahq/nezha.git
synced 2025-02-02 17:48:13 -05:00
18 lines
387 B
Go
18 lines
387 B
Go
package model
|
|
|
|
import "github.com/gin-gonic/gin"
|
|
|
|
type ServerGroupForm struct {
|
|
Name string `json:"name" minLength:"1"`
|
|
Servers []uint64 `json:"servers"`
|
|
}
|
|
|
|
type ServerGroupResponseItem struct {
|
|
Group ServerGroup `json:"group"`
|
|
Servers []uint64 `json:"servers"`
|
|
}
|
|
|
|
func (sg *ServerGroupResponseItem) HasPermission(c *gin.Context) bool {
|
|
return sg.Group.HasPermission(c)
|
|
}
|