v1.6.8
This commit is contained in:
28
pkg/cloudbroker/image/ids.go
Normal file
28
pkg/cloudbroker/image/ids.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package image
|
||||
|
||||
// IDs gets array of ImageIDs from ListImages struct
|
||||
func (li ListImages) IDs() []uint64 {
|
||||
res := make([]uint64, 0, len(li.Data))
|
||||
for _, i := range li.Data {
|
||||
res = append(res, i.ID)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
// IDs gets array of StackIDs from ListStacks struct
|
||||
func (ls ListStacks) IDs() []uint64 {
|
||||
res := make([]uint64, 0, len(ls.Data))
|
||||
for _, h := range ls.Data {
|
||||
res = append(res, h.ID)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
// IDs gets array of HistoryIDs from ListHistory struct
|
||||
func (lh ListHistory) IDs() []uint64 {
|
||||
res := make([]uint64, 0, len(lh))
|
||||
for _, h := range lh {
|
||||
res = append(res, h.ID)
|
||||
}
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user