mirror of
https://github.com/netbirdio/netbird.git
synced 2026-07-30 11:23:16 -04:00
26 lines
406 B
Go
26 lines
406 B
Go
package nmdata
|
|
|
|
import "slices"
|
|
|
|
const groupAllName = "All"
|
|
|
|
// Group is the slim twin of types.Group.
|
|
type Group struct {
|
|
Name string
|
|
PublicID string
|
|
Peers []string
|
|
Resources []Resource
|
|
}
|
|
|
|
func (g *Group) IsGroupAll() bool {
|
|
return g.Name == groupAllName
|
|
}
|
|
|
|
func (g *Group) Copy() *Group {
|
|
return &Group{
|
|
Name: g.Name,
|
|
PublicID: g.PublicID,
|
|
Peers: slices.Clone(g.Peers),
|
|
}
|
|
}
|