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.
29 lines
620 B
29 lines
620 B
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
|
|
}
|