Documentation
¶
Index ¶
- type CSR
- func (f *CSR) Approve(ctx context.Context, message string) error
- func (f *CSR) Approved() bool
- func (c *CSR) CreateOrRefresh(ctx context.Context) error
- func (f *CSR) CreatedAt() time.Time
- func (c *CSR) Delete(ctx context.Context) error
- func (f CSR) Groups() []string
- func (f *CSR) Name() string
- func (f *CSR) ParsedCertificateRequest() *x509.CertificateRequest
- func (f *CSR) RequestingUser() string
- func (f *CSR) SignerName() string
- func (f *CSR) Usages() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSR ¶
type CSR struct {
// contains filtered or unexported fields
}
CSR wraps v1 and v1beta1 for convenient read/write. The one and only reason for this type is because there are 2 versions of CertificateSigningRequest that need to be supported and always checking version is not convenient. Note for future: no business logic should be added to this wrapper.
func NewCSR ¶
func NewCSR(clientset kubernetes.Interface, csrObj interface{}) (*CSR, error)
NewCSR validates and creates new certificateRequestFacade.
func (*CSR) Approve ¶
Approve add approved condition to the CertificateRequest if it is not already approved.
func (*CSR) CreateOrRefresh ¶
CreateOrRefresh creates the CertificateSigningRequest if it does not exist. If it does exist, it refreshes internally stored CSR object.
func (*CSR) CreatedAt ¶
CreatedAt reads and returns the creation timestamp of the CertificateRequest from v1 or v1beta1.
func (*CSR) ParsedCertificateRequest ¶
func (f *CSR) ParsedCertificateRequest() *x509.CertificateRequest
ParsedCertificateRequest returns the CertificateRequest parsed from v1 or v1beta1.
func (*CSR) RequestingUser ¶
RequestingUser reads and returns the user that requested the CertificateRequest from v1 or v1beta1.
func (*CSR) SignerName ¶
SignerName reads and returns the signer name from v1 or v1beta1.