Documentation ¶
Index ¶
- type ClientInterface
- type E2eTestClient
- func (cl *E2eTestClient) CleanupKubernetesNamespace(namespace string) error
- func (cl *E2eTestClient) CleanupKubernetesSecrets(namespace string) error
- func (cl *E2eTestClient) CreateKubernetesSecret(namespace, id string) error
- func (cl *E2eTestClient) DeleteSecretManagerSecret(project, id string) error
- type Fixture
- type MockClient
- func (cl *MockClient) CleanupKubernetesNamespace(namespace string) error
- func (cl *MockClient) CleanupKubernetesSecrets(namespace string) error
- func (cl *MockClient) CreateKubernetesNamespace(namespace string) error
- func (cl *MockClient) CreateKubernetesSecret(namespace, id string) error
- func (cl *MockClient) DeleteSecretManagerSecret(project, id string) error
- func (cl *MockClient) GetKubernetesSecretValue(namespace, id, key string) ([]byte, error)
- func (cl *MockClient) GetSecretManagerSecretValue(project, id string) ([]byte, error)
- func (cl *MockClient) UpsertKubernetesSecret(namespace, id, key string, data []byte) error
- func (cl *MockClient) UpsertSecretManagerSecret(project, id string, data []byte) error
- func (cl *MockClient) ValidateKubernetesNamespace(namespace string) error
- func (cl *MockClient) ValidateKubernetesSecret(namespace, id string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientInterface ¶
type E2eTestClient ¶
func (*E2eTestClient) CleanupKubernetesNamespace ¶
func (cl *E2eTestClient) CleanupKubernetesNamespace(namespace string) error
CleanupKubernetesNamespace deletes the given namespace in the cluster. Returns nil if succeeded, otherwise error.
func (*E2eTestClient) CleanupKubernetesSecrets ¶
func (cl *E2eTestClient) CleanupKubernetesSecrets(namespace string) error
CleanupKubernetesSecrets deletes all secrets expect for default-token-* under the given namespace in the cluster. Returns nil if succeeded, otherwise error.
func (*E2eTestClient) CreateKubernetesSecret ¶
func (cl *E2eTestClient) CreateKubernetesSecret(namespace, id string) error
CreateKubernetesSecret creates an empty K8s secret under namespace. Returns nil if successful, error otherwise
func (*E2eTestClient) DeleteSecretManagerSecret ¶
func (cl *E2eTestClient) DeleteSecretManagerSecret(project, id string) error
DeleteSecretManagerSecret deletes the secret in the given project. Returns nil if succeeded, otherwise error.
type Fixture ¶
type Fixture struct { // map of namespace to secret to key to value Kubernetes map[string]map[string]map[string]string // map of project to secret to value SecretManager map[string]map[string]string }
func NewFixture ¶
func (Fixture) Reset ¶
func (f Fixture) Reset(cl ClientInterface) error
Reset clears or re-creates the K8s secrets with the Fixture and the given client. Returns nil if successful, error otherwise
func (Fixture) Setup ¶
func (f Fixture) Setup(cl ClientInterface) error
Setup sets up the Secret Manager secrets and K8s namespaces with the Fixture and the given client. Returns nil if successful, error otherwise
func (Fixture) Teardown ¶
func (f Fixture) Teardown(cl ClientInterface) error
Teardown deletes all Secret Manager secrets and Kubernetes secrets and namespaces created by Setup(). Returns nil if successful, error otherwise
type MockClient ¶
type MockClient struct { K8sSecret map[string]map[string]map[string][]byte SecretManagerSecret map[string]map[string][]byte }
func NewMockClient ¶
func NewMockClient(namespaces []string) *MockClient
func (*MockClient) CleanupKubernetesNamespace ¶
func (cl *MockClient) CleanupKubernetesNamespace(namespace string) error
func (*MockClient) CleanupKubernetesSecrets ¶
func (cl *MockClient) CleanupKubernetesSecrets(namespace string) error
func (*MockClient) CreateKubernetesNamespace ¶
func (cl *MockClient) CreateKubernetesNamespace(namespace string) error
func (*MockClient) CreateKubernetesSecret ¶
func (cl *MockClient) CreateKubernetesSecret(namespace, id string) error
func (*MockClient) DeleteSecretManagerSecret ¶
func (cl *MockClient) DeleteSecretManagerSecret(project, id string) error
func (*MockClient) GetKubernetesSecretValue ¶
func (cl *MockClient) GetKubernetesSecretValue(namespace, id, key string) ([]byte, error)
func (*MockClient) GetSecretManagerSecretValue ¶
func (cl *MockClient) GetSecretManagerSecretValue(project, id string) ([]byte, error)
func (*MockClient) UpsertKubernetesSecret ¶
func (cl *MockClient) UpsertKubernetesSecret(namespace, id, key string, data []byte) error
func (*MockClient) UpsertSecretManagerSecret ¶
func (cl *MockClient) UpsertSecretManagerSecret(project, id string, data []byte) error
func (*MockClient) ValidateKubernetesNamespace ¶
func (cl *MockClient) ValidateKubernetesNamespace(namespace string) error
func (*MockClient) ValidateKubernetesSecret ¶
func (cl *MockClient) ValidateKubernetesSecret(namespace, id string) error