Exemple #1
0
// IDs returns an Int64Slice with all website ids
func (ws WebsiteSlice) IDs() utils.Int64Slice {
	if len(ws) == 0 {
		return nil
	}
	var ids utils.Int64Slice
	for _, w := range ws {
		if w != nil {
			ids.Append(w.Data.WebsiteID)
		}
	}
	return ids
}
Exemple #2
0
// IDs returns an Int64Slice with all store ids
func (s StoreSlice) IDs() utils.Int64Slice {
	if len(s) == 0 {
		return nil
	}
	var ids utils.Int64Slice
	for _, st := range s {
		if st != nil {
			ids.Append(st.Data().StoreID)
		}
	}
	return ids
}
Exemple #3
0
// IDs returns an Int64Slice with all store ids
func (s TableStoreSlice) IDs() utils.Int64Slice {
	if len(s) == 0 {
		return nil
	}
	var ids utils.Int64Slice
	for _, store := range s {
		if store != nil {
			ids.Append(store.StoreID)
		}
	}
	return ids
}
Exemple #4
0
// IDs returns an Int64Slice with all store ids
func (s GroupSlice) IDs() utils.Int64Slice {
	if len(s) == 0 {
		return nil
	}
	var ids utils.Int64Slice
	for _, g := range s {
		if g != nil {
			ids.Append(g.Data().GroupID)
		}
	}
	return ids
}