Documentation
¶
Index ¶
- Constants
- func EnforcePrefix(prefix any, listOpts *ListOpts)
- func EqualGVK(expected, actual schema.GroupVersionKind) problems.Problem
- func ParseLimit(s string) int
- type Filter
- type FilterOp
- type ListOpts
- type ListResponse
- type ListResponseLinks
- type Object
- type ObjectStore
- type Patch
- type PatchOp
- type SortOrder
- type Sorter
Constants ¶
View Source
const DefaultPageSize = 100
Variables ¶
This section is empty.
Functions ¶
func EnforcePrefix ¶
func ParseLimit ¶
ParseLimit parses a string into an integer, returning DefaultPageSize if the string is empty or cannot be parsed.
Types ¶
type Filter ¶
type Filter struct {
Path string `json:"path"`
Op FilterOp `json:"op"`
Value string `json:"value"`
}
func ParseFilter ¶
type ListResponse ¶
type ListResponse[T Object] struct { Links ListResponseLinks `json:"_links"` Items []T `json:"items"` }
type ListResponseLinks ¶
type ObjectStore ¶
type ObjectStore[T Object] interface { Info() (schema.GroupVersionResource, schema.GroupVersionKind) Ready() bool Get(ctx context.Context, namespace, name string) (T, error) List(ctx context.Context, opts ListOpts) (*ListResponse[T], error) Delete(ctx context.Context, namespace, name string) error CreateOrReplace(ctx context.Context, obj T) error Patch(ctx context.Context, namespace, name string, ops ...Patch) (T, error) }
Click to show internal directories.
Click to hide internal directories.