Documentation ¶
Index ¶
- Variables
- func ContainsError(wrappedErr error, containedErr error) bool
- func Epoch() time.Time
- func ExpiresAt(d time.Duration) func(time.Time) (string, time.Time)
- func IssuedAt(d time.Duration) func(time.Time) (string, time.Time)
- func JwtToken(ts timeSupplier, m ...JwtModifier) string
- func JwtTokenWithIssuer(issuer string, ts timeSupplier, m ...JwtModifier) string
- func NewDirectory(name string, m ...DirectoryModifier) *v1alpha1.Directory
- func NewProviderConfig(name string, cisSecret string, saSecret string) *v1alpha12.ProviderConfig
- func NewSecret(name string, data map[string][]byte) *v1.Secret
- func NotBefore(d time.Duration) func(time.Time) (string, time.Time)
- func Now() time.Time
- type DirectoryModifier
- type FakeKubeClientBuilder
- func (b FakeKubeClientBuilder) AddResource(obj client.Object) FakeKubeClientBuilder
- func (b FakeKubeClientBuilder) AddResources(obj ...client.Object) FakeKubeClientBuilder
- func (b FakeKubeClientBuilder) Build() test.MockClient
- func (b FakeKubeClientBuilder) RegisterResourceConverter(resType client.Object, conv ResourceConverter) FakeKubeClientBuilder
- type JwtModifier
- type ResourceConverter
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultProviderConfigConverter = func(srcObj client.Object, destObj client.Object) { srcPC := srcObj.(*v1alpha1.ProviderConfig) destPC := destObj.(*v1alpha1.ProviderConfig) srcPC.DeepCopyInto(destPC) }
Functions ¶
func ContainsError ¶
ContainsError While testing there is no point in mimicking wrapped error hierarchies, but we do want to distinguish check whether an error is part of the stacktrace
func JwtToken ¶
func JwtToken(ts timeSupplier, m ...JwtModifier) string
func JwtTokenWithIssuer ¶
func JwtTokenWithIssuer(issuer string, ts timeSupplier, m ...JwtModifier) string
func NewDirectory ¶
func NewDirectory(name string, m ...DirectoryModifier) *v1alpha1.Directory
func NewProviderConfig ¶
func NewProviderConfig(name string, cisSecret string, saSecret string) *v1alpha12.ProviderConfig
Types ¶
type DirectoryModifier ¶
this pattern can be potentially auto generated, its quite useful to write expressive unittests
func WithConditions ¶
func WithConditions(c ...xpv1.Condition) DirectoryModifier
func WithData ¶
func WithData(data v1alpha1.DirectoryParameters) DirectoryModifier
func WithExternalName ¶
func WithExternalName(externalName string) DirectoryModifier
func WithStatus ¶
func WithStatus(status v1alpha1.DirectoryObservation) DirectoryModifier
type FakeKubeClientBuilder ¶
type FakeKubeClientBuilder struct {
// contains filtered or unexported fields
}
FakeKubeClientBuilder simply implementation of a kubeclient mock, can be configured to store and return any resource
func NewFakeKubeClientBuilder ¶
func NewFakeKubeClientBuilder() FakeKubeClientBuilder
func (FakeKubeClientBuilder) AddResource ¶
func (b FakeKubeClientBuilder) AddResource(obj client.Object) FakeKubeClientBuilder
func (FakeKubeClientBuilder) AddResources ¶
func (b FakeKubeClientBuilder) AddResources(obj ...client.Object) FakeKubeClientBuilder
func (FakeKubeClientBuilder) Build ¶
func (b FakeKubeClientBuilder) Build() test.MockClient
func (FakeKubeClientBuilder) RegisterResourceConverter ¶
func (b FakeKubeClientBuilder) RegisterResourceConverter(resType client.Object, conv ResourceConverter) FakeKubeClientBuilder
RegisterResourceConverter to be able to read resources resource converters needs to be registered for the type the helper already comes with default converters for secret and providerconfig
Click to show internal directories.
Click to hide internal directories.