// toPriorityClassLists merges a list of PriorityClass with a list of PriorityClass to create a simpler, unified list
toPriorityClassLists merges a list of PriorityClass with a list of PriorityClass to create a simpler, unified list
// toPriorityClassLists merges a list of PriorityClass with a list of PriorityClass to create a simpler unified list
func toPriorityClassLists(priorityClasses []scheduling.PriorityClass, nonCriticalErrors []error,
	dsQuery *dataselect.DataSelectQuery) *PriorityClassList {
	result := &PriorityClassList{
		ListMeta: api.ListMeta{TotalItems: len(priorityClasses)},
		Errors:   nonCriticalErrors,
	}
	items := make([]PriorityClass, 0)
	for _, item := range priorityClasses {
		items = append(items, toPriorityClass(item))
	}
	roleCells, filteredTotal := dataselect.GenericDataSelectWithFilter(toCells(items), dsQuery)
	result.ListMeta = api.ListMeta{TotalItems: filteredTotal}
	result.Items = fromCells(roleCells)
	return result
}
func toPriorityClassLists ( priorityClasses [ ] scheduling . PriorityClass , nonCriticalErrors [ ] error , dsQuery * dataselect . DataSelectQuery ) * PriorityClassList { result := & PriorityClassList { ListMeta : api . ListMeta { TotalItems : len ( priorityClasses ) } , Errors : nonCriticalErrors , } items := make ( [ ] PriorityClass , 0 ) for _ , item := range priorityClasses { items = append ( items , toPriorityClass ( item ) ) } roleCells , filteredTotal := dataselect . GenericDataSelectWithFilter ( toCells ( items ) , dsQuery ) result . ListMeta = api . ListMeta { TotalItems : filteredTotal } result . Items = fromCells ( roleCells ) return result }
toPriorityClassLists merges a list of PriorityClass with a list of PriorityClass to create a simpler, unified list
toPriorityClassLists merges a list of PriorityClass with a list of PriorityClass to create a simpler unified list