Documentation ¶
Index ¶
- func Get(ctx context.Context, s rest.StandardStorage, name string, ...) (runtime.Object, error)
- func GetV2(ctx context.Context, s rest.StandardStorage, name string, ...) (runtime.Object, error)
- func List(ctx context.Context, s rest.StandardStorage, q *query.Query) (runtime.Object, error)
- func ObjectMetaFilter(obj metav1.ObjectMeta, key, value string) bool
- func Watch(ctx context.Context, s rest.StandardStorage, q *query.Query) (watch.Interface, error)
- type CompareFunc
- type FilterFunc
- type ListToObjectSliceFunction
- type MutatingFunc
- type PageableResponse
- func DefaultList(object runtime.Object, q *query.Query, ...) (*PageableResponse, error)
- func DefaultListMerge(objects []runtime.Object, litToSliceFunc ListToObjectSliceFunction, ...) (*PageableResponse, error)
- func ListExV2(ctx context.Context, s rest.StandardStorage, q *query.Query, ...) (*PageableResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
func Get(ctx context.Context, s rest.StandardStorage, name string, resourceVersion string) (runtime.Object, error)
Deprecated
func GetV2 ¶
func GetV2(ctx context.Context, s rest.StandardStorage, name string, resourceVersion string, mutatingFunc MutatingFunc) (runtime.Object, error)
func ObjectMetaFilter ¶
func ObjectMetaFilter(obj metav1.ObjectMeta, key, value string) bool
Types ¶
type CompareFunc ¶
var DefaultCompareFunc CompareFunc = func(left runtime.Object, right runtime.Object, _ string) bool { leftMeta, _ := meta.Accessor(left) rightMeta, _ := meta.Accessor(right) if leftMeta.GetCreationTimestamp().Time.Equal(rightMeta.GetCreationTimestamp().Time) { return leftMeta.GetName() > rightMeta.GetName() } return leftMeta.GetCreationTimestamp().Time.After(rightMeta.GetCreationTimestamp().Time) }
type FilterFunc ¶
type MutatingFunc ¶
var DefaultMutatingFunc MutatingFunc = func(obj runtime.Object) runtime.Object {
return obj
}
type PageableResponse ¶
type PageableResponse struct { Items []interface{} `json:"items" description:"paging data"` TotalCount int `json:"totalCount" description:"total count"` }
func DefaultList ¶ added in v1.4.0
func DefaultList(object runtime.Object, q *query.Query, litToSliceFunc ListToObjectSliceFunction, compareFunc CompareFunc, mutatingFunc MutatingFunc) (*PageableResponse, error)
DefaultList a func to build a PageableResponse
func DefaultListMerge ¶ added in v1.4.0
func DefaultListMerge(objects []runtime.Object, litToSliceFunc ListToObjectSliceFunction, compareFunc CompareFunc, mutatingFunc MutatingFunc) (*PageableResponse, error)
DefaultListMerge a func to build a PageableResponse from many obj
func ListExV2 ¶
func ListExV2(ctx context.Context, s rest.StandardStorage, q *query.Query, litToSliceFunc ListToObjectSliceFunction, compareFunc CompareFunc, mutatingFunc MutatingFunc) (*PageableResponse, error)
Directories ¶
Path | Synopsis |
---|---|
mock
Package mock_cluster is a generated GoMock package.
|
Package mock_cluster is a generated GoMock package. |
mock
Package mock_iam is a generated GoMock package.
|
Package mock_iam is a generated GoMock package. |
mock
Package mock_lease is a generated GoMock package.
|
Package mock_lease is a generated GoMock package. |
mock
Package mock_operation is a generated GoMock package.
|
Package mock_operation is a generated GoMock package. |
mock
Package mock_platform is a generated GoMock package.
|
Package mock_platform is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.