Files
netbird/shared/management/networkmap/nmdata/group.go
2026-08-04 20:52:16 +02:00

29 lines
486 B
Go

package nmdata
import "slices"
const groupAllName = "All"
// Group is the slim twin of types.Group.
type Group struct {
ID string
Name string
PublicID string
Peers []string
Resources []Resource
}
func (g *Group) IsGroupAll() bool {
return g.Name == groupAllName
}
func (g *Group) Copy() *Group {
return &Group{
ID: g.ID,
Name: g.Name,
PublicID: g.PublicID,
Peers: slices.Clone(g.Peers),
Resources: slices.Clone(g.Resources),
}
}