Documentation ¶
Overview ¶
package gen implements helper functions to construct API resource test fixtures.
Index ¶
- Constants
- func Certificate(name string, mods ...CertificateModifier) *v1alpha1.Certificate
- func CertificateFrom(crt *v1alpha1.Certificate, mods ...CertificateModifier) *v1alpha1.Certificate
- func Challenge(name string, mods ...ChallengeModifier) *v1alpha1.Challenge
- func ChallengeFrom(ch *v1alpha1.Challenge, mods ...ChallengeModifier) *v1alpha1.Challenge
- func ClusterIssuer(name string, mods ...IssuerModifier) *v1alpha1.ClusterIssuer
- func ClusterIssuerFrom(iss *v1alpha1.ClusterIssuer, mods ...IssuerModifier) *v1alpha1.ClusterIssuer
- func Issuer(name string, mods ...IssuerModifier) *v1alpha1.Issuer
- func IssuerFrom(iss *v1alpha1.Issuer, mods ...IssuerModifier) *v1alpha1.Issuer
- func ObjectMeta(name string, mods ...ObjectMetaModifier) metav1.ObjectMeta
- type CertificateModifier
- func SetCertificateCommonName(commonName string) CertificateModifier
- func SetCertificateDNSNames(dnsNames ...string) CertificateModifier
- func SetCertificateIsCA(isCA bool) CertificateModifier
- func SetCertificateIssuer(o v1alpha1.ObjectReference) CertificateModifier
- func SetCertificateKeyAlgorithm(keyAlgorithm v1alpha1.KeyAlgorithm) CertificateModifier
- func SetCertificateKeySize(keySize int) CertificateModifier
- func SetCertificateLastFailureTime(p metav1.Time) CertificateModifier
- func SetCertificateNotAfter(p metav1.Time) CertificateModifier
- func SetCertificateOrganization(orgs ...string) CertificateModifier
- func SetCertificateSecretName(secretName string) CertificateModifier
- func SetCertificateStatusCondition(c v1alpha1.CertificateCondition) CertificateModifier
- type ChallengeModifier
- func SetChallengeDNSName(dnsName string) ChallengeModifier
- func SetChallengeIssuer(o v1alpha1.ObjectReference) ChallengeModifier
- func SetChallengePresented(p bool) ChallengeModifier
- func SetChallengeProcessing(b bool) ChallengeModifier
- func SetChallengeReason(s string) ChallengeModifier
- func SetChallengeState(s v1alpha1.State) ChallengeModifier
- func SetChallengeType(t string) ChallengeModifier
- func SetChallengeURL(s string) ChallengeModifier
- func SetChallengeWildcard(p bool) ChallengeModifier
- type IssuerModifier
- type ObjectMetaModifier
Constants ¶
View Source
const ( // DefaultTestNamespace is the default namespace set on resources that // are namespaced. DefaultTestNamespace = "default-unit-test-ns" )
Variables ¶
This section is empty.
Functions ¶
func Certificate ¶
func Certificate(name string, mods ...CertificateModifier) *v1alpha1.Certificate
func CertificateFrom ¶
func CertificateFrom(crt *v1alpha1.Certificate, mods ...CertificateModifier) *v1alpha1.Certificate
func ChallengeFrom ¶
func ChallengeFrom(ch *v1alpha1.Challenge, mods ...ChallengeModifier) *v1alpha1.Challenge
func ClusterIssuer ¶ added in v0.6.0
func ClusterIssuer(name string, mods ...IssuerModifier) *v1alpha1.ClusterIssuer
func ClusterIssuerFrom ¶ added in v0.6.0
func ClusterIssuerFrom(iss *v1alpha1.ClusterIssuer, mods ...IssuerModifier) *v1alpha1.ClusterIssuer
func IssuerFrom ¶
func IssuerFrom(iss *v1alpha1.Issuer, mods ...IssuerModifier) *v1alpha1.Issuer
func ObjectMeta ¶
func ObjectMeta(name string, mods ...ObjectMetaModifier) metav1.ObjectMeta
ObjectMeta creates a new metav1.ObjectMeta with the given name, optionally applying the provided ObjectMetaModifiers. It applies a DefaultTestNamespace by default. Cluster-scoped resource generators should explicitly add `SetNamespace("")` to their constructors.
Types ¶
type CertificateModifier ¶
type CertificateModifier func(*v1alpha1.Certificate)
func SetCertificateCommonName ¶
func SetCertificateCommonName(commonName string) CertificateModifier
func SetCertificateDNSNames ¶
func SetCertificateDNSNames(dnsNames ...string) CertificateModifier
func SetCertificateIsCA ¶
func SetCertificateIsCA(isCA bool) CertificateModifier
func SetCertificateIssuer ¶
func SetCertificateIssuer(o v1alpha1.ObjectReference) CertificateModifier
SetIssuer sets the Certificate.spec.issuerRef field
func SetCertificateKeyAlgorithm ¶
func SetCertificateKeyAlgorithm(keyAlgorithm v1alpha1.KeyAlgorithm) CertificateModifier
func SetCertificateKeySize ¶
func SetCertificateKeySize(keySize int) CertificateModifier
func SetCertificateLastFailureTime ¶
func SetCertificateLastFailureTime(p metav1.Time) CertificateModifier
func SetCertificateNotAfter ¶ added in v0.7.0
func SetCertificateNotAfter(p metav1.Time) CertificateModifier
func SetCertificateOrganization ¶ added in v0.7.0
func SetCertificateOrganization(orgs ...string) CertificateModifier
func SetCertificateSecretName ¶
func SetCertificateSecretName(secretName string) CertificateModifier
func SetCertificateStatusCondition ¶ added in v0.7.0
func SetCertificateStatusCondition(c v1alpha1.CertificateCondition) CertificateModifier
type ChallengeModifier ¶
func SetChallengeDNSName ¶
func SetChallengeDNSName(dnsName string) ChallengeModifier
func SetChallengeIssuer ¶
func SetChallengeIssuer(o v1alpha1.ObjectReference) ChallengeModifier
SetIssuer sets the challenge.spec.issuerRef field
func SetChallengePresented ¶
func SetChallengePresented(p bool) ChallengeModifier
func SetChallengeProcessing ¶
func SetChallengeProcessing(b bool) ChallengeModifier
func SetChallengeReason ¶
func SetChallengeReason(s string) ChallengeModifier
func SetChallengeState ¶
func SetChallengeState(s v1alpha1.State) ChallengeModifier
func SetChallengeType ¶
func SetChallengeType(t string) ChallengeModifier
func SetChallengeURL ¶
func SetChallengeURL(s string) ChallengeModifier
func SetChallengeWildcard ¶ added in v0.6.0
func SetChallengeWildcard(p bool) ChallengeModifier
type IssuerModifier ¶
type IssuerModifier func(v1alpha1.GenericIssuer)
func AddIssuerCondition ¶
func AddIssuerCondition(c v1alpha1.IssuerCondition) IssuerModifier
func SetIssuerACME ¶
func SetIssuerACME(a v1alpha1.ACMEIssuer) IssuerModifier
func SetIssuerCA ¶
func SetIssuerCA(a v1alpha1.CAIssuer) IssuerModifier
func SetIssuerSelfSigned ¶
func SetIssuerSelfSigned(a v1alpha1.SelfSignedIssuer) IssuerModifier
type ObjectMetaModifier ¶
type ObjectMetaModifier func(*metav1.ObjectMeta)
ObjectMetaModifier applies a transformation to the provider ObjectMeta
Click to show internal directories.
Click to hide internal directories.