| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
package v1 |
| 20 |
|
| 21 |
import ( |
| 22 |
context "context" |
| 23 |
|
| 24 |
networkingv1 "k8s.io/api/networking/v1" |
| 25 |
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
| 26 |
types "k8s.io/apimachinery/pkg/types" |
| 27 |
watch "k8s.io/apimachinery/pkg/watch" |
| 28 |
applyconfigurationsnetworkingv1 "k8s.io/client-go/applyconfigurations/networking/v1" |
| 29 |
gentype "k8s.io/client-go/gentype" |
| 30 |
scheme "k8s.io/client-go/kubernetes/scheme" |
| 31 |
) |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
type IngressesGetter interface { |
| 36 |
Ingresses(namespace string) IngressInterface |
| 37 |
} |
| 38 |
|
| 39 |
|
| 40 |
type IngressInterface interface { |
| 41 |
Create(ctx context.Context, ingress *networkingv1.Ingress, opts metav1.CreateOptions) (*networkingv1.Ingress, error) |
| 42 |
Update(ctx context.Context, ingress *networkingv1.Ingress, opts metav1.UpdateOptions) (*networkingv1.Ingress, error) |
| 43 |
|
| 44 |
UpdateStatus(ctx context.Context, ingress *networkingv1.Ingress, opts metav1.UpdateOptions) (*networkingv1.Ingress, error) |
| 45 |
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error |
| 46 |
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error |
| 47 |
Get(ctx context.Context, name string, opts metav1.GetOptions) (*networkingv1.Ingress, error) |
| 48 |
List(ctx context.Context, opts metav1.ListOptions) (*networkingv1.IngressList, error) |
| 49 |
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) |
| 50 |
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *networkingv1.Ingress, err error) |
| 51 |
Apply(ctx context.Context, ingress *applyconfigurationsnetworkingv1.IngressApplyConfiguration, opts metav1.ApplyOptions) (result *networkingv1.Ingress, err error) |
| 52 |
|
| 53 |
ApplyStatus(ctx context.Context, ingress *applyconfigurationsnetworkingv1.IngressApplyConfiguration, opts metav1.ApplyOptions) (result *networkingv1.Ingress, err error) |
| 54 |
IngressExpansion |
| 55 |
} |
| 56 |
|
| 57 |
|
| 58 |
type ingresses struct { |
| 59 |
*gentype.ClientWithListAndApply[*networkingv1.Ingress, *networkingv1.IngressList, *applyconfigurationsnetworkingv1.IngressApplyConfiguration] |
| 60 |
} |
| 61 |
|
| 62 |
|
| 63 |
func newIngresses(c *NetworkingV1Client, namespace string) *ingresses { |
| 64 |
return &ingresses{ |
| 65 |
gentype.NewClientWithListAndApply[*networkingv1.Ingress, *networkingv1.IngressList, *applyconfigurationsnetworkingv1.IngressApplyConfiguration]( |
| 66 |
"ingresses", |
| 67 |
c.RESTClient(), |
| 68 |
scheme.ParameterCodec, |
| 69 |
namespace, |
| 70 |
func() *networkingv1.Ingress { return &networkingv1.Ingress{} }, |
| 71 |
func() *networkingv1.IngressList { return &networkingv1.IngressList{} }, |
| 72 |
gentype.PrefersProtobuf[*networkingv1.Ingress](), |
| 73 |
), |
| 74 |
} |
| 75 |
} |