Merge pull request #4666 from wallrj/remove-client-code-for-deprecated-api-versions

Remove client code for deprecated api versions
This commit is contained in:
jetstack-bot
2021-12-16 10:49:09 +00:00
committed by GitHub
153 changed files with 2 additions and 12398 deletions
-6
View File
@@ -73,13 +73,7 @@ filegroup(
"//pkg/client/clientset/versioned:all-srcs",
"//pkg/client/informers/externalversions:all-srcs",
"//pkg/client/listers/acme/v1:all-srcs",
"//pkg/client/listers/acme/v1alpha2:all-srcs",
"//pkg/client/listers/acme/v1alpha3:all-srcs",
"//pkg/client/listers/acme/v1beta1:all-srcs",
"//pkg/client/listers/certmanager/v1:all-srcs",
"//pkg/client/listers/certmanager/v1alpha2:all-srcs",
"//pkg/client/listers/certmanager/v1alpha3:all-srcs",
"//pkg/client/listers/certmanager/v1beta1:all-srcs",
"//pkg/controller:all-srcs",
"//pkg/ctl:all-srcs",
"//pkg/feature:all-srcs",
-6
View File
@@ -58,13 +58,7 @@ client_subpackage="pkg/client"
client_package="${module_name}/${client_subpackage}"
# Generate clientsets, listers and informers for user-facing API types
client_inputs=(
pkg/apis/certmanager/v1alpha2 \
pkg/apis/certmanager/v1alpha3 \
pkg/apis/certmanager/v1beta1 \
pkg/apis/certmanager/v1 \
pkg/apis/acme/v1alpha2 \
pkg/apis/acme/v1alpha3 \
pkg/apis/acme/v1beta1 \
pkg/apis/acme/v1 \
)
@@ -10,13 +10,7 @@ go_library(
visibility = ["//visibility:public"],
deps = [
"//pkg/client/clientset/versioned/typed/acme/v1:go_default_library",
"//pkg/client/clientset/versioned/typed/acme/v1alpha2:go_default_library",
"//pkg/client/clientset/versioned/typed/acme/v1alpha3:go_default_library",
"//pkg/client/clientset/versioned/typed/acme/v1beta1:go_default_library",
"//pkg/client/clientset/versioned/typed/certmanager/v1:go_default_library",
"//pkg/client/clientset/versioned/typed/certmanager/v1alpha2:go_default_library",
"//pkg/client/clientset/versioned/typed/certmanager/v1alpha3:go_default_library",
"//pkg/client/clientset/versioned/typed/certmanager/v1beta1:go_default_library",
"@io_k8s_client_go//discovery:go_default_library",
"@io_k8s_client_go//rest:go_default_library",
"@io_k8s_client_go//util/flowcontrol:go_default_library",
@@ -37,13 +31,7 @@ filegroup(
"//pkg/client/clientset/versioned/fake:all-srcs",
"//pkg/client/clientset/versioned/scheme:all-srcs",
"//pkg/client/clientset/versioned/typed/acme/v1:all-srcs",
"//pkg/client/clientset/versioned/typed/acme/v1alpha2:all-srcs",
"//pkg/client/clientset/versioned/typed/acme/v1alpha3:all-srcs",
"//pkg/client/clientset/versioned/typed/acme/v1beta1:all-srcs",
"//pkg/client/clientset/versioned/typed/certmanager/v1:all-srcs",
"//pkg/client/clientset/versioned/typed/certmanager/v1alpha2:all-srcs",
"//pkg/client/clientset/versioned/typed/certmanager/v1alpha3:all-srcs",
"//pkg/client/clientset/versioned/typed/certmanager/v1beta1:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
+2 -86
View File
@@ -22,13 +22,7 @@ import (
"fmt"
acmev1 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/acme/v1"
acmev1alpha2 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/acme/v1alpha2"
acmev1alpha3 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/acme/v1alpha3"
acmev1beta1 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/acme/v1beta1"
certmanagerv1 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1"
certmanagerv1alpha2 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1alpha2"
certmanagerv1alpha3 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1alpha3"
certmanagerv1beta1 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1beta1"
discovery "k8s.io/client-go/discovery"
rest "k8s.io/client-go/rest"
flowcontrol "k8s.io/client-go/util/flowcontrol"
@@ -36,13 +30,7 @@ import (
type Interface interface {
Discovery() discovery.DiscoveryInterface
AcmeV1alpha2() acmev1alpha2.AcmeV1alpha2Interface
AcmeV1alpha3() acmev1alpha3.AcmeV1alpha3Interface
AcmeV1beta1() acmev1beta1.AcmeV1beta1Interface
AcmeV1() acmev1.AcmeV1Interface
CertmanagerV1alpha2() certmanagerv1alpha2.CertmanagerV1alpha2Interface
CertmanagerV1alpha3() certmanagerv1alpha3.CertmanagerV1alpha3Interface
CertmanagerV1beta1() certmanagerv1beta1.CertmanagerV1beta1Interface
CertmanagerV1() certmanagerv1.CertmanagerV1Interface
}
@@ -50,29 +38,8 @@ type Interface interface {
// version included in a Clientset.
type Clientset struct {
*discovery.DiscoveryClient
acmeV1alpha2 *acmev1alpha2.AcmeV1alpha2Client
acmeV1alpha3 *acmev1alpha3.AcmeV1alpha3Client
acmeV1beta1 *acmev1beta1.AcmeV1beta1Client
acmeV1 *acmev1.AcmeV1Client
certmanagerV1alpha2 *certmanagerv1alpha2.CertmanagerV1alpha2Client
certmanagerV1alpha3 *certmanagerv1alpha3.CertmanagerV1alpha3Client
certmanagerV1beta1 *certmanagerv1beta1.CertmanagerV1beta1Client
certmanagerV1 *certmanagerv1.CertmanagerV1Client
}
// AcmeV1alpha2 retrieves the AcmeV1alpha2Client
func (c *Clientset) AcmeV1alpha2() acmev1alpha2.AcmeV1alpha2Interface {
return c.acmeV1alpha2
}
// AcmeV1alpha3 retrieves the AcmeV1alpha3Client
func (c *Clientset) AcmeV1alpha3() acmev1alpha3.AcmeV1alpha3Interface {
return c.acmeV1alpha3
}
// AcmeV1beta1 retrieves the AcmeV1beta1Client
func (c *Clientset) AcmeV1beta1() acmev1beta1.AcmeV1beta1Interface {
return c.acmeV1beta1
acmeV1 *acmev1.AcmeV1Client
certmanagerV1 *certmanagerv1.CertmanagerV1Client
}
// AcmeV1 retrieves the AcmeV1Client
@@ -80,21 +47,6 @@ func (c *Clientset) AcmeV1() acmev1.AcmeV1Interface {
return c.acmeV1
}
// CertmanagerV1alpha2 retrieves the CertmanagerV1alpha2Client
func (c *Clientset) CertmanagerV1alpha2() certmanagerv1alpha2.CertmanagerV1alpha2Interface {
return c.certmanagerV1alpha2
}
// CertmanagerV1alpha3 retrieves the CertmanagerV1alpha3Client
func (c *Clientset) CertmanagerV1alpha3() certmanagerv1alpha3.CertmanagerV1alpha3Interface {
return c.certmanagerV1alpha3
}
// CertmanagerV1beta1 retrieves the CertmanagerV1beta1Client
func (c *Clientset) CertmanagerV1beta1() certmanagerv1beta1.CertmanagerV1beta1Interface {
return c.certmanagerV1beta1
}
// CertmanagerV1 retrieves the CertmanagerV1Client
func (c *Clientset) CertmanagerV1() certmanagerv1.CertmanagerV1Interface {
return c.certmanagerV1
@@ -121,34 +73,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
}
var cs Clientset
var err error
cs.acmeV1alpha2, err = acmev1alpha2.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.acmeV1alpha3, err = acmev1alpha3.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.acmeV1beta1, err = acmev1beta1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.acmeV1, err = acmev1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.certmanagerV1alpha2, err = certmanagerv1alpha2.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.certmanagerV1alpha3, err = certmanagerv1alpha3.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.certmanagerV1beta1, err = certmanagerv1beta1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.certmanagerV1, err = certmanagerv1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
@@ -165,13 +93,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *Clientset {
var cs Clientset
cs.acmeV1alpha2 = acmev1alpha2.NewForConfigOrDie(c)
cs.acmeV1alpha3 = acmev1alpha3.NewForConfigOrDie(c)
cs.acmeV1beta1 = acmev1beta1.NewForConfigOrDie(c)
cs.acmeV1 = acmev1.NewForConfigOrDie(c)
cs.certmanagerV1alpha2 = certmanagerv1alpha2.NewForConfigOrDie(c)
cs.certmanagerV1alpha3 = certmanagerv1alpha3.NewForConfigOrDie(c)
cs.certmanagerV1beta1 = certmanagerv1beta1.NewForConfigOrDie(c)
cs.certmanagerV1 = certmanagerv1.NewForConfigOrDie(c)
cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
@@ -181,13 +103,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
// New creates a new Clientset for the given RESTClient.
func New(c rest.Interface) *Clientset {
var cs Clientset
cs.acmeV1alpha2 = acmev1alpha2.New(c)
cs.acmeV1alpha3 = acmev1alpha3.New(c)
cs.acmeV1beta1 = acmev1beta1.New(c)
cs.acmeV1 = acmev1.New(c)
cs.certmanagerV1alpha2 = certmanagerv1alpha2.New(c)
cs.certmanagerV1alpha3 = certmanagerv1alpha3.New(c)
cs.certmanagerV1beta1 = certmanagerv1beta1.New(c)
cs.certmanagerV1 = certmanagerv1.New(c)
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
@@ -11,30 +11,12 @@ go_library(
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/acme/v1:go_default_library",
"//pkg/apis/acme/v1alpha2:go_default_library",
"//pkg/apis/acme/v1alpha3:go_default_library",
"//pkg/apis/acme/v1beta1:go_default_library",
"//pkg/apis/certmanager/v1:go_default_library",
"//pkg/apis/certmanager/v1alpha2:go_default_library",
"//pkg/apis/certmanager/v1alpha3:go_default_library",
"//pkg/apis/certmanager/v1beta1:go_default_library",
"//pkg/client/clientset/versioned:go_default_library",
"//pkg/client/clientset/versioned/typed/acme/v1:go_default_library",
"//pkg/client/clientset/versioned/typed/acme/v1/fake:go_default_library",
"//pkg/client/clientset/versioned/typed/acme/v1alpha2:go_default_library",
"//pkg/client/clientset/versioned/typed/acme/v1alpha2/fake:go_default_library",
"//pkg/client/clientset/versioned/typed/acme/v1alpha3:go_default_library",
"//pkg/client/clientset/versioned/typed/acme/v1alpha3/fake:go_default_library",
"//pkg/client/clientset/versioned/typed/acme/v1beta1:go_default_library",
"//pkg/client/clientset/versioned/typed/acme/v1beta1/fake:go_default_library",
"//pkg/client/clientset/versioned/typed/certmanager/v1:go_default_library",
"//pkg/client/clientset/versioned/typed/certmanager/v1/fake:go_default_library",
"//pkg/client/clientset/versioned/typed/certmanager/v1alpha2:go_default_library",
"//pkg/client/clientset/versioned/typed/certmanager/v1alpha2/fake:go_default_library",
"//pkg/client/clientset/versioned/typed/certmanager/v1alpha3:go_default_library",
"//pkg/client/clientset/versioned/typed/certmanager/v1alpha3/fake:go_default_library",
"//pkg/client/clientset/versioned/typed/certmanager/v1beta1:go_default_library",
"//pkg/client/clientset/versioned/typed/certmanager/v1beta1/fake:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/runtime:go_default_library",
"@io_k8s_apimachinery//pkg/runtime/schema:go_default_library",
@@ -22,20 +22,8 @@ import (
clientset "github.com/jetstack/cert-manager/pkg/client/clientset/versioned"
acmev1 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/acme/v1"
fakeacmev1 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/acme/v1/fake"
acmev1alpha2 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/acme/v1alpha2"
fakeacmev1alpha2 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/acme/v1alpha2/fake"
acmev1alpha3 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/acme/v1alpha3"
fakeacmev1alpha3 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/acme/v1alpha3/fake"
acmev1beta1 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/acme/v1beta1"
fakeacmev1beta1 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/acme/v1beta1/fake"
certmanagerv1 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1"
fakecertmanagerv1 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1/fake"
certmanagerv1alpha2 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1alpha2"
fakecertmanagerv1alpha2 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1alpha2/fake"
certmanagerv1alpha3 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1alpha3"
fakecertmanagerv1alpha3 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1alpha3/fake"
certmanagerv1beta1 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1beta1"
fakecertmanagerv1beta1 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1beta1/fake"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/discovery"
@@ -93,41 +81,11 @@ var (
_ testing.FakeClient = &Clientset{}
)
// AcmeV1alpha2 retrieves the AcmeV1alpha2Client
func (c *Clientset) AcmeV1alpha2() acmev1alpha2.AcmeV1alpha2Interface {
return &fakeacmev1alpha2.FakeAcmeV1alpha2{Fake: &c.Fake}
}
// AcmeV1alpha3 retrieves the AcmeV1alpha3Client
func (c *Clientset) AcmeV1alpha3() acmev1alpha3.AcmeV1alpha3Interface {
return &fakeacmev1alpha3.FakeAcmeV1alpha3{Fake: &c.Fake}
}
// AcmeV1beta1 retrieves the AcmeV1beta1Client
func (c *Clientset) AcmeV1beta1() acmev1beta1.AcmeV1beta1Interface {
return &fakeacmev1beta1.FakeAcmeV1beta1{Fake: &c.Fake}
}
// AcmeV1 retrieves the AcmeV1Client
func (c *Clientset) AcmeV1() acmev1.AcmeV1Interface {
return &fakeacmev1.FakeAcmeV1{Fake: &c.Fake}
}
// CertmanagerV1alpha2 retrieves the CertmanagerV1alpha2Client
func (c *Clientset) CertmanagerV1alpha2() certmanagerv1alpha2.CertmanagerV1alpha2Interface {
return &fakecertmanagerv1alpha2.FakeCertmanagerV1alpha2{Fake: &c.Fake}
}
// CertmanagerV1alpha3 retrieves the CertmanagerV1alpha3Client
func (c *Clientset) CertmanagerV1alpha3() certmanagerv1alpha3.CertmanagerV1alpha3Interface {
return &fakecertmanagerv1alpha3.FakeCertmanagerV1alpha3{Fake: &c.Fake}
}
// CertmanagerV1beta1 retrieves the CertmanagerV1beta1Client
func (c *Clientset) CertmanagerV1beta1() certmanagerv1beta1.CertmanagerV1beta1Interface {
return &fakecertmanagerv1beta1.FakeCertmanagerV1beta1{Fake: &c.Fake}
}
// CertmanagerV1 retrieves the CertmanagerV1Client
func (c *Clientset) CertmanagerV1() certmanagerv1.CertmanagerV1Interface {
return &fakecertmanagerv1.FakeCertmanagerV1{Fake: &c.Fake}
@@ -20,13 +20,7 @@ package fake
import (
acmev1 "github.com/jetstack/cert-manager/pkg/apis/acme/v1"
acmev1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
acmev1alpha3 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha3"
acmev1beta1 "github.com/jetstack/cert-manager/pkg/apis/acme/v1beta1"
certmanagerv1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1"
certmanagerv1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
certmanagerv1alpha3 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha3"
certmanagerv1beta1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -38,13 +32,7 @@ var scheme = runtime.NewScheme()
var codecs = serializer.NewCodecFactory(scheme)
var localSchemeBuilder = runtime.SchemeBuilder{
acmev1alpha2.AddToScheme,
acmev1alpha3.AddToScheme,
acmev1beta1.AddToScheme,
acmev1.AddToScheme,
certmanagerv1alpha2.AddToScheme,
certmanagerv1alpha3.AddToScheme,
certmanagerv1beta1.AddToScheme,
certmanagerv1.AddToScheme,
}
@@ -10,13 +10,7 @@ go_library(
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/acme/v1:go_default_library",
"//pkg/apis/acme/v1alpha2:go_default_library",
"//pkg/apis/acme/v1alpha3:go_default_library",
"//pkg/apis/acme/v1beta1:go_default_library",
"//pkg/apis/certmanager/v1:go_default_library",
"//pkg/apis/certmanager/v1alpha2:go_default_library",
"//pkg/apis/certmanager/v1alpha3:go_default_library",
"//pkg/apis/certmanager/v1beta1:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/runtime:go_default_library",
"@io_k8s_apimachinery//pkg/runtime/schema:go_default_library",
@@ -20,13 +20,7 @@ package scheme
import (
acmev1 "github.com/jetstack/cert-manager/pkg/apis/acme/v1"
acmev1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
acmev1alpha3 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha3"
acmev1beta1 "github.com/jetstack/cert-manager/pkg/apis/acme/v1beta1"
certmanagerv1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1"
certmanagerv1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
certmanagerv1alpha3 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha3"
certmanagerv1beta1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -38,13 +32,7 @@ var Scheme = runtime.NewScheme()
var Codecs = serializer.NewCodecFactory(Scheme)
var ParameterCodec = runtime.NewParameterCodec(Scheme)
var localSchemeBuilder = runtime.SchemeBuilder{
acmev1alpha2.AddToScheme,
acmev1alpha3.AddToScheme,
acmev1beta1.AddToScheme,
acmev1.AddToScheme,
certmanagerv1alpha2.AddToScheme,
certmanagerv1alpha3.AddToScheme,
certmanagerv1beta1.AddToScheme,
certmanagerv1.AddToScheme,
}
@@ -1,39 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"acme_client.go",
"challenge.go",
"doc.go",
"generated_expansion.go",
"order.go",
],
importpath = "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/acme/v1alpha2",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/acme/v1alpha2:go_default_library",
"//pkg/client/clientset/versioned/scheme:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/types:go_default_library",
"@io_k8s_apimachinery//pkg/watch:go_default_library",
"@io_k8s_client_go//rest:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//pkg/client/clientset/versioned/typed/acme/v1alpha2/fake:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
@@ -1,94 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha2
import (
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
"github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
rest "k8s.io/client-go/rest"
)
type AcmeV1alpha2Interface interface {
RESTClient() rest.Interface
ChallengesGetter
OrdersGetter
}
// AcmeV1alpha2Client is used to interact with features provided by the acme.cert-manager.io group.
type AcmeV1alpha2Client struct {
restClient rest.Interface
}
func (c *AcmeV1alpha2Client) Challenges(namespace string) ChallengeInterface {
return newChallenges(c, namespace)
}
func (c *AcmeV1alpha2Client) Orders(namespace string) OrderInterface {
return newOrders(c, namespace)
}
// NewForConfig creates a new AcmeV1alpha2Client for the given config.
func NewForConfig(c *rest.Config) (*AcmeV1alpha2Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &AcmeV1alpha2Client{client}, nil
}
// NewForConfigOrDie creates a new AcmeV1alpha2Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *AcmeV1alpha2Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new AcmeV1alpha2Client for the given RESTClient.
func New(c rest.Interface) *AcmeV1alpha2Client {
return &AcmeV1alpha2Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1alpha2.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *AcmeV1alpha2Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}
@@ -1,195 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha2
import (
"context"
"time"
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
scheme "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// ChallengesGetter has a method to return a ChallengeInterface.
// A group's client should implement this interface.
type ChallengesGetter interface {
Challenges(namespace string) ChallengeInterface
}
// ChallengeInterface has methods to work with Challenge resources.
type ChallengeInterface interface {
Create(ctx context.Context, challenge *v1alpha2.Challenge, opts v1.CreateOptions) (*v1alpha2.Challenge, error)
Update(ctx context.Context, challenge *v1alpha2.Challenge, opts v1.UpdateOptions) (*v1alpha2.Challenge, error)
UpdateStatus(ctx context.Context, challenge *v1alpha2.Challenge, opts v1.UpdateOptions) (*v1alpha2.Challenge, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.Challenge, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ChallengeList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.Challenge, err error)
ChallengeExpansion
}
// challenges implements ChallengeInterface
type challenges struct {
client rest.Interface
ns string
}
// newChallenges returns a Challenges
func newChallenges(c *AcmeV1alpha2Client, namespace string) *challenges {
return &challenges{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the challenge, and returns the corresponding challenge object, and an error if there is any.
func (c *challenges) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.Challenge, err error) {
result = &v1alpha2.Challenge{}
err = c.client.Get().
Namespace(c.ns).
Resource("challenges").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Challenges that match those selectors.
func (c *challenges) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ChallengeList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.ChallengeList{}
err = c.client.Get().
Namespace(c.ns).
Resource("challenges").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested challenges.
func (c *challenges) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("challenges").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a challenge and creates it. Returns the server's representation of the challenge, and an error, if there is any.
func (c *challenges) Create(ctx context.Context, challenge *v1alpha2.Challenge, opts v1.CreateOptions) (result *v1alpha2.Challenge, err error) {
result = &v1alpha2.Challenge{}
err = c.client.Post().
Namespace(c.ns).
Resource("challenges").
VersionedParams(&opts, scheme.ParameterCodec).
Body(challenge).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a challenge and updates it. Returns the server's representation of the challenge, and an error, if there is any.
func (c *challenges) Update(ctx context.Context, challenge *v1alpha2.Challenge, opts v1.UpdateOptions) (result *v1alpha2.Challenge, err error) {
result = &v1alpha2.Challenge{}
err = c.client.Put().
Namespace(c.ns).
Resource("challenges").
Name(challenge.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(challenge).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *challenges) UpdateStatus(ctx context.Context, challenge *v1alpha2.Challenge, opts v1.UpdateOptions) (result *v1alpha2.Challenge, err error) {
result = &v1alpha2.Challenge{}
err = c.client.Put().
Namespace(c.ns).
Resource("challenges").
Name(challenge.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(challenge).
Do(ctx).
Into(result)
return
}
// Delete takes name of the challenge and deletes it. Returns an error if one occurs.
func (c *challenges) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("challenges").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *challenges) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("challenges").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched challenge.
func (c *challenges) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.Challenge, err error) {
result = &v1alpha2.Challenge{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("challenges").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,20 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v1alpha2
@@ -1,38 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"fake_acme_client.go",
"fake_challenge.go",
"fake_order.go",
],
importpath = "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/acme/v1alpha2/fake",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/acme/v1alpha2:go_default_library",
"//pkg/client/clientset/versioned/typed/acme/v1alpha2:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/labels:go_default_library",
"@io_k8s_apimachinery//pkg/runtime/schema:go_default_library",
"@io_k8s_apimachinery//pkg/types:go_default_library",
"@io_k8s_apimachinery//pkg/watch:go_default_library",
"@io_k8s_client_go//rest:go_default_library",
"@io_k8s_client_go//testing:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
@@ -1,20 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// Package fake has the automatically generated clients.
package fake
@@ -1,44 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha2 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/acme/v1alpha2"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeAcmeV1alpha2 struct {
*testing.Fake
}
func (c *FakeAcmeV1alpha2) Challenges(namespace string) v1alpha2.ChallengeInterface {
return &FakeChallenges{c, namespace}
}
func (c *FakeAcmeV1alpha2) Orders(namespace string) v1alpha2.OrderInterface {
return &FakeOrders{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeAcmeV1alpha2) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}
@@ -1,142 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeChallenges implements ChallengeInterface
type FakeChallenges struct {
Fake *FakeAcmeV1alpha2
ns string
}
var challengesResource = schema.GroupVersionResource{Group: "acme.cert-manager.io", Version: "v1alpha2", Resource: "challenges"}
var challengesKind = schema.GroupVersionKind{Group: "acme.cert-manager.io", Version: "v1alpha2", Kind: "Challenge"}
// Get takes name of the challenge, and returns the corresponding challenge object, and an error if there is any.
func (c *FakeChallenges) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.Challenge, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(challengesResource, c.ns, name), &v1alpha2.Challenge{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Challenge), err
}
// List takes label and field selectors, and returns the list of Challenges that match those selectors.
func (c *FakeChallenges) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ChallengeList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(challengesResource, challengesKind, c.ns, opts), &v1alpha2.ChallengeList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha2.ChallengeList{ListMeta: obj.(*v1alpha2.ChallengeList).ListMeta}
for _, item := range obj.(*v1alpha2.ChallengeList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested challenges.
func (c *FakeChallenges) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(challengesResource, c.ns, opts))
}
// Create takes the representation of a challenge and creates it. Returns the server's representation of the challenge, and an error, if there is any.
func (c *FakeChallenges) Create(ctx context.Context, challenge *v1alpha2.Challenge, opts v1.CreateOptions) (result *v1alpha2.Challenge, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(challengesResource, c.ns, challenge), &v1alpha2.Challenge{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Challenge), err
}
// Update takes the representation of a challenge and updates it. Returns the server's representation of the challenge, and an error, if there is any.
func (c *FakeChallenges) Update(ctx context.Context, challenge *v1alpha2.Challenge, opts v1.UpdateOptions) (result *v1alpha2.Challenge, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(challengesResource, c.ns, challenge), &v1alpha2.Challenge{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Challenge), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeChallenges) UpdateStatus(ctx context.Context, challenge *v1alpha2.Challenge, opts v1.UpdateOptions) (*v1alpha2.Challenge, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(challengesResource, "status", c.ns, challenge), &v1alpha2.Challenge{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Challenge), err
}
// Delete takes name of the challenge and deletes it. Returns an error if one occurs.
func (c *FakeChallenges) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(challengesResource, c.ns, name), &v1alpha2.Challenge{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeChallenges) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(challengesResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha2.ChallengeList{})
return err
}
// Patch applies the patch and returns the patched challenge.
func (c *FakeChallenges) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.Challenge, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(challengesResource, c.ns, name, pt, data, subresources...), &v1alpha2.Challenge{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Challenge), err
}
@@ -1,142 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeOrders implements OrderInterface
type FakeOrders struct {
Fake *FakeAcmeV1alpha2
ns string
}
var ordersResource = schema.GroupVersionResource{Group: "acme.cert-manager.io", Version: "v1alpha2", Resource: "orders"}
var ordersKind = schema.GroupVersionKind{Group: "acme.cert-manager.io", Version: "v1alpha2", Kind: "Order"}
// Get takes name of the order, and returns the corresponding order object, and an error if there is any.
func (c *FakeOrders) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.Order, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(ordersResource, c.ns, name), &v1alpha2.Order{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Order), err
}
// List takes label and field selectors, and returns the list of Orders that match those selectors.
func (c *FakeOrders) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.OrderList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(ordersResource, ordersKind, c.ns, opts), &v1alpha2.OrderList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha2.OrderList{ListMeta: obj.(*v1alpha2.OrderList).ListMeta}
for _, item := range obj.(*v1alpha2.OrderList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested orders.
func (c *FakeOrders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(ordersResource, c.ns, opts))
}
// Create takes the representation of a order and creates it. Returns the server's representation of the order, and an error, if there is any.
func (c *FakeOrders) Create(ctx context.Context, order *v1alpha2.Order, opts v1.CreateOptions) (result *v1alpha2.Order, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(ordersResource, c.ns, order), &v1alpha2.Order{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Order), err
}
// Update takes the representation of a order and updates it. Returns the server's representation of the order, and an error, if there is any.
func (c *FakeOrders) Update(ctx context.Context, order *v1alpha2.Order, opts v1.UpdateOptions) (result *v1alpha2.Order, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(ordersResource, c.ns, order), &v1alpha2.Order{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Order), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeOrders) UpdateStatus(ctx context.Context, order *v1alpha2.Order, opts v1.UpdateOptions) (*v1alpha2.Order, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(ordersResource, "status", c.ns, order), &v1alpha2.Order{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Order), err
}
// Delete takes name of the order and deletes it. Returns an error if one occurs.
func (c *FakeOrders) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(ordersResource, c.ns, name), &v1alpha2.Order{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeOrders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(ordersResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha2.OrderList{})
return err
}
// Patch applies the patch and returns the patched order.
func (c *FakeOrders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.Order, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(ordersResource, c.ns, name, pt, data, subresources...), &v1alpha2.Order{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Order), err
}
@@ -1,23 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha2
type ChallengeExpansion interface{}
type OrderExpansion interface{}
@@ -1,195 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha2
import (
"context"
"time"
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
scheme "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// OrdersGetter has a method to return a OrderInterface.
// A group's client should implement this interface.
type OrdersGetter interface {
Orders(namespace string) OrderInterface
}
// OrderInterface has methods to work with Order resources.
type OrderInterface interface {
Create(ctx context.Context, order *v1alpha2.Order, opts v1.CreateOptions) (*v1alpha2.Order, error)
Update(ctx context.Context, order *v1alpha2.Order, opts v1.UpdateOptions) (*v1alpha2.Order, error)
UpdateStatus(ctx context.Context, order *v1alpha2.Order, opts v1.UpdateOptions) (*v1alpha2.Order, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.Order, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.OrderList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.Order, err error)
OrderExpansion
}
// orders implements OrderInterface
type orders struct {
client rest.Interface
ns string
}
// newOrders returns a Orders
func newOrders(c *AcmeV1alpha2Client, namespace string) *orders {
return &orders{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the order, and returns the corresponding order object, and an error if there is any.
func (c *orders) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.Order, err error) {
result = &v1alpha2.Order{}
err = c.client.Get().
Namespace(c.ns).
Resource("orders").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Orders that match those selectors.
func (c *orders) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.OrderList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.OrderList{}
err = c.client.Get().
Namespace(c.ns).
Resource("orders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested orders.
func (c *orders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("orders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a order and creates it. Returns the server's representation of the order, and an error, if there is any.
func (c *orders) Create(ctx context.Context, order *v1alpha2.Order, opts v1.CreateOptions) (result *v1alpha2.Order, err error) {
result = &v1alpha2.Order{}
err = c.client.Post().
Namespace(c.ns).
Resource("orders").
VersionedParams(&opts, scheme.ParameterCodec).
Body(order).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a order and updates it. Returns the server's representation of the order, and an error, if there is any.
func (c *orders) Update(ctx context.Context, order *v1alpha2.Order, opts v1.UpdateOptions) (result *v1alpha2.Order, err error) {
result = &v1alpha2.Order{}
err = c.client.Put().
Namespace(c.ns).
Resource("orders").
Name(order.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(order).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *orders) UpdateStatus(ctx context.Context, order *v1alpha2.Order, opts v1.UpdateOptions) (result *v1alpha2.Order, err error) {
result = &v1alpha2.Order{}
err = c.client.Put().
Namespace(c.ns).
Resource("orders").
Name(order.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(order).
Do(ctx).
Into(result)
return
}
// Delete takes name of the order and deletes it. Returns an error if one occurs.
func (c *orders) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("orders").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *orders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("orders").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched order.
func (c *orders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.Order, err error) {
result = &v1alpha2.Order{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("orders").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,39 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"acme_client.go",
"challenge.go",
"doc.go",
"generated_expansion.go",
"order.go",
],
importpath = "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/acme/v1alpha3",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/acme/v1alpha3:go_default_library",
"//pkg/client/clientset/versioned/scheme:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/types:go_default_library",
"@io_k8s_apimachinery//pkg/watch:go_default_library",
"@io_k8s_client_go//rest:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//pkg/client/clientset/versioned/typed/acme/v1alpha3/fake:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
@@ -1,94 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha3
import (
v1alpha3 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha3"
"github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
rest "k8s.io/client-go/rest"
)
type AcmeV1alpha3Interface interface {
RESTClient() rest.Interface
ChallengesGetter
OrdersGetter
}
// AcmeV1alpha3Client is used to interact with features provided by the acme.cert-manager.io group.
type AcmeV1alpha3Client struct {
restClient rest.Interface
}
func (c *AcmeV1alpha3Client) Challenges(namespace string) ChallengeInterface {
return newChallenges(c, namespace)
}
func (c *AcmeV1alpha3Client) Orders(namespace string) OrderInterface {
return newOrders(c, namespace)
}
// NewForConfig creates a new AcmeV1alpha3Client for the given config.
func NewForConfig(c *rest.Config) (*AcmeV1alpha3Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &AcmeV1alpha3Client{client}, nil
}
// NewForConfigOrDie creates a new AcmeV1alpha3Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *AcmeV1alpha3Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new AcmeV1alpha3Client for the given RESTClient.
func New(c rest.Interface) *AcmeV1alpha3Client {
return &AcmeV1alpha3Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1alpha3.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *AcmeV1alpha3Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}
@@ -1,195 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha3
import (
"context"
"time"
v1alpha3 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha3"
scheme "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// ChallengesGetter has a method to return a ChallengeInterface.
// A group's client should implement this interface.
type ChallengesGetter interface {
Challenges(namespace string) ChallengeInterface
}
// ChallengeInterface has methods to work with Challenge resources.
type ChallengeInterface interface {
Create(ctx context.Context, challenge *v1alpha3.Challenge, opts v1.CreateOptions) (*v1alpha3.Challenge, error)
Update(ctx context.Context, challenge *v1alpha3.Challenge, opts v1.UpdateOptions) (*v1alpha3.Challenge, error)
UpdateStatus(ctx context.Context, challenge *v1alpha3.Challenge, opts v1.UpdateOptions) (*v1alpha3.Challenge, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.Challenge, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.ChallengeList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.Challenge, err error)
ChallengeExpansion
}
// challenges implements ChallengeInterface
type challenges struct {
client rest.Interface
ns string
}
// newChallenges returns a Challenges
func newChallenges(c *AcmeV1alpha3Client, namespace string) *challenges {
return &challenges{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the challenge, and returns the corresponding challenge object, and an error if there is any.
func (c *challenges) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.Challenge, err error) {
result = &v1alpha3.Challenge{}
err = c.client.Get().
Namespace(c.ns).
Resource("challenges").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Challenges that match those selectors.
func (c *challenges) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.ChallengeList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha3.ChallengeList{}
err = c.client.Get().
Namespace(c.ns).
Resource("challenges").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested challenges.
func (c *challenges) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("challenges").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a challenge and creates it. Returns the server's representation of the challenge, and an error, if there is any.
func (c *challenges) Create(ctx context.Context, challenge *v1alpha3.Challenge, opts v1.CreateOptions) (result *v1alpha3.Challenge, err error) {
result = &v1alpha3.Challenge{}
err = c.client.Post().
Namespace(c.ns).
Resource("challenges").
VersionedParams(&opts, scheme.ParameterCodec).
Body(challenge).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a challenge and updates it. Returns the server's representation of the challenge, and an error, if there is any.
func (c *challenges) Update(ctx context.Context, challenge *v1alpha3.Challenge, opts v1.UpdateOptions) (result *v1alpha3.Challenge, err error) {
result = &v1alpha3.Challenge{}
err = c.client.Put().
Namespace(c.ns).
Resource("challenges").
Name(challenge.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(challenge).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *challenges) UpdateStatus(ctx context.Context, challenge *v1alpha3.Challenge, opts v1.UpdateOptions) (result *v1alpha3.Challenge, err error) {
result = &v1alpha3.Challenge{}
err = c.client.Put().
Namespace(c.ns).
Resource("challenges").
Name(challenge.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(challenge).
Do(ctx).
Into(result)
return
}
// Delete takes name of the challenge and deletes it. Returns an error if one occurs.
func (c *challenges) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("challenges").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *challenges) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("challenges").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched challenge.
func (c *challenges) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.Challenge, err error) {
result = &v1alpha3.Challenge{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("challenges").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,20 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v1alpha3
@@ -1,38 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"fake_acme_client.go",
"fake_challenge.go",
"fake_order.go",
],
importpath = "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/acme/v1alpha3/fake",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/acme/v1alpha3:go_default_library",
"//pkg/client/clientset/versioned/typed/acme/v1alpha3:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/labels:go_default_library",
"@io_k8s_apimachinery//pkg/runtime/schema:go_default_library",
"@io_k8s_apimachinery//pkg/types:go_default_library",
"@io_k8s_apimachinery//pkg/watch:go_default_library",
"@io_k8s_client_go//rest:go_default_library",
"@io_k8s_client_go//testing:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
@@ -1,20 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// Package fake has the automatically generated clients.
package fake
@@ -1,44 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha3 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/acme/v1alpha3"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeAcmeV1alpha3 struct {
*testing.Fake
}
func (c *FakeAcmeV1alpha3) Challenges(namespace string) v1alpha3.ChallengeInterface {
return &FakeChallenges{c, namespace}
}
func (c *FakeAcmeV1alpha3) Orders(namespace string) v1alpha3.OrderInterface {
return &FakeOrders{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeAcmeV1alpha3) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}
@@ -1,142 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
v1alpha3 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeChallenges implements ChallengeInterface
type FakeChallenges struct {
Fake *FakeAcmeV1alpha3
ns string
}
var challengesResource = schema.GroupVersionResource{Group: "acme.cert-manager.io", Version: "v1alpha3", Resource: "challenges"}
var challengesKind = schema.GroupVersionKind{Group: "acme.cert-manager.io", Version: "v1alpha3", Kind: "Challenge"}
// Get takes name of the challenge, and returns the corresponding challenge object, and an error if there is any.
func (c *FakeChallenges) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.Challenge, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(challengesResource, c.ns, name), &v1alpha3.Challenge{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Challenge), err
}
// List takes label and field selectors, and returns the list of Challenges that match those selectors.
func (c *FakeChallenges) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.ChallengeList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(challengesResource, challengesKind, c.ns, opts), &v1alpha3.ChallengeList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha3.ChallengeList{ListMeta: obj.(*v1alpha3.ChallengeList).ListMeta}
for _, item := range obj.(*v1alpha3.ChallengeList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested challenges.
func (c *FakeChallenges) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(challengesResource, c.ns, opts))
}
// Create takes the representation of a challenge and creates it. Returns the server's representation of the challenge, and an error, if there is any.
func (c *FakeChallenges) Create(ctx context.Context, challenge *v1alpha3.Challenge, opts v1.CreateOptions) (result *v1alpha3.Challenge, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(challengesResource, c.ns, challenge), &v1alpha3.Challenge{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Challenge), err
}
// Update takes the representation of a challenge and updates it. Returns the server's representation of the challenge, and an error, if there is any.
func (c *FakeChallenges) Update(ctx context.Context, challenge *v1alpha3.Challenge, opts v1.UpdateOptions) (result *v1alpha3.Challenge, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(challengesResource, c.ns, challenge), &v1alpha3.Challenge{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Challenge), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeChallenges) UpdateStatus(ctx context.Context, challenge *v1alpha3.Challenge, opts v1.UpdateOptions) (*v1alpha3.Challenge, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(challengesResource, "status", c.ns, challenge), &v1alpha3.Challenge{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Challenge), err
}
// Delete takes name of the challenge and deletes it. Returns an error if one occurs.
func (c *FakeChallenges) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(challengesResource, c.ns, name), &v1alpha3.Challenge{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeChallenges) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(challengesResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha3.ChallengeList{})
return err
}
// Patch applies the patch and returns the patched challenge.
func (c *FakeChallenges) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.Challenge, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(challengesResource, c.ns, name, pt, data, subresources...), &v1alpha3.Challenge{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Challenge), err
}
@@ -1,142 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
v1alpha3 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeOrders implements OrderInterface
type FakeOrders struct {
Fake *FakeAcmeV1alpha3
ns string
}
var ordersResource = schema.GroupVersionResource{Group: "acme.cert-manager.io", Version: "v1alpha3", Resource: "orders"}
var ordersKind = schema.GroupVersionKind{Group: "acme.cert-manager.io", Version: "v1alpha3", Kind: "Order"}
// Get takes name of the order, and returns the corresponding order object, and an error if there is any.
func (c *FakeOrders) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.Order, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(ordersResource, c.ns, name), &v1alpha3.Order{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Order), err
}
// List takes label and field selectors, and returns the list of Orders that match those selectors.
func (c *FakeOrders) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.OrderList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(ordersResource, ordersKind, c.ns, opts), &v1alpha3.OrderList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha3.OrderList{ListMeta: obj.(*v1alpha3.OrderList).ListMeta}
for _, item := range obj.(*v1alpha3.OrderList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested orders.
func (c *FakeOrders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(ordersResource, c.ns, opts))
}
// Create takes the representation of a order and creates it. Returns the server's representation of the order, and an error, if there is any.
func (c *FakeOrders) Create(ctx context.Context, order *v1alpha3.Order, opts v1.CreateOptions) (result *v1alpha3.Order, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(ordersResource, c.ns, order), &v1alpha3.Order{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Order), err
}
// Update takes the representation of a order and updates it. Returns the server's representation of the order, and an error, if there is any.
func (c *FakeOrders) Update(ctx context.Context, order *v1alpha3.Order, opts v1.UpdateOptions) (result *v1alpha3.Order, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(ordersResource, c.ns, order), &v1alpha3.Order{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Order), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeOrders) UpdateStatus(ctx context.Context, order *v1alpha3.Order, opts v1.UpdateOptions) (*v1alpha3.Order, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(ordersResource, "status", c.ns, order), &v1alpha3.Order{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Order), err
}
// Delete takes name of the order and deletes it. Returns an error if one occurs.
func (c *FakeOrders) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(ordersResource, c.ns, name), &v1alpha3.Order{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeOrders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(ordersResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha3.OrderList{})
return err
}
// Patch applies the patch and returns the patched order.
func (c *FakeOrders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.Order, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(ordersResource, c.ns, name, pt, data, subresources...), &v1alpha3.Order{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Order), err
}
@@ -1,23 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha3
type ChallengeExpansion interface{}
type OrderExpansion interface{}
@@ -1,195 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha3
import (
"context"
"time"
v1alpha3 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha3"
scheme "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// OrdersGetter has a method to return a OrderInterface.
// A group's client should implement this interface.
type OrdersGetter interface {
Orders(namespace string) OrderInterface
}
// OrderInterface has methods to work with Order resources.
type OrderInterface interface {
Create(ctx context.Context, order *v1alpha3.Order, opts v1.CreateOptions) (*v1alpha3.Order, error)
Update(ctx context.Context, order *v1alpha3.Order, opts v1.UpdateOptions) (*v1alpha3.Order, error)
UpdateStatus(ctx context.Context, order *v1alpha3.Order, opts v1.UpdateOptions) (*v1alpha3.Order, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.Order, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.OrderList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.Order, err error)
OrderExpansion
}
// orders implements OrderInterface
type orders struct {
client rest.Interface
ns string
}
// newOrders returns a Orders
func newOrders(c *AcmeV1alpha3Client, namespace string) *orders {
return &orders{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the order, and returns the corresponding order object, and an error if there is any.
func (c *orders) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.Order, err error) {
result = &v1alpha3.Order{}
err = c.client.Get().
Namespace(c.ns).
Resource("orders").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Orders that match those selectors.
func (c *orders) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.OrderList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha3.OrderList{}
err = c.client.Get().
Namespace(c.ns).
Resource("orders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested orders.
func (c *orders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("orders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a order and creates it. Returns the server's representation of the order, and an error, if there is any.
func (c *orders) Create(ctx context.Context, order *v1alpha3.Order, opts v1.CreateOptions) (result *v1alpha3.Order, err error) {
result = &v1alpha3.Order{}
err = c.client.Post().
Namespace(c.ns).
Resource("orders").
VersionedParams(&opts, scheme.ParameterCodec).
Body(order).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a order and updates it. Returns the server's representation of the order, and an error, if there is any.
func (c *orders) Update(ctx context.Context, order *v1alpha3.Order, opts v1.UpdateOptions) (result *v1alpha3.Order, err error) {
result = &v1alpha3.Order{}
err = c.client.Put().
Namespace(c.ns).
Resource("orders").
Name(order.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(order).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *orders) UpdateStatus(ctx context.Context, order *v1alpha3.Order, opts v1.UpdateOptions) (result *v1alpha3.Order, err error) {
result = &v1alpha3.Order{}
err = c.client.Put().
Namespace(c.ns).
Resource("orders").
Name(order.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(order).
Do(ctx).
Into(result)
return
}
// Delete takes name of the order and deletes it. Returns an error if one occurs.
func (c *orders) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("orders").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *orders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("orders").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched order.
func (c *orders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.Order, err error) {
result = &v1alpha3.Order{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("orders").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,39 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"acme_client.go",
"challenge.go",
"doc.go",
"generated_expansion.go",
"order.go",
],
importpath = "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/acme/v1beta1",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/acme/v1beta1:go_default_library",
"//pkg/client/clientset/versioned/scheme:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/types:go_default_library",
"@io_k8s_apimachinery//pkg/watch:go_default_library",
"@io_k8s_client_go//rest:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//pkg/client/clientset/versioned/typed/acme/v1beta1/fake:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
@@ -1,94 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1beta1
import (
v1beta1 "github.com/jetstack/cert-manager/pkg/apis/acme/v1beta1"
"github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
rest "k8s.io/client-go/rest"
)
type AcmeV1beta1Interface interface {
RESTClient() rest.Interface
ChallengesGetter
OrdersGetter
}
// AcmeV1beta1Client is used to interact with features provided by the acme.cert-manager.io group.
type AcmeV1beta1Client struct {
restClient rest.Interface
}
func (c *AcmeV1beta1Client) Challenges(namespace string) ChallengeInterface {
return newChallenges(c, namespace)
}
func (c *AcmeV1beta1Client) Orders(namespace string) OrderInterface {
return newOrders(c, namespace)
}
// NewForConfig creates a new AcmeV1beta1Client for the given config.
func NewForConfig(c *rest.Config) (*AcmeV1beta1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &AcmeV1beta1Client{client}, nil
}
// NewForConfigOrDie creates a new AcmeV1beta1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *AcmeV1beta1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new AcmeV1beta1Client for the given RESTClient.
func New(c rest.Interface) *AcmeV1beta1Client {
return &AcmeV1beta1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1beta1.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *AcmeV1beta1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}
@@ -1,195 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1beta1
import (
"context"
"time"
v1beta1 "github.com/jetstack/cert-manager/pkg/apis/acme/v1beta1"
scheme "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// ChallengesGetter has a method to return a ChallengeInterface.
// A group's client should implement this interface.
type ChallengesGetter interface {
Challenges(namespace string) ChallengeInterface
}
// ChallengeInterface has methods to work with Challenge resources.
type ChallengeInterface interface {
Create(ctx context.Context, challenge *v1beta1.Challenge, opts v1.CreateOptions) (*v1beta1.Challenge, error)
Update(ctx context.Context, challenge *v1beta1.Challenge, opts v1.UpdateOptions) (*v1beta1.Challenge, error)
UpdateStatus(ctx context.Context, challenge *v1beta1.Challenge, opts v1.UpdateOptions) (*v1beta1.Challenge, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Challenge, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ChallengeList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Challenge, err error)
ChallengeExpansion
}
// challenges implements ChallengeInterface
type challenges struct {
client rest.Interface
ns string
}
// newChallenges returns a Challenges
func newChallenges(c *AcmeV1beta1Client, namespace string) *challenges {
return &challenges{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the challenge, and returns the corresponding challenge object, and an error if there is any.
func (c *challenges) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Challenge, err error) {
result = &v1beta1.Challenge{}
err = c.client.Get().
Namespace(c.ns).
Resource("challenges").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Challenges that match those selectors.
func (c *challenges) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ChallengeList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1beta1.ChallengeList{}
err = c.client.Get().
Namespace(c.ns).
Resource("challenges").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested challenges.
func (c *challenges) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("challenges").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a challenge and creates it. Returns the server's representation of the challenge, and an error, if there is any.
func (c *challenges) Create(ctx context.Context, challenge *v1beta1.Challenge, opts v1.CreateOptions) (result *v1beta1.Challenge, err error) {
result = &v1beta1.Challenge{}
err = c.client.Post().
Namespace(c.ns).
Resource("challenges").
VersionedParams(&opts, scheme.ParameterCodec).
Body(challenge).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a challenge and updates it. Returns the server's representation of the challenge, and an error, if there is any.
func (c *challenges) Update(ctx context.Context, challenge *v1beta1.Challenge, opts v1.UpdateOptions) (result *v1beta1.Challenge, err error) {
result = &v1beta1.Challenge{}
err = c.client.Put().
Namespace(c.ns).
Resource("challenges").
Name(challenge.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(challenge).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *challenges) UpdateStatus(ctx context.Context, challenge *v1beta1.Challenge, opts v1.UpdateOptions) (result *v1beta1.Challenge, err error) {
result = &v1beta1.Challenge{}
err = c.client.Put().
Namespace(c.ns).
Resource("challenges").
Name(challenge.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(challenge).
Do(ctx).
Into(result)
return
}
// Delete takes name of the challenge and deletes it. Returns an error if one occurs.
func (c *challenges) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("challenges").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *challenges) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("challenges").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched challenge.
func (c *challenges) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Challenge, err error) {
result = &v1beta1.Challenge{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("challenges").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,20 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v1beta1
@@ -1,38 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"fake_acme_client.go",
"fake_challenge.go",
"fake_order.go",
],
importpath = "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/acme/v1beta1/fake",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/acme/v1beta1:go_default_library",
"//pkg/client/clientset/versioned/typed/acme/v1beta1:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/labels:go_default_library",
"@io_k8s_apimachinery//pkg/runtime/schema:go_default_library",
"@io_k8s_apimachinery//pkg/types:go_default_library",
"@io_k8s_apimachinery//pkg/watch:go_default_library",
"@io_k8s_client_go//rest:go_default_library",
"@io_k8s_client_go//testing:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
@@ -1,20 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// Package fake has the automatically generated clients.
package fake
@@ -1,44 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1beta1 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/acme/v1beta1"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeAcmeV1beta1 struct {
*testing.Fake
}
func (c *FakeAcmeV1beta1) Challenges(namespace string) v1beta1.ChallengeInterface {
return &FakeChallenges{c, namespace}
}
func (c *FakeAcmeV1beta1) Orders(namespace string) v1beta1.OrderInterface {
return &FakeOrders{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeAcmeV1beta1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}
@@ -1,142 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
v1beta1 "github.com/jetstack/cert-manager/pkg/apis/acme/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeChallenges implements ChallengeInterface
type FakeChallenges struct {
Fake *FakeAcmeV1beta1
ns string
}
var challengesResource = schema.GroupVersionResource{Group: "acme.cert-manager.io", Version: "v1beta1", Resource: "challenges"}
var challengesKind = schema.GroupVersionKind{Group: "acme.cert-manager.io", Version: "v1beta1", Kind: "Challenge"}
// Get takes name of the challenge, and returns the corresponding challenge object, and an error if there is any.
func (c *FakeChallenges) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Challenge, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(challengesResource, c.ns, name), &v1beta1.Challenge{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Challenge), err
}
// List takes label and field selectors, and returns the list of Challenges that match those selectors.
func (c *FakeChallenges) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ChallengeList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(challengesResource, challengesKind, c.ns, opts), &v1beta1.ChallengeList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1beta1.ChallengeList{ListMeta: obj.(*v1beta1.ChallengeList).ListMeta}
for _, item := range obj.(*v1beta1.ChallengeList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested challenges.
func (c *FakeChallenges) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(challengesResource, c.ns, opts))
}
// Create takes the representation of a challenge and creates it. Returns the server's representation of the challenge, and an error, if there is any.
func (c *FakeChallenges) Create(ctx context.Context, challenge *v1beta1.Challenge, opts v1.CreateOptions) (result *v1beta1.Challenge, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(challengesResource, c.ns, challenge), &v1beta1.Challenge{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Challenge), err
}
// Update takes the representation of a challenge and updates it. Returns the server's representation of the challenge, and an error, if there is any.
func (c *FakeChallenges) Update(ctx context.Context, challenge *v1beta1.Challenge, opts v1.UpdateOptions) (result *v1beta1.Challenge, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(challengesResource, c.ns, challenge), &v1beta1.Challenge{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Challenge), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeChallenges) UpdateStatus(ctx context.Context, challenge *v1beta1.Challenge, opts v1.UpdateOptions) (*v1beta1.Challenge, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(challengesResource, "status", c.ns, challenge), &v1beta1.Challenge{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Challenge), err
}
// Delete takes name of the challenge and deletes it. Returns an error if one occurs.
func (c *FakeChallenges) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(challengesResource, c.ns, name), &v1beta1.Challenge{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeChallenges) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(challengesResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.ChallengeList{})
return err
}
// Patch applies the patch and returns the patched challenge.
func (c *FakeChallenges) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Challenge, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(challengesResource, c.ns, name, pt, data, subresources...), &v1beta1.Challenge{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Challenge), err
}
@@ -1,142 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
v1beta1 "github.com/jetstack/cert-manager/pkg/apis/acme/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeOrders implements OrderInterface
type FakeOrders struct {
Fake *FakeAcmeV1beta1
ns string
}
var ordersResource = schema.GroupVersionResource{Group: "acme.cert-manager.io", Version: "v1beta1", Resource: "orders"}
var ordersKind = schema.GroupVersionKind{Group: "acme.cert-manager.io", Version: "v1beta1", Kind: "Order"}
// Get takes name of the order, and returns the corresponding order object, and an error if there is any.
func (c *FakeOrders) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Order, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(ordersResource, c.ns, name), &v1beta1.Order{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Order), err
}
// List takes label and field selectors, and returns the list of Orders that match those selectors.
func (c *FakeOrders) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.OrderList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(ordersResource, ordersKind, c.ns, opts), &v1beta1.OrderList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1beta1.OrderList{ListMeta: obj.(*v1beta1.OrderList).ListMeta}
for _, item := range obj.(*v1beta1.OrderList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested orders.
func (c *FakeOrders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(ordersResource, c.ns, opts))
}
// Create takes the representation of a order and creates it. Returns the server's representation of the order, and an error, if there is any.
func (c *FakeOrders) Create(ctx context.Context, order *v1beta1.Order, opts v1.CreateOptions) (result *v1beta1.Order, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(ordersResource, c.ns, order), &v1beta1.Order{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Order), err
}
// Update takes the representation of a order and updates it. Returns the server's representation of the order, and an error, if there is any.
func (c *FakeOrders) Update(ctx context.Context, order *v1beta1.Order, opts v1.UpdateOptions) (result *v1beta1.Order, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(ordersResource, c.ns, order), &v1beta1.Order{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Order), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeOrders) UpdateStatus(ctx context.Context, order *v1beta1.Order, opts v1.UpdateOptions) (*v1beta1.Order, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(ordersResource, "status", c.ns, order), &v1beta1.Order{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Order), err
}
// Delete takes name of the order and deletes it. Returns an error if one occurs.
func (c *FakeOrders) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(ordersResource, c.ns, name), &v1beta1.Order{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeOrders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(ordersResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.OrderList{})
return err
}
// Patch applies the patch and returns the patched order.
func (c *FakeOrders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Order, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(ordersResource, c.ns, name, pt, data, subresources...), &v1beta1.Order{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Order), err
}
@@ -1,23 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1beta1
type ChallengeExpansion interface{}
type OrderExpansion interface{}
@@ -1,195 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1beta1
import (
"context"
"time"
v1beta1 "github.com/jetstack/cert-manager/pkg/apis/acme/v1beta1"
scheme "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// OrdersGetter has a method to return a OrderInterface.
// A group's client should implement this interface.
type OrdersGetter interface {
Orders(namespace string) OrderInterface
}
// OrderInterface has methods to work with Order resources.
type OrderInterface interface {
Create(ctx context.Context, order *v1beta1.Order, opts v1.CreateOptions) (*v1beta1.Order, error)
Update(ctx context.Context, order *v1beta1.Order, opts v1.UpdateOptions) (*v1beta1.Order, error)
UpdateStatus(ctx context.Context, order *v1beta1.Order, opts v1.UpdateOptions) (*v1beta1.Order, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Order, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.OrderList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Order, err error)
OrderExpansion
}
// orders implements OrderInterface
type orders struct {
client rest.Interface
ns string
}
// newOrders returns a Orders
func newOrders(c *AcmeV1beta1Client, namespace string) *orders {
return &orders{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the order, and returns the corresponding order object, and an error if there is any.
func (c *orders) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Order, err error) {
result = &v1beta1.Order{}
err = c.client.Get().
Namespace(c.ns).
Resource("orders").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Orders that match those selectors.
func (c *orders) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.OrderList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1beta1.OrderList{}
err = c.client.Get().
Namespace(c.ns).
Resource("orders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested orders.
func (c *orders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("orders").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a order and creates it. Returns the server's representation of the order, and an error, if there is any.
func (c *orders) Create(ctx context.Context, order *v1beta1.Order, opts v1.CreateOptions) (result *v1beta1.Order, err error) {
result = &v1beta1.Order{}
err = c.client.Post().
Namespace(c.ns).
Resource("orders").
VersionedParams(&opts, scheme.ParameterCodec).
Body(order).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a order and updates it. Returns the server's representation of the order, and an error, if there is any.
func (c *orders) Update(ctx context.Context, order *v1beta1.Order, opts v1.UpdateOptions) (result *v1beta1.Order, err error) {
result = &v1beta1.Order{}
err = c.client.Put().
Namespace(c.ns).
Resource("orders").
Name(order.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(order).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *orders) UpdateStatus(ctx context.Context, order *v1beta1.Order, opts v1.UpdateOptions) (result *v1beta1.Order, err error) {
result = &v1beta1.Order{}
err = c.client.Put().
Namespace(c.ns).
Resource("orders").
Name(order.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(order).
Do(ctx).
Into(result)
return
}
// Delete takes name of the order and deletes it. Returns an error if one occurs.
func (c *orders) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("orders").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *orders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("orders").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched order.
func (c *orders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Order, err error) {
result = &v1beta1.Order{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("orders").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,41 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"certificate.go",
"certificaterequest.go",
"certmanager_client.go",
"clusterissuer.go",
"doc.go",
"generated_expansion.go",
"issuer.go",
],
importpath = "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1alpha2",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/certmanager/v1alpha2:go_default_library",
"//pkg/client/clientset/versioned/scheme:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/types:go_default_library",
"@io_k8s_apimachinery//pkg/watch:go_default_library",
"@io_k8s_client_go//rest:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//pkg/client/clientset/versioned/typed/certmanager/v1alpha2/fake:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
@@ -1,195 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha2
import (
"context"
"time"
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
scheme "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// CertificatesGetter has a method to return a CertificateInterface.
// A group's client should implement this interface.
type CertificatesGetter interface {
Certificates(namespace string) CertificateInterface
}
// CertificateInterface has methods to work with Certificate resources.
type CertificateInterface interface {
Create(ctx context.Context, certificate *v1alpha2.Certificate, opts v1.CreateOptions) (*v1alpha2.Certificate, error)
Update(ctx context.Context, certificate *v1alpha2.Certificate, opts v1.UpdateOptions) (*v1alpha2.Certificate, error)
UpdateStatus(ctx context.Context, certificate *v1alpha2.Certificate, opts v1.UpdateOptions) (*v1alpha2.Certificate, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.Certificate, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.CertificateList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.Certificate, err error)
CertificateExpansion
}
// certificates implements CertificateInterface
type certificates struct {
client rest.Interface
ns string
}
// newCertificates returns a Certificates
func newCertificates(c *CertmanagerV1alpha2Client, namespace string) *certificates {
return &certificates{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the certificate, and returns the corresponding certificate object, and an error if there is any.
func (c *certificates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.Certificate, err error) {
result = &v1alpha2.Certificate{}
err = c.client.Get().
Namespace(c.ns).
Resource("certificates").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Certificates that match those selectors.
func (c *certificates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.CertificateList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.CertificateList{}
err = c.client.Get().
Namespace(c.ns).
Resource("certificates").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested certificates.
func (c *certificates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("certificates").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a certificate and creates it. Returns the server's representation of the certificate, and an error, if there is any.
func (c *certificates) Create(ctx context.Context, certificate *v1alpha2.Certificate, opts v1.CreateOptions) (result *v1alpha2.Certificate, err error) {
result = &v1alpha2.Certificate{}
err = c.client.Post().
Namespace(c.ns).
Resource("certificates").
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificate).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a certificate and updates it. Returns the server's representation of the certificate, and an error, if there is any.
func (c *certificates) Update(ctx context.Context, certificate *v1alpha2.Certificate, opts v1.UpdateOptions) (result *v1alpha2.Certificate, err error) {
result = &v1alpha2.Certificate{}
err = c.client.Put().
Namespace(c.ns).
Resource("certificates").
Name(certificate.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificate).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *certificates) UpdateStatus(ctx context.Context, certificate *v1alpha2.Certificate, opts v1.UpdateOptions) (result *v1alpha2.Certificate, err error) {
result = &v1alpha2.Certificate{}
err = c.client.Put().
Namespace(c.ns).
Resource("certificates").
Name(certificate.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificate).
Do(ctx).
Into(result)
return
}
// Delete takes name of the certificate and deletes it. Returns an error if one occurs.
func (c *certificates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("certificates").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *certificates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("certificates").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched certificate.
func (c *certificates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.Certificate, err error) {
result = &v1alpha2.Certificate{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("certificates").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,195 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha2
import (
"context"
"time"
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
scheme "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// CertificateRequestsGetter has a method to return a CertificateRequestInterface.
// A group's client should implement this interface.
type CertificateRequestsGetter interface {
CertificateRequests(namespace string) CertificateRequestInterface
}
// CertificateRequestInterface has methods to work with CertificateRequest resources.
type CertificateRequestInterface interface {
Create(ctx context.Context, certificateRequest *v1alpha2.CertificateRequest, opts v1.CreateOptions) (*v1alpha2.CertificateRequest, error)
Update(ctx context.Context, certificateRequest *v1alpha2.CertificateRequest, opts v1.UpdateOptions) (*v1alpha2.CertificateRequest, error)
UpdateStatus(ctx context.Context, certificateRequest *v1alpha2.CertificateRequest, opts v1.UpdateOptions) (*v1alpha2.CertificateRequest, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.CertificateRequest, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.CertificateRequestList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.CertificateRequest, err error)
CertificateRequestExpansion
}
// certificateRequests implements CertificateRequestInterface
type certificateRequests struct {
client rest.Interface
ns string
}
// newCertificateRequests returns a CertificateRequests
func newCertificateRequests(c *CertmanagerV1alpha2Client, namespace string) *certificateRequests {
return &certificateRequests{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the certificateRequest, and returns the corresponding certificateRequest object, and an error if there is any.
func (c *certificateRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.CertificateRequest, err error) {
result = &v1alpha2.CertificateRequest{}
err = c.client.Get().
Namespace(c.ns).
Resource("certificaterequests").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of CertificateRequests that match those selectors.
func (c *certificateRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.CertificateRequestList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.CertificateRequestList{}
err = c.client.Get().
Namespace(c.ns).
Resource("certificaterequests").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested certificateRequests.
func (c *certificateRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("certificaterequests").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a certificateRequest and creates it. Returns the server's representation of the certificateRequest, and an error, if there is any.
func (c *certificateRequests) Create(ctx context.Context, certificateRequest *v1alpha2.CertificateRequest, opts v1.CreateOptions) (result *v1alpha2.CertificateRequest, err error) {
result = &v1alpha2.CertificateRequest{}
err = c.client.Post().
Namespace(c.ns).
Resource("certificaterequests").
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificateRequest).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a certificateRequest and updates it. Returns the server's representation of the certificateRequest, and an error, if there is any.
func (c *certificateRequests) Update(ctx context.Context, certificateRequest *v1alpha2.CertificateRequest, opts v1.UpdateOptions) (result *v1alpha2.CertificateRequest, err error) {
result = &v1alpha2.CertificateRequest{}
err = c.client.Put().
Namespace(c.ns).
Resource("certificaterequests").
Name(certificateRequest.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificateRequest).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *certificateRequests) UpdateStatus(ctx context.Context, certificateRequest *v1alpha2.CertificateRequest, opts v1.UpdateOptions) (result *v1alpha2.CertificateRequest, err error) {
result = &v1alpha2.CertificateRequest{}
err = c.client.Put().
Namespace(c.ns).
Resource("certificaterequests").
Name(certificateRequest.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificateRequest).
Do(ctx).
Into(result)
return
}
// Delete takes name of the certificateRequest and deletes it. Returns an error if one occurs.
func (c *certificateRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("certificaterequests").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *certificateRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("certificaterequests").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched certificateRequest.
func (c *certificateRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.CertificateRequest, err error) {
result = &v1alpha2.CertificateRequest{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("certificaterequests").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,104 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha2
import (
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
"github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
rest "k8s.io/client-go/rest"
)
type CertmanagerV1alpha2Interface interface {
RESTClient() rest.Interface
CertificatesGetter
CertificateRequestsGetter
ClusterIssuersGetter
IssuersGetter
}
// CertmanagerV1alpha2Client is used to interact with features provided by the cert-manager.io group.
type CertmanagerV1alpha2Client struct {
restClient rest.Interface
}
func (c *CertmanagerV1alpha2Client) Certificates(namespace string) CertificateInterface {
return newCertificates(c, namespace)
}
func (c *CertmanagerV1alpha2Client) CertificateRequests(namespace string) CertificateRequestInterface {
return newCertificateRequests(c, namespace)
}
func (c *CertmanagerV1alpha2Client) ClusterIssuers() ClusterIssuerInterface {
return newClusterIssuers(c)
}
func (c *CertmanagerV1alpha2Client) Issuers(namespace string) IssuerInterface {
return newIssuers(c, namespace)
}
// NewForConfig creates a new CertmanagerV1alpha2Client for the given config.
func NewForConfig(c *rest.Config) (*CertmanagerV1alpha2Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &CertmanagerV1alpha2Client{client}, nil
}
// NewForConfigOrDie creates a new CertmanagerV1alpha2Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *CertmanagerV1alpha2Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new CertmanagerV1alpha2Client for the given RESTClient.
func New(c rest.Interface) *CertmanagerV1alpha2Client {
return &CertmanagerV1alpha2Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1alpha2.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *CertmanagerV1alpha2Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}
@@ -1,184 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha2
import (
"context"
"time"
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
scheme "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// ClusterIssuersGetter has a method to return a ClusterIssuerInterface.
// A group's client should implement this interface.
type ClusterIssuersGetter interface {
ClusterIssuers() ClusterIssuerInterface
}
// ClusterIssuerInterface has methods to work with ClusterIssuer resources.
type ClusterIssuerInterface interface {
Create(ctx context.Context, clusterIssuer *v1alpha2.ClusterIssuer, opts v1.CreateOptions) (*v1alpha2.ClusterIssuer, error)
Update(ctx context.Context, clusterIssuer *v1alpha2.ClusterIssuer, opts v1.UpdateOptions) (*v1alpha2.ClusterIssuer, error)
UpdateStatus(ctx context.Context, clusterIssuer *v1alpha2.ClusterIssuer, opts v1.UpdateOptions) (*v1alpha2.ClusterIssuer, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ClusterIssuer, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ClusterIssuerList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ClusterIssuer, err error)
ClusterIssuerExpansion
}
// clusterIssuers implements ClusterIssuerInterface
type clusterIssuers struct {
client rest.Interface
}
// newClusterIssuers returns a ClusterIssuers
func newClusterIssuers(c *CertmanagerV1alpha2Client) *clusterIssuers {
return &clusterIssuers{
client: c.RESTClient(),
}
}
// Get takes name of the clusterIssuer, and returns the corresponding clusterIssuer object, and an error if there is any.
func (c *clusterIssuers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ClusterIssuer, err error) {
result = &v1alpha2.ClusterIssuer{}
err = c.client.Get().
Resource("clusterissuers").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ClusterIssuers that match those selectors.
func (c *clusterIssuers) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ClusterIssuerList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.ClusterIssuerList{}
err = c.client.Get().
Resource("clusterissuers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested clusterIssuers.
func (c *clusterIssuers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Resource("clusterissuers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a clusterIssuer and creates it. Returns the server's representation of the clusterIssuer, and an error, if there is any.
func (c *clusterIssuers) Create(ctx context.Context, clusterIssuer *v1alpha2.ClusterIssuer, opts v1.CreateOptions) (result *v1alpha2.ClusterIssuer, err error) {
result = &v1alpha2.ClusterIssuer{}
err = c.client.Post().
Resource("clusterissuers").
VersionedParams(&opts, scheme.ParameterCodec).
Body(clusterIssuer).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a clusterIssuer and updates it. Returns the server's representation of the clusterIssuer, and an error, if there is any.
func (c *clusterIssuers) Update(ctx context.Context, clusterIssuer *v1alpha2.ClusterIssuer, opts v1.UpdateOptions) (result *v1alpha2.ClusterIssuer, err error) {
result = &v1alpha2.ClusterIssuer{}
err = c.client.Put().
Resource("clusterissuers").
Name(clusterIssuer.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(clusterIssuer).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *clusterIssuers) UpdateStatus(ctx context.Context, clusterIssuer *v1alpha2.ClusterIssuer, opts v1.UpdateOptions) (result *v1alpha2.ClusterIssuer, err error) {
result = &v1alpha2.ClusterIssuer{}
err = c.client.Put().
Resource("clusterissuers").
Name(clusterIssuer.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(clusterIssuer).
Do(ctx).
Into(result)
return
}
// Delete takes name of the clusterIssuer and deletes it. Returns an error if one occurs.
func (c *clusterIssuers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Resource("clusterissuers").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *clusterIssuers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Resource("clusterissuers").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched clusterIssuer.
func (c *clusterIssuers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ClusterIssuer, err error) {
result = &v1alpha2.ClusterIssuer{}
err = c.client.Patch(pt).
Resource("clusterissuers").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,20 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v1alpha2
@@ -1,40 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"fake_certificate.go",
"fake_certificaterequest.go",
"fake_certmanager_client.go",
"fake_clusterissuer.go",
"fake_issuer.go",
],
importpath = "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1alpha2/fake",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/certmanager/v1alpha2:go_default_library",
"//pkg/client/clientset/versioned/typed/certmanager/v1alpha2:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/labels:go_default_library",
"@io_k8s_apimachinery//pkg/runtime/schema:go_default_library",
"@io_k8s_apimachinery//pkg/types:go_default_library",
"@io_k8s_apimachinery//pkg/watch:go_default_library",
"@io_k8s_client_go//rest:go_default_library",
"@io_k8s_client_go//testing:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
@@ -1,20 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// Package fake has the automatically generated clients.
package fake
@@ -1,142 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeCertificates implements CertificateInterface
type FakeCertificates struct {
Fake *FakeCertmanagerV1alpha2
ns string
}
var certificatesResource = schema.GroupVersionResource{Group: "cert-manager.io", Version: "v1alpha2", Resource: "certificates"}
var certificatesKind = schema.GroupVersionKind{Group: "cert-manager.io", Version: "v1alpha2", Kind: "Certificate"}
// Get takes name of the certificate, and returns the corresponding certificate object, and an error if there is any.
func (c *FakeCertificates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.Certificate, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(certificatesResource, c.ns, name), &v1alpha2.Certificate{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Certificate), err
}
// List takes label and field selectors, and returns the list of Certificates that match those selectors.
func (c *FakeCertificates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.CertificateList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(certificatesResource, certificatesKind, c.ns, opts), &v1alpha2.CertificateList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha2.CertificateList{ListMeta: obj.(*v1alpha2.CertificateList).ListMeta}
for _, item := range obj.(*v1alpha2.CertificateList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested certificates.
func (c *FakeCertificates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(certificatesResource, c.ns, opts))
}
// Create takes the representation of a certificate and creates it. Returns the server's representation of the certificate, and an error, if there is any.
func (c *FakeCertificates) Create(ctx context.Context, certificate *v1alpha2.Certificate, opts v1.CreateOptions) (result *v1alpha2.Certificate, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(certificatesResource, c.ns, certificate), &v1alpha2.Certificate{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Certificate), err
}
// Update takes the representation of a certificate and updates it. Returns the server's representation of the certificate, and an error, if there is any.
func (c *FakeCertificates) Update(ctx context.Context, certificate *v1alpha2.Certificate, opts v1.UpdateOptions) (result *v1alpha2.Certificate, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(certificatesResource, c.ns, certificate), &v1alpha2.Certificate{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Certificate), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeCertificates) UpdateStatus(ctx context.Context, certificate *v1alpha2.Certificate, opts v1.UpdateOptions) (*v1alpha2.Certificate, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(certificatesResource, "status", c.ns, certificate), &v1alpha2.Certificate{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Certificate), err
}
// Delete takes name of the certificate and deletes it. Returns an error if one occurs.
func (c *FakeCertificates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(certificatesResource, c.ns, name), &v1alpha2.Certificate{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeCertificates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(certificatesResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha2.CertificateList{})
return err
}
// Patch applies the patch and returns the patched certificate.
func (c *FakeCertificates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.Certificate, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(certificatesResource, c.ns, name, pt, data, subresources...), &v1alpha2.Certificate{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Certificate), err
}
@@ -1,142 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeCertificateRequests implements CertificateRequestInterface
type FakeCertificateRequests struct {
Fake *FakeCertmanagerV1alpha2
ns string
}
var certificaterequestsResource = schema.GroupVersionResource{Group: "cert-manager.io", Version: "v1alpha2", Resource: "certificaterequests"}
var certificaterequestsKind = schema.GroupVersionKind{Group: "cert-manager.io", Version: "v1alpha2", Kind: "CertificateRequest"}
// Get takes name of the certificateRequest, and returns the corresponding certificateRequest object, and an error if there is any.
func (c *FakeCertificateRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.CertificateRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(certificaterequestsResource, c.ns, name), &v1alpha2.CertificateRequest{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.CertificateRequest), err
}
// List takes label and field selectors, and returns the list of CertificateRequests that match those selectors.
func (c *FakeCertificateRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.CertificateRequestList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(certificaterequestsResource, certificaterequestsKind, c.ns, opts), &v1alpha2.CertificateRequestList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha2.CertificateRequestList{ListMeta: obj.(*v1alpha2.CertificateRequestList).ListMeta}
for _, item := range obj.(*v1alpha2.CertificateRequestList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested certificateRequests.
func (c *FakeCertificateRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(certificaterequestsResource, c.ns, opts))
}
// Create takes the representation of a certificateRequest and creates it. Returns the server's representation of the certificateRequest, and an error, if there is any.
func (c *FakeCertificateRequests) Create(ctx context.Context, certificateRequest *v1alpha2.CertificateRequest, opts v1.CreateOptions) (result *v1alpha2.CertificateRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(certificaterequestsResource, c.ns, certificateRequest), &v1alpha2.CertificateRequest{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.CertificateRequest), err
}
// Update takes the representation of a certificateRequest and updates it. Returns the server's representation of the certificateRequest, and an error, if there is any.
func (c *FakeCertificateRequests) Update(ctx context.Context, certificateRequest *v1alpha2.CertificateRequest, opts v1.UpdateOptions) (result *v1alpha2.CertificateRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(certificaterequestsResource, c.ns, certificateRequest), &v1alpha2.CertificateRequest{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.CertificateRequest), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeCertificateRequests) UpdateStatus(ctx context.Context, certificateRequest *v1alpha2.CertificateRequest, opts v1.UpdateOptions) (*v1alpha2.CertificateRequest, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(certificaterequestsResource, "status", c.ns, certificateRequest), &v1alpha2.CertificateRequest{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.CertificateRequest), err
}
// Delete takes name of the certificateRequest and deletes it. Returns an error if one occurs.
func (c *FakeCertificateRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(certificaterequestsResource, c.ns, name), &v1alpha2.CertificateRequest{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeCertificateRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(certificaterequestsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha2.CertificateRequestList{})
return err
}
// Patch applies the patch and returns the patched certificateRequest.
func (c *FakeCertificateRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.CertificateRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(certificaterequestsResource, c.ns, name, pt, data, subresources...), &v1alpha2.CertificateRequest{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.CertificateRequest), err
}
@@ -1,52 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha2 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1alpha2"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeCertmanagerV1alpha2 struct {
*testing.Fake
}
func (c *FakeCertmanagerV1alpha2) Certificates(namespace string) v1alpha2.CertificateInterface {
return &FakeCertificates{c, namespace}
}
func (c *FakeCertmanagerV1alpha2) CertificateRequests(namespace string) v1alpha2.CertificateRequestInterface {
return &FakeCertificateRequests{c, namespace}
}
func (c *FakeCertmanagerV1alpha2) ClusterIssuers() v1alpha2.ClusterIssuerInterface {
return &FakeClusterIssuers{c}
}
func (c *FakeCertmanagerV1alpha2) Issuers(namespace string) v1alpha2.IssuerInterface {
return &FakeIssuers{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeCertmanagerV1alpha2) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}
@@ -1,133 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeClusterIssuers implements ClusterIssuerInterface
type FakeClusterIssuers struct {
Fake *FakeCertmanagerV1alpha2
}
var clusterissuersResource = schema.GroupVersionResource{Group: "cert-manager.io", Version: "v1alpha2", Resource: "clusterissuers"}
var clusterissuersKind = schema.GroupVersionKind{Group: "cert-manager.io", Version: "v1alpha2", Kind: "ClusterIssuer"}
// Get takes name of the clusterIssuer, and returns the corresponding clusterIssuer object, and an error if there is any.
func (c *FakeClusterIssuers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ClusterIssuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(clusterissuersResource, name), &v1alpha2.ClusterIssuer{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.ClusterIssuer), err
}
// List takes label and field selectors, and returns the list of ClusterIssuers that match those selectors.
func (c *FakeClusterIssuers) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ClusterIssuerList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(clusterissuersResource, clusterissuersKind, opts), &v1alpha2.ClusterIssuerList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha2.ClusterIssuerList{ListMeta: obj.(*v1alpha2.ClusterIssuerList).ListMeta}
for _, item := range obj.(*v1alpha2.ClusterIssuerList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested clusterIssuers.
func (c *FakeClusterIssuers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(clusterissuersResource, opts))
}
// Create takes the representation of a clusterIssuer and creates it. Returns the server's representation of the clusterIssuer, and an error, if there is any.
func (c *FakeClusterIssuers) Create(ctx context.Context, clusterIssuer *v1alpha2.ClusterIssuer, opts v1.CreateOptions) (result *v1alpha2.ClusterIssuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(clusterissuersResource, clusterIssuer), &v1alpha2.ClusterIssuer{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.ClusterIssuer), err
}
// Update takes the representation of a clusterIssuer and updates it. Returns the server's representation of the clusterIssuer, and an error, if there is any.
func (c *FakeClusterIssuers) Update(ctx context.Context, clusterIssuer *v1alpha2.ClusterIssuer, opts v1.UpdateOptions) (result *v1alpha2.ClusterIssuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(clusterissuersResource, clusterIssuer), &v1alpha2.ClusterIssuer{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.ClusterIssuer), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeClusterIssuers) UpdateStatus(ctx context.Context, clusterIssuer *v1alpha2.ClusterIssuer, opts v1.UpdateOptions) (*v1alpha2.ClusterIssuer, error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateSubresourceAction(clusterissuersResource, "status", clusterIssuer), &v1alpha2.ClusterIssuer{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.ClusterIssuer), err
}
// Delete takes name of the clusterIssuer and deletes it. Returns an error if one occurs.
func (c *FakeClusterIssuers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(clusterissuersResource, name), &v1alpha2.ClusterIssuer{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeClusterIssuers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(clusterissuersResource, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha2.ClusterIssuerList{})
return err
}
// Patch applies the patch and returns the patched clusterIssuer.
func (c *FakeClusterIssuers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ClusterIssuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(clusterissuersResource, name, pt, data, subresources...), &v1alpha2.ClusterIssuer{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.ClusterIssuer), err
}
@@ -1,142 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeIssuers implements IssuerInterface
type FakeIssuers struct {
Fake *FakeCertmanagerV1alpha2
ns string
}
var issuersResource = schema.GroupVersionResource{Group: "cert-manager.io", Version: "v1alpha2", Resource: "issuers"}
var issuersKind = schema.GroupVersionKind{Group: "cert-manager.io", Version: "v1alpha2", Kind: "Issuer"}
// Get takes name of the issuer, and returns the corresponding issuer object, and an error if there is any.
func (c *FakeIssuers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.Issuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(issuersResource, c.ns, name), &v1alpha2.Issuer{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Issuer), err
}
// List takes label and field selectors, and returns the list of Issuers that match those selectors.
func (c *FakeIssuers) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.IssuerList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(issuersResource, issuersKind, c.ns, opts), &v1alpha2.IssuerList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha2.IssuerList{ListMeta: obj.(*v1alpha2.IssuerList).ListMeta}
for _, item := range obj.(*v1alpha2.IssuerList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested issuers.
func (c *FakeIssuers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(issuersResource, c.ns, opts))
}
// Create takes the representation of a issuer and creates it. Returns the server's representation of the issuer, and an error, if there is any.
func (c *FakeIssuers) Create(ctx context.Context, issuer *v1alpha2.Issuer, opts v1.CreateOptions) (result *v1alpha2.Issuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(issuersResource, c.ns, issuer), &v1alpha2.Issuer{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Issuer), err
}
// Update takes the representation of a issuer and updates it. Returns the server's representation of the issuer, and an error, if there is any.
func (c *FakeIssuers) Update(ctx context.Context, issuer *v1alpha2.Issuer, opts v1.UpdateOptions) (result *v1alpha2.Issuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(issuersResource, c.ns, issuer), &v1alpha2.Issuer{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Issuer), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeIssuers) UpdateStatus(ctx context.Context, issuer *v1alpha2.Issuer, opts v1.UpdateOptions) (*v1alpha2.Issuer, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(issuersResource, "status", c.ns, issuer), &v1alpha2.Issuer{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Issuer), err
}
// Delete takes name of the issuer and deletes it. Returns an error if one occurs.
func (c *FakeIssuers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(issuersResource, c.ns, name), &v1alpha2.Issuer{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeIssuers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(issuersResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha2.IssuerList{})
return err
}
// Patch applies the patch and returns the patched issuer.
func (c *FakeIssuers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.Issuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(issuersResource, c.ns, name, pt, data, subresources...), &v1alpha2.Issuer{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Issuer), err
}
@@ -1,27 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha2
type CertificateExpansion interface{}
type CertificateRequestExpansion interface{}
type ClusterIssuerExpansion interface{}
type IssuerExpansion interface{}
@@ -1,195 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha2
import (
"context"
"time"
v1alpha2 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2"
scheme "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// IssuersGetter has a method to return a IssuerInterface.
// A group's client should implement this interface.
type IssuersGetter interface {
Issuers(namespace string) IssuerInterface
}
// IssuerInterface has methods to work with Issuer resources.
type IssuerInterface interface {
Create(ctx context.Context, issuer *v1alpha2.Issuer, opts v1.CreateOptions) (*v1alpha2.Issuer, error)
Update(ctx context.Context, issuer *v1alpha2.Issuer, opts v1.UpdateOptions) (*v1alpha2.Issuer, error)
UpdateStatus(ctx context.Context, issuer *v1alpha2.Issuer, opts v1.UpdateOptions) (*v1alpha2.Issuer, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.Issuer, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.IssuerList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.Issuer, err error)
IssuerExpansion
}
// issuers implements IssuerInterface
type issuers struct {
client rest.Interface
ns string
}
// newIssuers returns a Issuers
func newIssuers(c *CertmanagerV1alpha2Client, namespace string) *issuers {
return &issuers{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the issuer, and returns the corresponding issuer object, and an error if there is any.
func (c *issuers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.Issuer, err error) {
result = &v1alpha2.Issuer{}
err = c.client.Get().
Namespace(c.ns).
Resource("issuers").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Issuers that match those selectors.
func (c *issuers) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.IssuerList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.IssuerList{}
err = c.client.Get().
Namespace(c.ns).
Resource("issuers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested issuers.
func (c *issuers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("issuers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a issuer and creates it. Returns the server's representation of the issuer, and an error, if there is any.
func (c *issuers) Create(ctx context.Context, issuer *v1alpha2.Issuer, opts v1.CreateOptions) (result *v1alpha2.Issuer, err error) {
result = &v1alpha2.Issuer{}
err = c.client.Post().
Namespace(c.ns).
Resource("issuers").
VersionedParams(&opts, scheme.ParameterCodec).
Body(issuer).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a issuer and updates it. Returns the server's representation of the issuer, and an error, if there is any.
func (c *issuers) Update(ctx context.Context, issuer *v1alpha2.Issuer, opts v1.UpdateOptions) (result *v1alpha2.Issuer, err error) {
result = &v1alpha2.Issuer{}
err = c.client.Put().
Namespace(c.ns).
Resource("issuers").
Name(issuer.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(issuer).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *issuers) UpdateStatus(ctx context.Context, issuer *v1alpha2.Issuer, opts v1.UpdateOptions) (result *v1alpha2.Issuer, err error) {
result = &v1alpha2.Issuer{}
err = c.client.Put().
Namespace(c.ns).
Resource("issuers").
Name(issuer.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(issuer).
Do(ctx).
Into(result)
return
}
// Delete takes name of the issuer and deletes it. Returns an error if one occurs.
func (c *issuers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("issuers").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *issuers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("issuers").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched issuer.
func (c *issuers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.Issuer, err error) {
result = &v1alpha2.Issuer{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("issuers").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,41 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"certificate.go",
"certificaterequest.go",
"certmanager_client.go",
"clusterissuer.go",
"doc.go",
"generated_expansion.go",
"issuer.go",
],
importpath = "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1alpha3",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/certmanager/v1alpha3:go_default_library",
"//pkg/client/clientset/versioned/scheme:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/types:go_default_library",
"@io_k8s_apimachinery//pkg/watch:go_default_library",
"@io_k8s_client_go//rest:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//pkg/client/clientset/versioned/typed/certmanager/v1alpha3/fake:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
@@ -1,195 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha3
import (
"context"
"time"
v1alpha3 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha3"
scheme "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// CertificatesGetter has a method to return a CertificateInterface.
// A group's client should implement this interface.
type CertificatesGetter interface {
Certificates(namespace string) CertificateInterface
}
// CertificateInterface has methods to work with Certificate resources.
type CertificateInterface interface {
Create(ctx context.Context, certificate *v1alpha3.Certificate, opts v1.CreateOptions) (*v1alpha3.Certificate, error)
Update(ctx context.Context, certificate *v1alpha3.Certificate, opts v1.UpdateOptions) (*v1alpha3.Certificate, error)
UpdateStatus(ctx context.Context, certificate *v1alpha3.Certificate, opts v1.UpdateOptions) (*v1alpha3.Certificate, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.Certificate, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.CertificateList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.Certificate, err error)
CertificateExpansion
}
// certificates implements CertificateInterface
type certificates struct {
client rest.Interface
ns string
}
// newCertificates returns a Certificates
func newCertificates(c *CertmanagerV1alpha3Client, namespace string) *certificates {
return &certificates{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the certificate, and returns the corresponding certificate object, and an error if there is any.
func (c *certificates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.Certificate, err error) {
result = &v1alpha3.Certificate{}
err = c.client.Get().
Namespace(c.ns).
Resource("certificates").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Certificates that match those selectors.
func (c *certificates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.CertificateList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha3.CertificateList{}
err = c.client.Get().
Namespace(c.ns).
Resource("certificates").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested certificates.
func (c *certificates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("certificates").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a certificate and creates it. Returns the server's representation of the certificate, and an error, if there is any.
func (c *certificates) Create(ctx context.Context, certificate *v1alpha3.Certificate, opts v1.CreateOptions) (result *v1alpha3.Certificate, err error) {
result = &v1alpha3.Certificate{}
err = c.client.Post().
Namespace(c.ns).
Resource("certificates").
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificate).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a certificate and updates it. Returns the server's representation of the certificate, and an error, if there is any.
func (c *certificates) Update(ctx context.Context, certificate *v1alpha3.Certificate, opts v1.UpdateOptions) (result *v1alpha3.Certificate, err error) {
result = &v1alpha3.Certificate{}
err = c.client.Put().
Namespace(c.ns).
Resource("certificates").
Name(certificate.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificate).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *certificates) UpdateStatus(ctx context.Context, certificate *v1alpha3.Certificate, opts v1.UpdateOptions) (result *v1alpha3.Certificate, err error) {
result = &v1alpha3.Certificate{}
err = c.client.Put().
Namespace(c.ns).
Resource("certificates").
Name(certificate.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificate).
Do(ctx).
Into(result)
return
}
// Delete takes name of the certificate and deletes it. Returns an error if one occurs.
func (c *certificates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("certificates").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *certificates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("certificates").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched certificate.
func (c *certificates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.Certificate, err error) {
result = &v1alpha3.Certificate{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("certificates").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,195 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha3
import (
"context"
"time"
v1alpha3 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha3"
scheme "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// CertificateRequestsGetter has a method to return a CertificateRequestInterface.
// A group's client should implement this interface.
type CertificateRequestsGetter interface {
CertificateRequests(namespace string) CertificateRequestInterface
}
// CertificateRequestInterface has methods to work with CertificateRequest resources.
type CertificateRequestInterface interface {
Create(ctx context.Context, certificateRequest *v1alpha3.CertificateRequest, opts v1.CreateOptions) (*v1alpha3.CertificateRequest, error)
Update(ctx context.Context, certificateRequest *v1alpha3.CertificateRequest, opts v1.UpdateOptions) (*v1alpha3.CertificateRequest, error)
UpdateStatus(ctx context.Context, certificateRequest *v1alpha3.CertificateRequest, opts v1.UpdateOptions) (*v1alpha3.CertificateRequest, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.CertificateRequest, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.CertificateRequestList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.CertificateRequest, err error)
CertificateRequestExpansion
}
// certificateRequests implements CertificateRequestInterface
type certificateRequests struct {
client rest.Interface
ns string
}
// newCertificateRequests returns a CertificateRequests
func newCertificateRequests(c *CertmanagerV1alpha3Client, namespace string) *certificateRequests {
return &certificateRequests{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the certificateRequest, and returns the corresponding certificateRequest object, and an error if there is any.
func (c *certificateRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.CertificateRequest, err error) {
result = &v1alpha3.CertificateRequest{}
err = c.client.Get().
Namespace(c.ns).
Resource("certificaterequests").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of CertificateRequests that match those selectors.
func (c *certificateRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.CertificateRequestList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha3.CertificateRequestList{}
err = c.client.Get().
Namespace(c.ns).
Resource("certificaterequests").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested certificateRequests.
func (c *certificateRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("certificaterequests").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a certificateRequest and creates it. Returns the server's representation of the certificateRequest, and an error, if there is any.
func (c *certificateRequests) Create(ctx context.Context, certificateRequest *v1alpha3.CertificateRequest, opts v1.CreateOptions) (result *v1alpha3.CertificateRequest, err error) {
result = &v1alpha3.CertificateRequest{}
err = c.client.Post().
Namespace(c.ns).
Resource("certificaterequests").
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificateRequest).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a certificateRequest and updates it. Returns the server's representation of the certificateRequest, and an error, if there is any.
func (c *certificateRequests) Update(ctx context.Context, certificateRequest *v1alpha3.CertificateRequest, opts v1.UpdateOptions) (result *v1alpha3.CertificateRequest, err error) {
result = &v1alpha3.CertificateRequest{}
err = c.client.Put().
Namespace(c.ns).
Resource("certificaterequests").
Name(certificateRequest.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificateRequest).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *certificateRequests) UpdateStatus(ctx context.Context, certificateRequest *v1alpha3.CertificateRequest, opts v1.UpdateOptions) (result *v1alpha3.CertificateRequest, err error) {
result = &v1alpha3.CertificateRequest{}
err = c.client.Put().
Namespace(c.ns).
Resource("certificaterequests").
Name(certificateRequest.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificateRequest).
Do(ctx).
Into(result)
return
}
// Delete takes name of the certificateRequest and deletes it. Returns an error if one occurs.
func (c *certificateRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("certificaterequests").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *certificateRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("certificaterequests").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched certificateRequest.
func (c *certificateRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.CertificateRequest, err error) {
result = &v1alpha3.CertificateRequest{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("certificaterequests").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,104 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha3
import (
v1alpha3 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha3"
"github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
rest "k8s.io/client-go/rest"
)
type CertmanagerV1alpha3Interface interface {
RESTClient() rest.Interface
CertificatesGetter
CertificateRequestsGetter
ClusterIssuersGetter
IssuersGetter
}
// CertmanagerV1alpha3Client is used to interact with features provided by the cert-manager.io group.
type CertmanagerV1alpha3Client struct {
restClient rest.Interface
}
func (c *CertmanagerV1alpha3Client) Certificates(namespace string) CertificateInterface {
return newCertificates(c, namespace)
}
func (c *CertmanagerV1alpha3Client) CertificateRequests(namespace string) CertificateRequestInterface {
return newCertificateRequests(c, namespace)
}
func (c *CertmanagerV1alpha3Client) ClusterIssuers() ClusterIssuerInterface {
return newClusterIssuers(c)
}
func (c *CertmanagerV1alpha3Client) Issuers(namespace string) IssuerInterface {
return newIssuers(c, namespace)
}
// NewForConfig creates a new CertmanagerV1alpha3Client for the given config.
func NewForConfig(c *rest.Config) (*CertmanagerV1alpha3Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &CertmanagerV1alpha3Client{client}, nil
}
// NewForConfigOrDie creates a new CertmanagerV1alpha3Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *CertmanagerV1alpha3Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new CertmanagerV1alpha3Client for the given RESTClient.
func New(c rest.Interface) *CertmanagerV1alpha3Client {
return &CertmanagerV1alpha3Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1alpha3.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *CertmanagerV1alpha3Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}
@@ -1,184 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha3
import (
"context"
"time"
v1alpha3 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha3"
scheme "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// ClusterIssuersGetter has a method to return a ClusterIssuerInterface.
// A group's client should implement this interface.
type ClusterIssuersGetter interface {
ClusterIssuers() ClusterIssuerInterface
}
// ClusterIssuerInterface has methods to work with ClusterIssuer resources.
type ClusterIssuerInterface interface {
Create(ctx context.Context, clusterIssuer *v1alpha3.ClusterIssuer, opts v1.CreateOptions) (*v1alpha3.ClusterIssuer, error)
Update(ctx context.Context, clusterIssuer *v1alpha3.ClusterIssuer, opts v1.UpdateOptions) (*v1alpha3.ClusterIssuer, error)
UpdateStatus(ctx context.Context, clusterIssuer *v1alpha3.ClusterIssuer, opts v1.UpdateOptions) (*v1alpha3.ClusterIssuer, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.ClusterIssuer, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.ClusterIssuerList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ClusterIssuer, err error)
ClusterIssuerExpansion
}
// clusterIssuers implements ClusterIssuerInterface
type clusterIssuers struct {
client rest.Interface
}
// newClusterIssuers returns a ClusterIssuers
func newClusterIssuers(c *CertmanagerV1alpha3Client) *clusterIssuers {
return &clusterIssuers{
client: c.RESTClient(),
}
}
// Get takes name of the clusterIssuer, and returns the corresponding clusterIssuer object, and an error if there is any.
func (c *clusterIssuers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.ClusterIssuer, err error) {
result = &v1alpha3.ClusterIssuer{}
err = c.client.Get().
Resource("clusterissuers").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ClusterIssuers that match those selectors.
func (c *clusterIssuers) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.ClusterIssuerList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha3.ClusterIssuerList{}
err = c.client.Get().
Resource("clusterissuers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested clusterIssuers.
func (c *clusterIssuers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Resource("clusterissuers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a clusterIssuer and creates it. Returns the server's representation of the clusterIssuer, and an error, if there is any.
func (c *clusterIssuers) Create(ctx context.Context, clusterIssuer *v1alpha3.ClusterIssuer, opts v1.CreateOptions) (result *v1alpha3.ClusterIssuer, err error) {
result = &v1alpha3.ClusterIssuer{}
err = c.client.Post().
Resource("clusterissuers").
VersionedParams(&opts, scheme.ParameterCodec).
Body(clusterIssuer).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a clusterIssuer and updates it. Returns the server's representation of the clusterIssuer, and an error, if there is any.
func (c *clusterIssuers) Update(ctx context.Context, clusterIssuer *v1alpha3.ClusterIssuer, opts v1.UpdateOptions) (result *v1alpha3.ClusterIssuer, err error) {
result = &v1alpha3.ClusterIssuer{}
err = c.client.Put().
Resource("clusterissuers").
Name(clusterIssuer.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(clusterIssuer).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *clusterIssuers) UpdateStatus(ctx context.Context, clusterIssuer *v1alpha3.ClusterIssuer, opts v1.UpdateOptions) (result *v1alpha3.ClusterIssuer, err error) {
result = &v1alpha3.ClusterIssuer{}
err = c.client.Put().
Resource("clusterissuers").
Name(clusterIssuer.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(clusterIssuer).
Do(ctx).
Into(result)
return
}
// Delete takes name of the clusterIssuer and deletes it. Returns an error if one occurs.
func (c *clusterIssuers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Resource("clusterissuers").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *clusterIssuers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Resource("clusterissuers").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched clusterIssuer.
func (c *clusterIssuers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ClusterIssuer, err error) {
result = &v1alpha3.ClusterIssuer{}
err = c.client.Patch(pt).
Resource("clusterissuers").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,20 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v1alpha3
@@ -1,40 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"fake_certificate.go",
"fake_certificaterequest.go",
"fake_certmanager_client.go",
"fake_clusterissuer.go",
"fake_issuer.go",
],
importpath = "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1alpha3/fake",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/certmanager/v1alpha3:go_default_library",
"//pkg/client/clientset/versioned/typed/certmanager/v1alpha3:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/labels:go_default_library",
"@io_k8s_apimachinery//pkg/runtime/schema:go_default_library",
"@io_k8s_apimachinery//pkg/types:go_default_library",
"@io_k8s_apimachinery//pkg/watch:go_default_library",
"@io_k8s_client_go//rest:go_default_library",
"@io_k8s_client_go//testing:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
@@ -1,20 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// Package fake has the automatically generated clients.
package fake
@@ -1,142 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
v1alpha3 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeCertificates implements CertificateInterface
type FakeCertificates struct {
Fake *FakeCertmanagerV1alpha3
ns string
}
var certificatesResource = schema.GroupVersionResource{Group: "cert-manager.io", Version: "v1alpha3", Resource: "certificates"}
var certificatesKind = schema.GroupVersionKind{Group: "cert-manager.io", Version: "v1alpha3", Kind: "Certificate"}
// Get takes name of the certificate, and returns the corresponding certificate object, and an error if there is any.
func (c *FakeCertificates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.Certificate, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(certificatesResource, c.ns, name), &v1alpha3.Certificate{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Certificate), err
}
// List takes label and field selectors, and returns the list of Certificates that match those selectors.
func (c *FakeCertificates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.CertificateList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(certificatesResource, certificatesKind, c.ns, opts), &v1alpha3.CertificateList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha3.CertificateList{ListMeta: obj.(*v1alpha3.CertificateList).ListMeta}
for _, item := range obj.(*v1alpha3.CertificateList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested certificates.
func (c *FakeCertificates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(certificatesResource, c.ns, opts))
}
// Create takes the representation of a certificate and creates it. Returns the server's representation of the certificate, and an error, if there is any.
func (c *FakeCertificates) Create(ctx context.Context, certificate *v1alpha3.Certificate, opts v1.CreateOptions) (result *v1alpha3.Certificate, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(certificatesResource, c.ns, certificate), &v1alpha3.Certificate{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Certificate), err
}
// Update takes the representation of a certificate and updates it. Returns the server's representation of the certificate, and an error, if there is any.
func (c *FakeCertificates) Update(ctx context.Context, certificate *v1alpha3.Certificate, opts v1.UpdateOptions) (result *v1alpha3.Certificate, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(certificatesResource, c.ns, certificate), &v1alpha3.Certificate{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Certificate), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeCertificates) UpdateStatus(ctx context.Context, certificate *v1alpha3.Certificate, opts v1.UpdateOptions) (*v1alpha3.Certificate, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(certificatesResource, "status", c.ns, certificate), &v1alpha3.Certificate{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Certificate), err
}
// Delete takes name of the certificate and deletes it. Returns an error if one occurs.
func (c *FakeCertificates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(certificatesResource, c.ns, name), &v1alpha3.Certificate{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeCertificates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(certificatesResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha3.CertificateList{})
return err
}
// Patch applies the patch and returns the patched certificate.
func (c *FakeCertificates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.Certificate, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(certificatesResource, c.ns, name, pt, data, subresources...), &v1alpha3.Certificate{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Certificate), err
}
@@ -1,142 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
v1alpha3 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeCertificateRequests implements CertificateRequestInterface
type FakeCertificateRequests struct {
Fake *FakeCertmanagerV1alpha3
ns string
}
var certificaterequestsResource = schema.GroupVersionResource{Group: "cert-manager.io", Version: "v1alpha3", Resource: "certificaterequests"}
var certificaterequestsKind = schema.GroupVersionKind{Group: "cert-manager.io", Version: "v1alpha3", Kind: "CertificateRequest"}
// Get takes name of the certificateRequest, and returns the corresponding certificateRequest object, and an error if there is any.
func (c *FakeCertificateRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.CertificateRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(certificaterequestsResource, c.ns, name), &v1alpha3.CertificateRequest{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.CertificateRequest), err
}
// List takes label and field selectors, and returns the list of CertificateRequests that match those selectors.
func (c *FakeCertificateRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.CertificateRequestList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(certificaterequestsResource, certificaterequestsKind, c.ns, opts), &v1alpha3.CertificateRequestList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha3.CertificateRequestList{ListMeta: obj.(*v1alpha3.CertificateRequestList).ListMeta}
for _, item := range obj.(*v1alpha3.CertificateRequestList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested certificateRequests.
func (c *FakeCertificateRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(certificaterequestsResource, c.ns, opts))
}
// Create takes the representation of a certificateRequest and creates it. Returns the server's representation of the certificateRequest, and an error, if there is any.
func (c *FakeCertificateRequests) Create(ctx context.Context, certificateRequest *v1alpha3.CertificateRequest, opts v1.CreateOptions) (result *v1alpha3.CertificateRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(certificaterequestsResource, c.ns, certificateRequest), &v1alpha3.CertificateRequest{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.CertificateRequest), err
}
// Update takes the representation of a certificateRequest and updates it. Returns the server's representation of the certificateRequest, and an error, if there is any.
func (c *FakeCertificateRequests) Update(ctx context.Context, certificateRequest *v1alpha3.CertificateRequest, opts v1.UpdateOptions) (result *v1alpha3.CertificateRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(certificaterequestsResource, c.ns, certificateRequest), &v1alpha3.CertificateRequest{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.CertificateRequest), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeCertificateRequests) UpdateStatus(ctx context.Context, certificateRequest *v1alpha3.CertificateRequest, opts v1.UpdateOptions) (*v1alpha3.CertificateRequest, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(certificaterequestsResource, "status", c.ns, certificateRequest), &v1alpha3.CertificateRequest{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.CertificateRequest), err
}
// Delete takes name of the certificateRequest and deletes it. Returns an error if one occurs.
func (c *FakeCertificateRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(certificaterequestsResource, c.ns, name), &v1alpha3.CertificateRequest{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeCertificateRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(certificaterequestsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha3.CertificateRequestList{})
return err
}
// Patch applies the patch and returns the patched certificateRequest.
func (c *FakeCertificateRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.CertificateRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(certificaterequestsResource, c.ns, name, pt, data, subresources...), &v1alpha3.CertificateRequest{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.CertificateRequest), err
}
@@ -1,52 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha3 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1alpha3"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeCertmanagerV1alpha3 struct {
*testing.Fake
}
func (c *FakeCertmanagerV1alpha3) Certificates(namespace string) v1alpha3.CertificateInterface {
return &FakeCertificates{c, namespace}
}
func (c *FakeCertmanagerV1alpha3) CertificateRequests(namespace string) v1alpha3.CertificateRequestInterface {
return &FakeCertificateRequests{c, namespace}
}
func (c *FakeCertmanagerV1alpha3) ClusterIssuers() v1alpha3.ClusterIssuerInterface {
return &FakeClusterIssuers{c}
}
func (c *FakeCertmanagerV1alpha3) Issuers(namespace string) v1alpha3.IssuerInterface {
return &FakeIssuers{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeCertmanagerV1alpha3) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}
@@ -1,133 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
v1alpha3 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeClusterIssuers implements ClusterIssuerInterface
type FakeClusterIssuers struct {
Fake *FakeCertmanagerV1alpha3
}
var clusterissuersResource = schema.GroupVersionResource{Group: "cert-manager.io", Version: "v1alpha3", Resource: "clusterissuers"}
var clusterissuersKind = schema.GroupVersionKind{Group: "cert-manager.io", Version: "v1alpha3", Kind: "ClusterIssuer"}
// Get takes name of the clusterIssuer, and returns the corresponding clusterIssuer object, and an error if there is any.
func (c *FakeClusterIssuers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.ClusterIssuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(clusterissuersResource, name), &v1alpha3.ClusterIssuer{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.ClusterIssuer), err
}
// List takes label and field selectors, and returns the list of ClusterIssuers that match those selectors.
func (c *FakeClusterIssuers) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.ClusterIssuerList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(clusterissuersResource, clusterissuersKind, opts), &v1alpha3.ClusterIssuerList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha3.ClusterIssuerList{ListMeta: obj.(*v1alpha3.ClusterIssuerList).ListMeta}
for _, item := range obj.(*v1alpha3.ClusterIssuerList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested clusterIssuers.
func (c *FakeClusterIssuers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(clusterissuersResource, opts))
}
// Create takes the representation of a clusterIssuer and creates it. Returns the server's representation of the clusterIssuer, and an error, if there is any.
func (c *FakeClusterIssuers) Create(ctx context.Context, clusterIssuer *v1alpha3.ClusterIssuer, opts v1.CreateOptions) (result *v1alpha3.ClusterIssuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(clusterissuersResource, clusterIssuer), &v1alpha3.ClusterIssuer{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.ClusterIssuer), err
}
// Update takes the representation of a clusterIssuer and updates it. Returns the server's representation of the clusterIssuer, and an error, if there is any.
func (c *FakeClusterIssuers) Update(ctx context.Context, clusterIssuer *v1alpha3.ClusterIssuer, opts v1.UpdateOptions) (result *v1alpha3.ClusterIssuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(clusterissuersResource, clusterIssuer), &v1alpha3.ClusterIssuer{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.ClusterIssuer), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeClusterIssuers) UpdateStatus(ctx context.Context, clusterIssuer *v1alpha3.ClusterIssuer, opts v1.UpdateOptions) (*v1alpha3.ClusterIssuer, error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateSubresourceAction(clusterissuersResource, "status", clusterIssuer), &v1alpha3.ClusterIssuer{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.ClusterIssuer), err
}
// Delete takes name of the clusterIssuer and deletes it. Returns an error if one occurs.
func (c *FakeClusterIssuers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(clusterissuersResource, name), &v1alpha3.ClusterIssuer{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeClusterIssuers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(clusterissuersResource, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha3.ClusterIssuerList{})
return err
}
// Patch applies the patch and returns the patched clusterIssuer.
func (c *FakeClusterIssuers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ClusterIssuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(clusterissuersResource, name, pt, data, subresources...), &v1alpha3.ClusterIssuer{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.ClusterIssuer), err
}
@@ -1,142 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
v1alpha3 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeIssuers implements IssuerInterface
type FakeIssuers struct {
Fake *FakeCertmanagerV1alpha3
ns string
}
var issuersResource = schema.GroupVersionResource{Group: "cert-manager.io", Version: "v1alpha3", Resource: "issuers"}
var issuersKind = schema.GroupVersionKind{Group: "cert-manager.io", Version: "v1alpha3", Kind: "Issuer"}
// Get takes name of the issuer, and returns the corresponding issuer object, and an error if there is any.
func (c *FakeIssuers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.Issuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(issuersResource, c.ns, name), &v1alpha3.Issuer{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Issuer), err
}
// List takes label and field selectors, and returns the list of Issuers that match those selectors.
func (c *FakeIssuers) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.IssuerList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(issuersResource, issuersKind, c.ns, opts), &v1alpha3.IssuerList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha3.IssuerList{ListMeta: obj.(*v1alpha3.IssuerList).ListMeta}
for _, item := range obj.(*v1alpha3.IssuerList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested issuers.
func (c *FakeIssuers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(issuersResource, c.ns, opts))
}
// Create takes the representation of a issuer and creates it. Returns the server's representation of the issuer, and an error, if there is any.
func (c *FakeIssuers) Create(ctx context.Context, issuer *v1alpha3.Issuer, opts v1.CreateOptions) (result *v1alpha3.Issuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(issuersResource, c.ns, issuer), &v1alpha3.Issuer{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Issuer), err
}
// Update takes the representation of a issuer and updates it. Returns the server's representation of the issuer, and an error, if there is any.
func (c *FakeIssuers) Update(ctx context.Context, issuer *v1alpha3.Issuer, opts v1.UpdateOptions) (result *v1alpha3.Issuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(issuersResource, c.ns, issuer), &v1alpha3.Issuer{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Issuer), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeIssuers) UpdateStatus(ctx context.Context, issuer *v1alpha3.Issuer, opts v1.UpdateOptions) (*v1alpha3.Issuer, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(issuersResource, "status", c.ns, issuer), &v1alpha3.Issuer{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Issuer), err
}
// Delete takes name of the issuer and deletes it. Returns an error if one occurs.
func (c *FakeIssuers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(issuersResource, c.ns, name), &v1alpha3.Issuer{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeIssuers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(issuersResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha3.IssuerList{})
return err
}
// Patch applies the patch and returns the patched issuer.
func (c *FakeIssuers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.Issuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(issuersResource, c.ns, name, pt, data, subresources...), &v1alpha3.Issuer{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Issuer), err
}
@@ -1,27 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha3
type CertificateExpansion interface{}
type CertificateRequestExpansion interface{}
type ClusterIssuerExpansion interface{}
type IssuerExpansion interface{}
@@ -1,195 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha3
import (
"context"
"time"
v1alpha3 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha3"
scheme "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// IssuersGetter has a method to return a IssuerInterface.
// A group's client should implement this interface.
type IssuersGetter interface {
Issuers(namespace string) IssuerInterface
}
// IssuerInterface has methods to work with Issuer resources.
type IssuerInterface interface {
Create(ctx context.Context, issuer *v1alpha3.Issuer, opts v1.CreateOptions) (*v1alpha3.Issuer, error)
Update(ctx context.Context, issuer *v1alpha3.Issuer, opts v1.UpdateOptions) (*v1alpha3.Issuer, error)
UpdateStatus(ctx context.Context, issuer *v1alpha3.Issuer, opts v1.UpdateOptions) (*v1alpha3.Issuer, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.Issuer, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.IssuerList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.Issuer, err error)
IssuerExpansion
}
// issuers implements IssuerInterface
type issuers struct {
client rest.Interface
ns string
}
// newIssuers returns a Issuers
func newIssuers(c *CertmanagerV1alpha3Client, namespace string) *issuers {
return &issuers{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the issuer, and returns the corresponding issuer object, and an error if there is any.
func (c *issuers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.Issuer, err error) {
result = &v1alpha3.Issuer{}
err = c.client.Get().
Namespace(c.ns).
Resource("issuers").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Issuers that match those selectors.
func (c *issuers) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.IssuerList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha3.IssuerList{}
err = c.client.Get().
Namespace(c.ns).
Resource("issuers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested issuers.
func (c *issuers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("issuers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a issuer and creates it. Returns the server's representation of the issuer, and an error, if there is any.
func (c *issuers) Create(ctx context.Context, issuer *v1alpha3.Issuer, opts v1.CreateOptions) (result *v1alpha3.Issuer, err error) {
result = &v1alpha3.Issuer{}
err = c.client.Post().
Namespace(c.ns).
Resource("issuers").
VersionedParams(&opts, scheme.ParameterCodec).
Body(issuer).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a issuer and updates it. Returns the server's representation of the issuer, and an error, if there is any.
func (c *issuers) Update(ctx context.Context, issuer *v1alpha3.Issuer, opts v1.UpdateOptions) (result *v1alpha3.Issuer, err error) {
result = &v1alpha3.Issuer{}
err = c.client.Put().
Namespace(c.ns).
Resource("issuers").
Name(issuer.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(issuer).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *issuers) UpdateStatus(ctx context.Context, issuer *v1alpha3.Issuer, opts v1.UpdateOptions) (result *v1alpha3.Issuer, err error) {
result = &v1alpha3.Issuer{}
err = c.client.Put().
Namespace(c.ns).
Resource("issuers").
Name(issuer.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(issuer).
Do(ctx).
Into(result)
return
}
// Delete takes name of the issuer and deletes it. Returns an error if one occurs.
func (c *issuers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("issuers").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *issuers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("issuers").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched issuer.
func (c *issuers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.Issuer, err error) {
result = &v1alpha3.Issuer{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("issuers").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,41 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"certificate.go",
"certificaterequest.go",
"certmanager_client.go",
"clusterissuer.go",
"doc.go",
"generated_expansion.go",
"issuer.go",
],
importpath = "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1beta1",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/certmanager/v1beta1:go_default_library",
"//pkg/client/clientset/versioned/scheme:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/types:go_default_library",
"@io_k8s_apimachinery//pkg/watch:go_default_library",
"@io_k8s_client_go//rest:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//pkg/client/clientset/versioned/typed/certmanager/v1beta1/fake:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
@@ -1,195 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1beta1
import (
"context"
"time"
v1beta1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1beta1"
scheme "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// CertificatesGetter has a method to return a CertificateInterface.
// A group's client should implement this interface.
type CertificatesGetter interface {
Certificates(namespace string) CertificateInterface
}
// CertificateInterface has methods to work with Certificate resources.
type CertificateInterface interface {
Create(ctx context.Context, certificate *v1beta1.Certificate, opts v1.CreateOptions) (*v1beta1.Certificate, error)
Update(ctx context.Context, certificate *v1beta1.Certificate, opts v1.UpdateOptions) (*v1beta1.Certificate, error)
UpdateStatus(ctx context.Context, certificate *v1beta1.Certificate, opts v1.UpdateOptions) (*v1beta1.Certificate, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Certificate, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CertificateList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Certificate, err error)
CertificateExpansion
}
// certificates implements CertificateInterface
type certificates struct {
client rest.Interface
ns string
}
// newCertificates returns a Certificates
func newCertificates(c *CertmanagerV1beta1Client, namespace string) *certificates {
return &certificates{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the certificate, and returns the corresponding certificate object, and an error if there is any.
func (c *certificates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Certificate, err error) {
result = &v1beta1.Certificate{}
err = c.client.Get().
Namespace(c.ns).
Resource("certificates").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Certificates that match those selectors.
func (c *certificates) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CertificateList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1beta1.CertificateList{}
err = c.client.Get().
Namespace(c.ns).
Resource("certificates").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested certificates.
func (c *certificates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("certificates").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a certificate and creates it. Returns the server's representation of the certificate, and an error, if there is any.
func (c *certificates) Create(ctx context.Context, certificate *v1beta1.Certificate, opts v1.CreateOptions) (result *v1beta1.Certificate, err error) {
result = &v1beta1.Certificate{}
err = c.client.Post().
Namespace(c.ns).
Resource("certificates").
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificate).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a certificate and updates it. Returns the server's representation of the certificate, and an error, if there is any.
func (c *certificates) Update(ctx context.Context, certificate *v1beta1.Certificate, opts v1.UpdateOptions) (result *v1beta1.Certificate, err error) {
result = &v1beta1.Certificate{}
err = c.client.Put().
Namespace(c.ns).
Resource("certificates").
Name(certificate.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificate).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *certificates) UpdateStatus(ctx context.Context, certificate *v1beta1.Certificate, opts v1.UpdateOptions) (result *v1beta1.Certificate, err error) {
result = &v1beta1.Certificate{}
err = c.client.Put().
Namespace(c.ns).
Resource("certificates").
Name(certificate.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificate).
Do(ctx).
Into(result)
return
}
// Delete takes name of the certificate and deletes it. Returns an error if one occurs.
func (c *certificates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("certificates").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *certificates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("certificates").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched certificate.
func (c *certificates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Certificate, err error) {
result = &v1beta1.Certificate{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("certificates").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,195 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1beta1
import (
"context"
"time"
v1beta1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1beta1"
scheme "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// CertificateRequestsGetter has a method to return a CertificateRequestInterface.
// A group's client should implement this interface.
type CertificateRequestsGetter interface {
CertificateRequests(namespace string) CertificateRequestInterface
}
// CertificateRequestInterface has methods to work with CertificateRequest resources.
type CertificateRequestInterface interface {
Create(ctx context.Context, certificateRequest *v1beta1.CertificateRequest, opts v1.CreateOptions) (*v1beta1.CertificateRequest, error)
Update(ctx context.Context, certificateRequest *v1beta1.CertificateRequest, opts v1.UpdateOptions) (*v1beta1.CertificateRequest, error)
UpdateStatus(ctx context.Context, certificateRequest *v1beta1.CertificateRequest, opts v1.UpdateOptions) (*v1beta1.CertificateRequest, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.CertificateRequest, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CertificateRequestList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CertificateRequest, err error)
CertificateRequestExpansion
}
// certificateRequests implements CertificateRequestInterface
type certificateRequests struct {
client rest.Interface
ns string
}
// newCertificateRequests returns a CertificateRequests
func newCertificateRequests(c *CertmanagerV1beta1Client, namespace string) *certificateRequests {
return &certificateRequests{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the certificateRequest, and returns the corresponding certificateRequest object, and an error if there is any.
func (c *certificateRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CertificateRequest, err error) {
result = &v1beta1.CertificateRequest{}
err = c.client.Get().
Namespace(c.ns).
Resource("certificaterequests").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of CertificateRequests that match those selectors.
func (c *certificateRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CertificateRequestList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1beta1.CertificateRequestList{}
err = c.client.Get().
Namespace(c.ns).
Resource("certificaterequests").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested certificateRequests.
func (c *certificateRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("certificaterequests").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a certificateRequest and creates it. Returns the server's representation of the certificateRequest, and an error, if there is any.
func (c *certificateRequests) Create(ctx context.Context, certificateRequest *v1beta1.CertificateRequest, opts v1.CreateOptions) (result *v1beta1.CertificateRequest, err error) {
result = &v1beta1.CertificateRequest{}
err = c.client.Post().
Namespace(c.ns).
Resource("certificaterequests").
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificateRequest).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a certificateRequest and updates it. Returns the server's representation of the certificateRequest, and an error, if there is any.
func (c *certificateRequests) Update(ctx context.Context, certificateRequest *v1beta1.CertificateRequest, opts v1.UpdateOptions) (result *v1beta1.CertificateRequest, err error) {
result = &v1beta1.CertificateRequest{}
err = c.client.Put().
Namespace(c.ns).
Resource("certificaterequests").
Name(certificateRequest.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificateRequest).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *certificateRequests) UpdateStatus(ctx context.Context, certificateRequest *v1beta1.CertificateRequest, opts v1.UpdateOptions) (result *v1beta1.CertificateRequest, err error) {
result = &v1beta1.CertificateRequest{}
err = c.client.Put().
Namespace(c.ns).
Resource("certificaterequests").
Name(certificateRequest.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificateRequest).
Do(ctx).
Into(result)
return
}
// Delete takes name of the certificateRequest and deletes it. Returns an error if one occurs.
func (c *certificateRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("certificaterequests").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *certificateRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("certificaterequests").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched certificateRequest.
func (c *certificateRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CertificateRequest, err error) {
result = &v1beta1.CertificateRequest{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("certificaterequests").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,104 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1beta1
import (
v1beta1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1beta1"
"github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
rest "k8s.io/client-go/rest"
)
type CertmanagerV1beta1Interface interface {
RESTClient() rest.Interface
CertificatesGetter
CertificateRequestsGetter
ClusterIssuersGetter
IssuersGetter
}
// CertmanagerV1beta1Client is used to interact with features provided by the cert-manager.io group.
type CertmanagerV1beta1Client struct {
restClient rest.Interface
}
func (c *CertmanagerV1beta1Client) Certificates(namespace string) CertificateInterface {
return newCertificates(c, namespace)
}
func (c *CertmanagerV1beta1Client) CertificateRequests(namespace string) CertificateRequestInterface {
return newCertificateRequests(c, namespace)
}
func (c *CertmanagerV1beta1Client) ClusterIssuers() ClusterIssuerInterface {
return newClusterIssuers(c)
}
func (c *CertmanagerV1beta1Client) Issuers(namespace string) IssuerInterface {
return newIssuers(c, namespace)
}
// NewForConfig creates a new CertmanagerV1beta1Client for the given config.
func NewForConfig(c *rest.Config) (*CertmanagerV1beta1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &CertmanagerV1beta1Client{client}, nil
}
// NewForConfigOrDie creates a new CertmanagerV1beta1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *CertmanagerV1beta1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new CertmanagerV1beta1Client for the given RESTClient.
func New(c rest.Interface) *CertmanagerV1beta1Client {
return &CertmanagerV1beta1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1beta1.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *CertmanagerV1beta1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}
@@ -1,184 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1beta1
import (
"context"
"time"
v1beta1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1beta1"
scheme "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// ClusterIssuersGetter has a method to return a ClusterIssuerInterface.
// A group's client should implement this interface.
type ClusterIssuersGetter interface {
ClusterIssuers() ClusterIssuerInterface
}
// ClusterIssuerInterface has methods to work with ClusterIssuer resources.
type ClusterIssuerInterface interface {
Create(ctx context.Context, clusterIssuer *v1beta1.ClusterIssuer, opts v1.CreateOptions) (*v1beta1.ClusterIssuer, error)
Update(ctx context.Context, clusterIssuer *v1beta1.ClusterIssuer, opts v1.UpdateOptions) (*v1beta1.ClusterIssuer, error)
UpdateStatus(ctx context.Context, clusterIssuer *v1beta1.ClusterIssuer, opts v1.UpdateOptions) (*v1beta1.ClusterIssuer, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.ClusterIssuer, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ClusterIssuerList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ClusterIssuer, err error)
ClusterIssuerExpansion
}
// clusterIssuers implements ClusterIssuerInterface
type clusterIssuers struct {
client rest.Interface
}
// newClusterIssuers returns a ClusterIssuers
func newClusterIssuers(c *CertmanagerV1beta1Client) *clusterIssuers {
return &clusterIssuers{
client: c.RESTClient(),
}
}
// Get takes name of the clusterIssuer, and returns the corresponding clusterIssuer object, and an error if there is any.
func (c *clusterIssuers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ClusterIssuer, err error) {
result = &v1beta1.ClusterIssuer{}
err = c.client.Get().
Resource("clusterissuers").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ClusterIssuers that match those selectors.
func (c *clusterIssuers) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ClusterIssuerList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1beta1.ClusterIssuerList{}
err = c.client.Get().
Resource("clusterissuers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested clusterIssuers.
func (c *clusterIssuers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Resource("clusterissuers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a clusterIssuer and creates it. Returns the server's representation of the clusterIssuer, and an error, if there is any.
func (c *clusterIssuers) Create(ctx context.Context, clusterIssuer *v1beta1.ClusterIssuer, opts v1.CreateOptions) (result *v1beta1.ClusterIssuer, err error) {
result = &v1beta1.ClusterIssuer{}
err = c.client.Post().
Resource("clusterissuers").
VersionedParams(&opts, scheme.ParameterCodec).
Body(clusterIssuer).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a clusterIssuer and updates it. Returns the server's representation of the clusterIssuer, and an error, if there is any.
func (c *clusterIssuers) Update(ctx context.Context, clusterIssuer *v1beta1.ClusterIssuer, opts v1.UpdateOptions) (result *v1beta1.ClusterIssuer, err error) {
result = &v1beta1.ClusterIssuer{}
err = c.client.Put().
Resource("clusterissuers").
Name(clusterIssuer.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(clusterIssuer).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *clusterIssuers) UpdateStatus(ctx context.Context, clusterIssuer *v1beta1.ClusterIssuer, opts v1.UpdateOptions) (result *v1beta1.ClusterIssuer, err error) {
result = &v1beta1.ClusterIssuer{}
err = c.client.Put().
Resource("clusterissuers").
Name(clusterIssuer.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(clusterIssuer).
Do(ctx).
Into(result)
return
}
// Delete takes name of the clusterIssuer and deletes it. Returns an error if one occurs.
func (c *clusterIssuers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Resource("clusterissuers").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *clusterIssuers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Resource("clusterissuers").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched clusterIssuer.
func (c *clusterIssuers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ClusterIssuer, err error) {
result = &v1beta1.ClusterIssuer{}
err = c.client.Patch(pt).
Resource("clusterissuers").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -1,20 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v1beta1
@@ -1,40 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"fake_certificate.go",
"fake_certificaterequest.go",
"fake_certmanager_client.go",
"fake_clusterissuer.go",
"fake_issuer.go",
],
importpath = "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1beta1/fake",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/certmanager/v1beta1:go_default_library",
"//pkg/client/clientset/versioned/typed/certmanager/v1beta1:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/labels:go_default_library",
"@io_k8s_apimachinery//pkg/runtime/schema:go_default_library",
"@io_k8s_apimachinery//pkg/types:go_default_library",
"@io_k8s_apimachinery//pkg/watch:go_default_library",
"@io_k8s_client_go//rest:go_default_library",
"@io_k8s_client_go//testing:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
@@ -1,20 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// Package fake has the automatically generated clients.
package fake
@@ -1,142 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
v1beta1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeCertificates implements CertificateInterface
type FakeCertificates struct {
Fake *FakeCertmanagerV1beta1
ns string
}
var certificatesResource = schema.GroupVersionResource{Group: "cert-manager.io", Version: "v1beta1", Resource: "certificates"}
var certificatesKind = schema.GroupVersionKind{Group: "cert-manager.io", Version: "v1beta1", Kind: "Certificate"}
// Get takes name of the certificate, and returns the corresponding certificate object, and an error if there is any.
func (c *FakeCertificates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Certificate, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(certificatesResource, c.ns, name), &v1beta1.Certificate{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Certificate), err
}
// List takes label and field selectors, and returns the list of Certificates that match those selectors.
func (c *FakeCertificates) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CertificateList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(certificatesResource, certificatesKind, c.ns, opts), &v1beta1.CertificateList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1beta1.CertificateList{ListMeta: obj.(*v1beta1.CertificateList).ListMeta}
for _, item := range obj.(*v1beta1.CertificateList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested certificates.
func (c *FakeCertificates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(certificatesResource, c.ns, opts))
}
// Create takes the representation of a certificate and creates it. Returns the server's representation of the certificate, and an error, if there is any.
func (c *FakeCertificates) Create(ctx context.Context, certificate *v1beta1.Certificate, opts v1.CreateOptions) (result *v1beta1.Certificate, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(certificatesResource, c.ns, certificate), &v1beta1.Certificate{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Certificate), err
}
// Update takes the representation of a certificate and updates it. Returns the server's representation of the certificate, and an error, if there is any.
func (c *FakeCertificates) Update(ctx context.Context, certificate *v1beta1.Certificate, opts v1.UpdateOptions) (result *v1beta1.Certificate, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(certificatesResource, c.ns, certificate), &v1beta1.Certificate{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Certificate), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeCertificates) UpdateStatus(ctx context.Context, certificate *v1beta1.Certificate, opts v1.UpdateOptions) (*v1beta1.Certificate, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(certificatesResource, "status", c.ns, certificate), &v1beta1.Certificate{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Certificate), err
}
// Delete takes name of the certificate and deletes it. Returns an error if one occurs.
func (c *FakeCertificates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(certificatesResource, c.ns, name), &v1beta1.Certificate{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeCertificates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(certificatesResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.CertificateList{})
return err
}
// Patch applies the patch and returns the patched certificate.
func (c *FakeCertificates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Certificate, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(certificatesResource, c.ns, name, pt, data, subresources...), &v1beta1.Certificate{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Certificate), err
}
@@ -1,142 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
v1beta1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeCertificateRequests implements CertificateRequestInterface
type FakeCertificateRequests struct {
Fake *FakeCertmanagerV1beta1
ns string
}
var certificaterequestsResource = schema.GroupVersionResource{Group: "cert-manager.io", Version: "v1beta1", Resource: "certificaterequests"}
var certificaterequestsKind = schema.GroupVersionKind{Group: "cert-manager.io", Version: "v1beta1", Kind: "CertificateRequest"}
// Get takes name of the certificateRequest, and returns the corresponding certificateRequest object, and an error if there is any.
func (c *FakeCertificateRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CertificateRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(certificaterequestsResource, c.ns, name), &v1beta1.CertificateRequest{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.CertificateRequest), err
}
// List takes label and field selectors, and returns the list of CertificateRequests that match those selectors.
func (c *FakeCertificateRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CertificateRequestList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(certificaterequestsResource, certificaterequestsKind, c.ns, opts), &v1beta1.CertificateRequestList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1beta1.CertificateRequestList{ListMeta: obj.(*v1beta1.CertificateRequestList).ListMeta}
for _, item := range obj.(*v1beta1.CertificateRequestList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested certificateRequests.
func (c *FakeCertificateRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(certificaterequestsResource, c.ns, opts))
}
// Create takes the representation of a certificateRequest and creates it. Returns the server's representation of the certificateRequest, and an error, if there is any.
func (c *FakeCertificateRequests) Create(ctx context.Context, certificateRequest *v1beta1.CertificateRequest, opts v1.CreateOptions) (result *v1beta1.CertificateRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(certificaterequestsResource, c.ns, certificateRequest), &v1beta1.CertificateRequest{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.CertificateRequest), err
}
// Update takes the representation of a certificateRequest and updates it. Returns the server's representation of the certificateRequest, and an error, if there is any.
func (c *FakeCertificateRequests) Update(ctx context.Context, certificateRequest *v1beta1.CertificateRequest, opts v1.UpdateOptions) (result *v1beta1.CertificateRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(certificaterequestsResource, c.ns, certificateRequest), &v1beta1.CertificateRequest{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.CertificateRequest), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeCertificateRequests) UpdateStatus(ctx context.Context, certificateRequest *v1beta1.CertificateRequest, opts v1.UpdateOptions) (*v1beta1.CertificateRequest, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(certificaterequestsResource, "status", c.ns, certificateRequest), &v1beta1.CertificateRequest{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.CertificateRequest), err
}
// Delete takes name of the certificateRequest and deletes it. Returns an error if one occurs.
func (c *FakeCertificateRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(certificaterequestsResource, c.ns, name), &v1beta1.CertificateRequest{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeCertificateRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(certificaterequestsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.CertificateRequestList{})
return err
}
// Patch applies the patch and returns the patched certificateRequest.
func (c *FakeCertificateRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CertificateRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(certificaterequestsResource, c.ns, name, pt, data, subresources...), &v1beta1.CertificateRequest{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.CertificateRequest), err
}
@@ -1,52 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1beta1 "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/typed/certmanager/v1beta1"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeCertmanagerV1beta1 struct {
*testing.Fake
}
func (c *FakeCertmanagerV1beta1) Certificates(namespace string) v1beta1.CertificateInterface {
return &FakeCertificates{c, namespace}
}
func (c *FakeCertmanagerV1beta1) CertificateRequests(namespace string) v1beta1.CertificateRequestInterface {
return &FakeCertificateRequests{c, namespace}
}
func (c *FakeCertmanagerV1beta1) ClusterIssuers() v1beta1.ClusterIssuerInterface {
return &FakeClusterIssuers{c}
}
func (c *FakeCertmanagerV1beta1) Issuers(namespace string) v1beta1.IssuerInterface {
return &FakeIssuers{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeCertmanagerV1beta1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}
@@ -1,133 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
v1beta1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeClusterIssuers implements ClusterIssuerInterface
type FakeClusterIssuers struct {
Fake *FakeCertmanagerV1beta1
}
var clusterissuersResource = schema.GroupVersionResource{Group: "cert-manager.io", Version: "v1beta1", Resource: "clusterissuers"}
var clusterissuersKind = schema.GroupVersionKind{Group: "cert-manager.io", Version: "v1beta1", Kind: "ClusterIssuer"}
// Get takes name of the clusterIssuer, and returns the corresponding clusterIssuer object, and an error if there is any.
func (c *FakeClusterIssuers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ClusterIssuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(clusterissuersResource, name), &v1beta1.ClusterIssuer{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.ClusterIssuer), err
}
// List takes label and field selectors, and returns the list of ClusterIssuers that match those selectors.
func (c *FakeClusterIssuers) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ClusterIssuerList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(clusterissuersResource, clusterissuersKind, opts), &v1beta1.ClusterIssuerList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1beta1.ClusterIssuerList{ListMeta: obj.(*v1beta1.ClusterIssuerList).ListMeta}
for _, item := range obj.(*v1beta1.ClusterIssuerList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested clusterIssuers.
func (c *FakeClusterIssuers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(clusterissuersResource, opts))
}
// Create takes the representation of a clusterIssuer and creates it. Returns the server's representation of the clusterIssuer, and an error, if there is any.
func (c *FakeClusterIssuers) Create(ctx context.Context, clusterIssuer *v1beta1.ClusterIssuer, opts v1.CreateOptions) (result *v1beta1.ClusterIssuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(clusterissuersResource, clusterIssuer), &v1beta1.ClusterIssuer{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.ClusterIssuer), err
}
// Update takes the representation of a clusterIssuer and updates it. Returns the server's representation of the clusterIssuer, and an error, if there is any.
func (c *FakeClusterIssuers) Update(ctx context.Context, clusterIssuer *v1beta1.ClusterIssuer, opts v1.UpdateOptions) (result *v1beta1.ClusterIssuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(clusterissuersResource, clusterIssuer), &v1beta1.ClusterIssuer{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.ClusterIssuer), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeClusterIssuers) UpdateStatus(ctx context.Context, clusterIssuer *v1beta1.ClusterIssuer, opts v1.UpdateOptions) (*v1beta1.ClusterIssuer, error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateSubresourceAction(clusterissuersResource, "status", clusterIssuer), &v1beta1.ClusterIssuer{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.ClusterIssuer), err
}
// Delete takes name of the clusterIssuer and deletes it. Returns an error if one occurs.
func (c *FakeClusterIssuers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(clusterissuersResource, name), &v1beta1.ClusterIssuer{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeClusterIssuers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(clusterissuersResource, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.ClusterIssuerList{})
return err
}
// Patch applies the patch and returns the patched clusterIssuer.
func (c *FakeClusterIssuers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ClusterIssuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(clusterissuersResource, name, pt, data, subresources...), &v1beta1.ClusterIssuer{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.ClusterIssuer), err
}
@@ -1,142 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
v1beta1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeIssuers implements IssuerInterface
type FakeIssuers struct {
Fake *FakeCertmanagerV1beta1
ns string
}
var issuersResource = schema.GroupVersionResource{Group: "cert-manager.io", Version: "v1beta1", Resource: "issuers"}
var issuersKind = schema.GroupVersionKind{Group: "cert-manager.io", Version: "v1beta1", Kind: "Issuer"}
// Get takes name of the issuer, and returns the corresponding issuer object, and an error if there is any.
func (c *FakeIssuers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Issuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(issuersResource, c.ns, name), &v1beta1.Issuer{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Issuer), err
}
// List takes label and field selectors, and returns the list of Issuers that match those selectors.
func (c *FakeIssuers) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.IssuerList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(issuersResource, issuersKind, c.ns, opts), &v1beta1.IssuerList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1beta1.IssuerList{ListMeta: obj.(*v1beta1.IssuerList).ListMeta}
for _, item := range obj.(*v1beta1.IssuerList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested issuers.
func (c *FakeIssuers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(issuersResource, c.ns, opts))
}
// Create takes the representation of a issuer and creates it. Returns the server's representation of the issuer, and an error, if there is any.
func (c *FakeIssuers) Create(ctx context.Context, issuer *v1beta1.Issuer, opts v1.CreateOptions) (result *v1beta1.Issuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(issuersResource, c.ns, issuer), &v1beta1.Issuer{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Issuer), err
}
// Update takes the representation of a issuer and updates it. Returns the server's representation of the issuer, and an error, if there is any.
func (c *FakeIssuers) Update(ctx context.Context, issuer *v1beta1.Issuer, opts v1.UpdateOptions) (result *v1beta1.Issuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(issuersResource, c.ns, issuer), &v1beta1.Issuer{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Issuer), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeIssuers) UpdateStatus(ctx context.Context, issuer *v1beta1.Issuer, opts v1.UpdateOptions) (*v1beta1.Issuer, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(issuersResource, "status", c.ns, issuer), &v1beta1.Issuer{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Issuer), err
}
// Delete takes name of the issuer and deletes it. Returns an error if one occurs.
func (c *FakeIssuers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(issuersResource, c.ns, name), &v1beta1.Issuer{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeIssuers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(issuersResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.IssuerList{})
return err
}
// Patch applies the patch and returns the patched issuer.
func (c *FakeIssuers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Issuer, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(issuersResource, c.ns, name, pt, data, subresources...), &v1beta1.Issuer{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Issuer), err
}
@@ -1,27 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1beta1
type CertificateExpansion interface{}
type CertificateRequestExpansion interface{}
type ClusterIssuerExpansion interface{}
type IssuerExpansion interface{}
@@ -1,195 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1beta1
import (
"context"
"time"
v1beta1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1beta1"
scheme "github.com/jetstack/cert-manager/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// IssuersGetter has a method to return a IssuerInterface.
// A group's client should implement this interface.
type IssuersGetter interface {
Issuers(namespace string) IssuerInterface
}
// IssuerInterface has methods to work with Issuer resources.
type IssuerInterface interface {
Create(ctx context.Context, issuer *v1beta1.Issuer, opts v1.CreateOptions) (*v1beta1.Issuer, error)
Update(ctx context.Context, issuer *v1beta1.Issuer, opts v1.UpdateOptions) (*v1beta1.Issuer, error)
UpdateStatus(ctx context.Context, issuer *v1beta1.Issuer, opts v1.UpdateOptions) (*v1beta1.Issuer, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Issuer, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.IssuerList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Issuer, err error)
IssuerExpansion
}
// issuers implements IssuerInterface
type issuers struct {
client rest.Interface
ns string
}
// newIssuers returns a Issuers
func newIssuers(c *CertmanagerV1beta1Client, namespace string) *issuers {
return &issuers{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the issuer, and returns the corresponding issuer object, and an error if there is any.
func (c *issuers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Issuer, err error) {
result = &v1beta1.Issuer{}
err = c.client.Get().
Namespace(c.ns).
Resource("issuers").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Issuers that match those selectors.
func (c *issuers) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.IssuerList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1beta1.IssuerList{}
err = c.client.Get().
Namespace(c.ns).
Resource("issuers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested issuers.
func (c *issuers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("issuers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a issuer and creates it. Returns the server's representation of the issuer, and an error, if there is any.
func (c *issuers) Create(ctx context.Context, issuer *v1beta1.Issuer, opts v1.CreateOptions) (result *v1beta1.Issuer, err error) {
result = &v1beta1.Issuer{}
err = c.client.Post().
Namespace(c.ns).
Resource("issuers").
VersionedParams(&opts, scheme.ParameterCodec).
Body(issuer).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a issuer and updates it. Returns the server's representation of the issuer, and an error, if there is any.
func (c *issuers) Update(ctx context.Context, issuer *v1beta1.Issuer, opts v1.UpdateOptions) (result *v1beta1.Issuer, err error) {
result = &v1beta1.Issuer{}
err = c.client.Put().
Namespace(c.ns).
Resource("issuers").
Name(issuer.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(issuer).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *issuers) UpdateStatus(ctx context.Context, issuer *v1beta1.Issuer, opts v1.UpdateOptions) (result *v1beta1.Issuer, err error) {
result = &v1beta1.Issuer{}
err = c.client.Put().
Namespace(c.ns).
Resource("issuers").
Name(issuer.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(issuer).
Do(ctx).
Into(result)
return
}
// Delete takes name of the issuer and deletes it. Returns an error if one occurs.
func (c *issuers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("issuers").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *issuers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("issuers").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched issuer.
func (c *issuers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Issuer, err error) {
result = &v1beta1.Issuer{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("issuers").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
@@ -10,13 +10,7 @@ go_library(
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/acme/v1:go_default_library",
"//pkg/apis/acme/v1alpha2:go_default_library",
"//pkg/apis/acme/v1alpha3:go_default_library",
"//pkg/apis/acme/v1beta1:go_default_library",
"//pkg/apis/certmanager/v1:go_default_library",
"//pkg/apis/certmanager/v1alpha2:go_default_library",
"//pkg/apis/certmanager/v1alpha3:go_default_library",
"//pkg/apis/certmanager/v1beta1:go_default_library",
"//pkg/client/clientset/versioned:go_default_library",
"//pkg/client/informers/externalversions/acme:go_default_library",
"//pkg/client/informers/externalversions/certmanager:go_default_library",
@@ -7,9 +7,6 @@ go_library(
visibility = ["//visibility:public"],
deps = [
"//pkg/client/informers/externalversions/acme/v1:go_default_library",
"//pkg/client/informers/externalversions/acme/v1alpha2:go_default_library",
"//pkg/client/informers/externalversions/acme/v1alpha3:go_default_library",
"//pkg/client/informers/externalversions/acme/v1beta1:go_default_library",
"//pkg/client/informers/externalversions/internalinterfaces:go_default_library",
],
)
@@ -26,9 +23,6 @@ filegroup(
srcs = [
":package-srcs",
"//pkg/client/informers/externalversions/acme/v1:all-srcs",
"//pkg/client/informers/externalversions/acme/v1alpha2:all-srcs",
"//pkg/client/informers/externalversions/acme/v1alpha3:all-srcs",
"//pkg/client/informers/externalversions/acme/v1beta1:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
@@ -20,20 +20,11 @@ package acme
import (
v1 "github.com/jetstack/cert-manager/pkg/client/informers/externalversions/acme/v1"
v1alpha2 "github.com/jetstack/cert-manager/pkg/client/informers/externalversions/acme/v1alpha2"
v1alpha3 "github.com/jetstack/cert-manager/pkg/client/informers/externalversions/acme/v1alpha3"
v1beta1 "github.com/jetstack/cert-manager/pkg/client/informers/externalversions/acme/v1beta1"
internalinterfaces "github.com/jetstack/cert-manager/pkg/client/informers/externalversions/internalinterfaces"
)
// Interface provides access to each of this group's versions.
type Interface interface {
// V1alpha2 provides access to shared informers for resources in V1alpha2.
V1alpha2() v1alpha2.Interface
// V1alpha3 provides access to shared informers for resources in V1alpha3.
V1alpha3() v1alpha3.Interface
// V1beta1 provides access to shared informers for resources in V1beta1.
V1beta1() v1beta1.Interface
// V1 provides access to shared informers for resources in V1.
V1() v1.Interface
}
@@ -49,21 +40,6 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// V1alpha2 returns a new v1alpha2.Interface.
func (g *group) V1alpha2() v1alpha2.Interface {
return v1alpha2.New(g.factory, g.namespace, g.tweakListOptions)
}
// V1alpha3 returns a new v1alpha3.Interface.
func (g *group) V1alpha3() v1alpha3.Interface {
return v1alpha3.New(g.factory, g.namespace, g.tweakListOptions)
}
// V1beta1 returns a new v1beta1.Interface.
func (g *group) V1beta1() v1beta1.Interface {
return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
}
// V1 returns a new v1.Interface.
func (g *group) V1() v1.Interface {
return v1.New(g.factory, g.namespace, g.tweakListOptions)
@@ -1,36 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"challenge.go",
"interface.go",
"order.go",
],
importpath = "github.com/jetstack/cert-manager/pkg/client/informers/externalversions/acme/v1alpha2",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/acme/v1alpha2:go_default_library",
"//pkg/client/clientset/versioned:go_default_library",
"//pkg/client/informers/externalversions/internalinterfaces:go_default_library",
"//pkg/client/listers/acme/v1alpha2:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/runtime:go_default_library",
"@io_k8s_apimachinery//pkg/watch:go_default_library",
"@io_k8s_client_go//tools/cache:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
@@ -1,90 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha2
import (
"context"
time "time"
acmev1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
versioned "github.com/jetstack/cert-manager/pkg/client/clientset/versioned"
internalinterfaces "github.com/jetstack/cert-manager/pkg/client/informers/externalversions/internalinterfaces"
v1alpha2 "github.com/jetstack/cert-manager/pkg/client/listers/acme/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
)
// ChallengeInformer provides access to a shared informer and lister for
// Challenges.
type ChallengeInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha2.ChallengeLister
}
type challengeInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewChallengeInformer constructs a new informer for Challenge type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewChallengeInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredChallengeInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredChallengeInformer constructs a new informer for Challenge type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredChallengeInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.AcmeV1alpha2().Challenges(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.AcmeV1alpha2().Challenges(namespace).Watch(context.TODO(), options)
},
},
&acmev1alpha2.Challenge{},
resyncPeriod,
indexers,
)
}
func (f *challengeInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredChallengeInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *challengeInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&acmev1alpha2.Challenge{}, f.defaultInformer)
}
func (f *challengeInformer) Lister() v1alpha2.ChallengeLister {
return v1alpha2.NewChallengeLister(f.Informer().GetIndexer())
}
@@ -1,52 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha2
import (
internalinterfaces "github.com/jetstack/cert-manager/pkg/client/informers/externalversions/internalinterfaces"
)
// Interface provides access to all the informers in this group version.
type Interface interface {
// Challenges returns a ChallengeInformer.
Challenges() ChallengeInformer
// Orders returns a OrderInformer.
Orders() OrderInformer
}
type version struct {
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// Challenges returns a ChallengeInformer.
func (v *version) Challenges() ChallengeInformer {
return &challengeInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// Orders returns a OrderInformer.
func (v *version) Orders() OrderInformer {
return &orderInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
@@ -1,90 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha2
import (
"context"
time "time"
acmev1alpha2 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha2"
versioned "github.com/jetstack/cert-manager/pkg/client/clientset/versioned"
internalinterfaces "github.com/jetstack/cert-manager/pkg/client/informers/externalversions/internalinterfaces"
v1alpha2 "github.com/jetstack/cert-manager/pkg/client/listers/acme/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
)
// OrderInformer provides access to a shared informer and lister for
// Orders.
type OrderInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha2.OrderLister
}
type orderInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewOrderInformer constructs a new informer for Order type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewOrderInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredOrderInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredOrderInformer constructs a new informer for Order type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredOrderInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.AcmeV1alpha2().Orders(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.AcmeV1alpha2().Orders(namespace).Watch(context.TODO(), options)
},
},
&acmev1alpha2.Order{},
resyncPeriod,
indexers,
)
}
func (f *orderInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredOrderInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *orderInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&acmev1alpha2.Order{}, f.defaultInformer)
}
func (f *orderInformer) Lister() v1alpha2.OrderLister {
return v1alpha2.NewOrderLister(f.Informer().GetIndexer())
}
@@ -1,36 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"challenge.go",
"interface.go",
"order.go",
],
importpath = "github.com/jetstack/cert-manager/pkg/client/informers/externalversions/acme/v1alpha3",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/acme/v1alpha3:go_default_library",
"//pkg/client/clientset/versioned:go_default_library",
"//pkg/client/informers/externalversions/internalinterfaces:go_default_library",
"//pkg/client/listers/acme/v1alpha3:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/runtime:go_default_library",
"@io_k8s_apimachinery//pkg/watch:go_default_library",
"@io_k8s_client_go//tools/cache:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
@@ -1,90 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha3
import (
"context"
time "time"
acmev1alpha3 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha3"
versioned "github.com/jetstack/cert-manager/pkg/client/clientset/versioned"
internalinterfaces "github.com/jetstack/cert-manager/pkg/client/informers/externalversions/internalinterfaces"
v1alpha3 "github.com/jetstack/cert-manager/pkg/client/listers/acme/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
)
// ChallengeInformer provides access to a shared informer and lister for
// Challenges.
type ChallengeInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha3.ChallengeLister
}
type challengeInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewChallengeInformer constructs a new informer for Challenge type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewChallengeInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredChallengeInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredChallengeInformer constructs a new informer for Challenge type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredChallengeInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.AcmeV1alpha3().Challenges(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.AcmeV1alpha3().Challenges(namespace).Watch(context.TODO(), options)
},
},
&acmev1alpha3.Challenge{},
resyncPeriod,
indexers,
)
}
func (f *challengeInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredChallengeInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *challengeInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&acmev1alpha3.Challenge{}, f.defaultInformer)
}
func (f *challengeInformer) Lister() v1alpha3.ChallengeLister {
return v1alpha3.NewChallengeLister(f.Informer().GetIndexer())
}
@@ -1,52 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha3
import (
internalinterfaces "github.com/jetstack/cert-manager/pkg/client/informers/externalversions/internalinterfaces"
)
// Interface provides access to all the informers in this group version.
type Interface interface {
// Challenges returns a ChallengeInformer.
Challenges() ChallengeInformer
// Orders returns a OrderInformer.
Orders() OrderInformer
}
type version struct {
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// Challenges returns a ChallengeInformer.
func (v *version) Challenges() ChallengeInformer {
return &challengeInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// Orders returns a OrderInformer.
func (v *version) Orders() OrderInformer {
return &orderInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
@@ -1,90 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha3
import (
"context"
time "time"
acmev1alpha3 "github.com/jetstack/cert-manager/pkg/apis/acme/v1alpha3"
versioned "github.com/jetstack/cert-manager/pkg/client/clientset/versioned"
internalinterfaces "github.com/jetstack/cert-manager/pkg/client/informers/externalversions/internalinterfaces"
v1alpha3 "github.com/jetstack/cert-manager/pkg/client/listers/acme/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
)
// OrderInformer provides access to a shared informer and lister for
// Orders.
type OrderInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha3.OrderLister
}
type orderInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewOrderInformer constructs a new informer for Order type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewOrderInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredOrderInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredOrderInformer constructs a new informer for Order type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredOrderInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.AcmeV1alpha3().Orders(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.AcmeV1alpha3().Orders(namespace).Watch(context.TODO(), options)
},
},
&acmev1alpha3.Order{},
resyncPeriod,
indexers,
)
}
func (f *orderInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredOrderInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *orderInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&acmev1alpha3.Order{}, f.defaultInformer)
}
func (f *orderInformer) Lister() v1alpha3.OrderLister {
return v1alpha3.NewOrderLister(f.Informer().GetIndexer())
}
@@ -1,36 +0,0 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"challenge.go",
"interface.go",
"order.go",
],
importpath = "github.com/jetstack/cert-manager/pkg/client/informers/externalversions/acme/v1beta1",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/acme/v1beta1:go_default_library",
"//pkg/client/clientset/versioned:go_default_library",
"//pkg/client/informers/externalversions/internalinterfaces:go_default_library",
"//pkg/client/listers/acme/v1beta1:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_apimachinery//pkg/runtime:go_default_library",
"@io_k8s_apimachinery//pkg/watch:go_default_library",
"@io_k8s_client_go//tools/cache:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
@@ -1,90 +0,0 @@
/*
Copyright The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by informer-gen. DO NOT EDIT.
package v1beta1
import (
"context"
time "time"
acmev1beta1 "github.com/jetstack/cert-manager/pkg/apis/acme/v1beta1"
versioned "github.com/jetstack/cert-manager/pkg/client/clientset/versioned"
internalinterfaces "github.com/jetstack/cert-manager/pkg/client/informers/externalversions/internalinterfaces"
v1beta1 "github.com/jetstack/cert-manager/pkg/client/listers/acme/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
)
// ChallengeInformer provides access to a shared informer and lister for
// Challenges.
type ChallengeInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1beta1.ChallengeLister
}
type challengeInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewChallengeInformer constructs a new informer for Challenge type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewChallengeInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredChallengeInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredChallengeInformer constructs a new informer for Challenge type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredChallengeInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.AcmeV1beta1().Challenges(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.AcmeV1beta1().Challenges(namespace).Watch(context.TODO(), options)
},
},
&acmev1beta1.Challenge{},
resyncPeriod,
indexers,
)
}
func (f *challengeInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredChallengeInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *challengeInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&acmev1beta1.Challenge{}, f.defaultInformer)
}
func (f *challengeInformer) Lister() v1beta1.ChallengeLister {
return v1beta1.NewChallengeLister(f.Informer().GetIndexer())
}

Some files were not shown because too many files have changed in this diff Show More