[management] network map from nmap data type (#6919)

Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
Co-authored-by: Dmitri Dolguikh <dmitri.external@netbird.io>
This commit is contained in:
Pascal Fischer
2026-08-27 11:28:05 +02:00
committed by GitHub
co-authored by Dmitri Dolguikh
parent 473392a935
commit e06c17cf59
338 changed files with 24867 additions and 3799 deletions
@@ -0,0 +1,30 @@
package nmdata
import "slices"
// GroupAllName is the reserved name of the default group that contains every
// peer in an account.
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),
}
}