You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
861 B
38 lines
861 B
package bservice
|
|
|
|
// IDs gets array of BasicServiceIDs from ListBasicServices struct
|
|
func (lbs ListBasicServices) IDs() []uint64 {
|
|
res := make([]uint64, 0, len(lbs.Data))
|
|
for _, bs := range lbs.Data {
|
|
res = append(res, bs.ID)
|
|
}
|
|
return res
|
|
}
|
|
|
|
// IDs gets array of ComputeIDs from ListComputes struct
|
|
func (lc ListComputes) IDs() []uint64 {
|
|
res := make([]uint64, 0, len(lc))
|
|
for _, c := range lc {
|
|
res = append(res, c.ID)
|
|
}
|
|
return res
|
|
}
|
|
|
|
// IDs gets array of GroupIDs from ListGroups struct
|
|
func (lg ListGroups) IDs() []uint64 {
|
|
res := make([]uint64, 0, len(lg))
|
|
for _, g := range lg {
|
|
res = append(res, g.ID)
|
|
}
|
|
return res
|
|
}
|
|
|
|
// IDs gets array of GroupComputeIDs from ListGroupComputes struct
|
|
func (lgc ListGroupComputes) IDs() []uint64 {
|
|
res := make([]uint64, 0, len(lgc))
|
|
for _, gc := range lgc {
|
|
res = append(res, gc.ID)
|
|
}
|
|
return res
|
|
}
|