This commit is contained in:
2026-06-19 17:42:24 +03:00
parent 3fe358fd9e
commit cf8dae6f4b
1505 changed files with 103498 additions and 1 deletions

28
pkg/cloudapi/k8s/ids.go Normal file
View File

@@ -0,0 +1,28 @@
package k8s
// IDs gets array of K8SIDs from ListK8SClusters struct
func (lk ListK8SClusters) IDs() []uint64 {
res := make([]uint64, 0, len(lk.Data))
for _, k := range lk.Data {
res = append(res, k.ID)
}
return res
}
// IDs gets array of K8SWorkerGroupIDs from ListK8SGroups struct
func (lwg ListK8SGroups) IDs() []uint64 {
res := make([]uint64, 0, len(lwg))
for _, wg := range lwg {
res = append(res, wg.ID)
}
return res
}
// IDs gets array of Worker or Master ComputesIDs from ListDetailedInfo struct
func (ldi ListDetailedInfo) IDs() []uint64 {
res := make([]uint64, 0, len(ldi))
for _, di := range ldi {
res = append(res, di.ID)
}
return res
}