mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-07 10:00:15 +00:00
published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub) copied from https://github.com/kubernetes/kubernetes.git, branch master, last commit is 71ba8a90f0a4f3a307cffeb8f8566d13277cb135
This commit is contained in:
@@ -24,13 +24,13 @@ import (
|
||||
)
|
||||
|
||||
type CertificatesInterface interface {
|
||||
GetRESTClient() *rest.RESTClient
|
||||
RESTClient() rest.Interface
|
||||
CertificateSigningRequestsGetter
|
||||
}
|
||||
|
||||
// CertificatesClient is used to interact with features provided by the Certificates group.
|
||||
type CertificatesClient struct {
|
||||
*rest.RESTClient
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *CertificatesClient) CertificateSigningRequests() CertificateSigningRequestInterface {
|
||||
@@ -61,7 +61,7 @@ func NewForConfigOrDie(c *rest.Config) *CertificatesClient {
|
||||
}
|
||||
|
||||
// New creates a new CertificatesClient for the given RESTClient.
|
||||
func New(c *rest.RESTClient) *CertificatesClient {
|
||||
func New(c rest.Interface) *CertificatesClient {
|
||||
return &CertificatesClient{c}
|
||||
}
|
||||
|
||||
@@ -86,11 +86,11 @@ func setConfigDefaults(config *rest.Config) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetRESTClient returns a RESTClient that is used to communicate
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *CertificatesClient) GetRESTClient() *rest.RESTClient {
|
||||
func (c *CertificatesClient) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.RESTClient
|
||||
return c.restClient
|
||||
}
|
||||
|
@@ -21,6 +21,7 @@ import (
|
||||
v1 "k8s.io/client-go/pkg/api/v1"
|
||||
v1alpha1 "k8s.io/client-go/pkg/apis/certificates/v1alpha1"
|
||||
watch "k8s.io/client-go/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// CertificateSigningRequestsGetter has a method to return a CertificateSigningRequestInterface.
|
||||
@@ -45,13 +46,13 @@ type CertificateSigningRequestInterface interface {
|
||||
|
||||
// certificateSigningRequests implements CertificateSigningRequestInterface
|
||||
type certificateSigningRequests struct {
|
||||
client *CertificatesClient
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newCertificateSigningRequests returns a CertificateSigningRequests
|
||||
func newCertificateSigningRequests(c *CertificatesClient) *certificateSigningRequests {
|
||||
return &certificateSigningRequests{
|
||||
client: c,
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -30,8 +30,9 @@ func (c *FakeCertificates) CertificateSigningRequests() v1alpha1.CertificateSign
|
||||
return &FakeCertificateSigningRequests{c}
|
||||
}
|
||||
|
||||
// GetRESTClient returns a RESTClient that is used to communicate
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeCertificates) GetRESTClient() *rest.RESTClient {
|
||||
return nil
|
||||
func (c *FakeCertificates) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
||||
|
Reference in New Issue
Block a user