listprocessor

package
v0.0.0-...-61e80cf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package listprocessor contains methods for filtering, sorting, and paginating lists of objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseQuery

func ParseQuery(apiOp *types.APIRequest, namespaceCache Cache) (informer.ListOptions, error)

ParseQuery parses the query params of a request and returns a ListOptions.

Types

type Cache

type Cache interface {
	// ListByOptions returns objects according to the specified list options and partitions.
	// Specifically:
	//   - an unstructured list of resources belonging to any of the specified partitions
	//   - the total number of resources (returned list might be a subset depending on pagination options in lo)
	//   - a continue token, if there are more pages after the returned one
	//   - an error instead of all of the above if anything went wrong
	ListByOptions(ctx context.Context, lo informer.ListOptions, partitions []partition.Partition, namespace string) (*unstructured.UnstructuredList, int, string, error)
}

type ListOptions

type ListOptions struct {
	ChunkSize  int
	Resume     string
	Filters    []informer.OrFilter
	Sort       informer.Sort
	Pagination informer.Pagination
}

ListOptions represents the query parameters that may be included in a list request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL