...
1
16
17 package metadata
18
19 import (
20 "context"
21
22 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
23 "k8s.io/apimachinery/pkg/runtime/schema"
24 "k8s.io/apimachinery/pkg/types"
25 "k8s.io/apimachinery/pkg/watch"
26 )
27
28
29
30 type Interface interface {
31 Resource(resource schema.GroupVersionResource) Getter
32 }
33
34
35
36 type ResourceInterface interface {
37 Delete(ctx context.Context, name string, options metav1.DeleteOptions, subresources ...string) error
38 DeleteCollection(ctx context.Context, options metav1.DeleteOptions, listOptions metav1.ListOptions) error
39 Get(ctx context.Context, name string, options metav1.GetOptions, subresources ...string) (*metav1.PartialObjectMetadata, error)
40 List(ctx context.Context, opts metav1.ListOptions) (*metav1.PartialObjectMetadataList, error)
41 Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
42 Patch(ctx context.Context, name string, pt types.PatchType, data []byte, options metav1.PatchOptions, subresources ...string) (*metav1.PartialObjectMetadata, error)
43 }
44
45
46 type Getter interface {
47 Namespace(string) ResourceInterface
48 ResourceInterface
49 }
50
View as plain text