Help us shape the future of Go! Take the 2026 Go Developer Survey

certificate

package
v2.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdStatusCert

func NewCmdStatusCert(setupCtx context.Context, ioStreams genericclioptions.IOStreams) *cobra.Command

NewCmdStatusCert returns a cobra command for status certificate

Types

type CRStatus

type CRStatus struct {
	// If Error is not nil, there was a problem getting the status of the CertificateRequest resource,
	// so the rest of the fields is unusable
	Error error
	// Name of the CertificateRequest resource
	Name string
	// Namespace of the CertificateRequest resource
	Namespace string
	// Conditions of CertificateRequest resource
	Conditions []cmapi.CertificateRequestCondition
	// Events of CertificateRequest resource
	Events *v1.EventList
}

func (*CRStatus) String

func (crStatus *CRStatus) String() string

String returns the information about the status of a CR as a string to be printed as output

type CertificateStatus

type CertificateStatus struct {
	// Name of the Certificate resource
	Name string
	// Namespace of the Certificate resource
	Namespace string
	// Creation Time of Certificate resource
	CreationTime metav1.Time
	// Conditions of Certificate resource
	Conditions []cmapi.CertificateCondition
	// DNS Names of Certificate resource
	DNSNames []string
	// Events of Certificate resource
	Events *v1.EventList
	// Not Before of Certificate resource
	NotBefore *metav1.Time
	// Not After of Certificate resource
	NotAfter *metav1.Time
	// Renewal Time of Certificate resource
	RenewalTime *metav1.Time

	IssuerStatus *IssuerStatus

	SecretStatus *SecretStatus

	CRStatus *CRStatus

	OrderStatus *OrderStatus

	ChallengeStatusList *ChallengeStatusList
}

func StatusFromResources

func StatusFromResources(data *Data) *CertificateStatus

StatusFromResources takes in a Data struct and returns a CertificateStatus built using the information in data.

func (*CertificateStatus) String

func (status *CertificateStatus) String() string

type ChallengeStatus

type ChallengeStatus struct {
	Name       string
	Type       cmacme.ACMEChallengeType
	Token      string
	Key        string
	State      cmacme.State
	Reason     string
	Processing bool
	Presented  bool
}

func (*ChallengeStatus) String

func (challengeStatus *ChallengeStatus) String() string

type ChallengeStatusList

type ChallengeStatusList struct {
	// If Error is not nil, there was a problem getting the status of the Order resource,
	// so the rest of the fields is unusable
	Error             error
	ChallengeStatuses []*ChallengeStatus
}

func (*ChallengeStatusList) String

func (c *ChallengeStatusList) String() string

type Data

type Data struct {
	Certificate  *cmapi.Certificate
	CrtEvents    *corev1.EventList
	Issuer       cmapi.GenericIssuer
	IssuerKind   string
	IssuerError  error
	IssuerEvents *corev1.EventList
	Secret       *corev1.Secret
	SecretError  error
	SecretEvents *corev1.EventList
	Req          *cmapi.CertificateRequest
	ReqError     error
	ReqEvents    *corev1.EventList
	Order        *cmacme.Order
	OrderError   error
	Challenges   []*cmacme.Challenge
	ChallengeErr error
}

Data is a struct containing the information to build a CertificateStatus

type IssuerStatus

type IssuerStatus struct {
	// If Error is not nil, there was a problem getting the status of the Issuer/ClusterIssuer resource,
	// so the rest of the fields is unusable
	Error error
	// Name of the Issuer/ClusterIssuer resource
	Name string
	// Kind of the resource, can be Issuer or ClusterIssuer
	Kind string
	// Conditions of Issuer/ClusterIssuer resource
	Conditions []cmapi.IssuerCondition
	// Events of Issuer/ClusterIssuer resource
	Events *v1.EventList
}

func (*IssuerStatus) String

func (issuerStatus *IssuerStatus) String() string

String returns the information about the status of a Issuer/ClusterIssuer as a string to be printed as output

type Options

type Options struct {
	genericclioptions.IOStreams
	*factory.Factory
}

Options is a struct to support status certificate command

func NewOptions

func NewOptions(ioStreams genericclioptions.IOStreams) *Options

NewOptions returns initialized Options

func (*Options) GetResources

func (o *Options) GetResources(ctx context.Context, crtName string) (*Data, error)

GetResources collects all related resources of the Certificate and any errors while doing so in a Data struct and returns it. Returns error if error occurs when finding Certificate resource or while preparing to find other resources, e.g. when creating clientSet

func (*Options) Run

func (o *Options) Run(ctx context.Context, args []string) error

Run executes status certificate command

func (*Options) Validate

func (o *Options) Validate(args []string) error

Validate validates the provided options

type OrderStatus

type OrderStatus struct {
	// If Error is not nil, there was a problem getting the status of the Order resource,
	// so the rest of the fields is unusable
	Error error
	// Name of the Order resource
	Name string
	// State of Order resource
	State cmacme.State
	// Reason why the Order resource is in its State
	Reason string
	// What authorizations must be completed to validate the DNS names specified on the Order
	Authorizations []cmacme.ACMEAuthorization
	// Time the Order failed
	FailureTime *metav1.Time
}

func (*OrderStatus) String

func (orderStatus *OrderStatus) String() string

String returns the information about the status of a CR as a string to be printed as output

type SecretStatus

type SecretStatus struct {
	// If Error is not nil, there was a problem getting the status of the Secret resource,
	// so the rest of the fields is unusable
	Error error
	// Name of the Secret resource
	Name string
	// Issuer Countries of the x509 certificate in the Secret
	IssuerCountry []string
	// Issuer Organisations of the x509 certificate in the Secret
	IssuerOrganisation []string
	// Issuer Common Name of the x509 certificate in the Secret
	IssuerCommonName string
	// Key Usage of the x509 certificate in the Secret
	KeyUsage x509.KeyUsage
	// Extended Key Usage of the x509 certificate in the Secret
	ExtKeyUsage []x509.ExtKeyUsage
	// Public Key Algorithm of the x509 certificate in the Secret
	PublicKeyAlgorithm x509.PublicKeyAlgorithm
	// Signature Algorithm of the x509 certificate in the Secret
	SignatureAlgorithm x509.SignatureAlgorithm
	// Subject Key Id of the x509 certificate in the Secret
	SubjectKeyId []byte
	// Authority Key Id of the x509 certificate in the Secret
	AuthorityKeyId []byte
	// Serial Number of the x509 certificate in the Secret
	SerialNumber *big.Int
	// Events of Secret resource
	Events *v1.EventList
}

func (*SecretStatus) String

func (secretStatus *SecretStatus) String() string

String returns the information about the status of a Secret as a string to be printed as output

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL