Documentation ¶
Index ¶
- func MockClientConfig() clientcmd.ClientConfig
- type KeyAnnotation
- type SecretsClient
- func (s *SecretsClient) Create(ctx context.Context, name string) (*v1.Secret, error)
- func (s *SecretsClient) CreateWithData(ctx context.Context, name string, data map[string][]byte) (*v1.Secret, error)
- func (s *SecretsClient) Delete(ctx context.Context, name string) error
- func (s *SecretsClient) Get(ctx context.Context, name string) (*v1.Secret, error)
- func (s *SecretsClient) GetKey(ctx context.Context, name, key string) (string, error)
- func (s *SecretsClient) List(ctx context.Context) (*v1.SecretList, error)
- func (s *SecretsClient) Update(ctx context.Context, secret *v1.Secret, data map[string][]byte) (*v1.Secret, error)
- func (s *SecretsClient) Upsert(ctx context.Context, name string, data map[string][]byte) (*v1.Secret, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MockClientConfig ¶
func MockClientConfig() clientcmd.ClientConfig
Mock ClientConfig for context checks
Types ¶
type KeyAnnotation ¶
type KeyAnnotation struct { UpdatedBy string `json:"updatedBy"` LastUpdated string `json:"lastUpdated"` }
KeyAnnotation holds metadata about individual Secrets keys
func NewKeyAnnotation ¶
func NewKeyAnnotation(authInfo string) *KeyAnnotation
NewKeyAnnotation constructor
type SecretsClient ¶
type SecretsClient struct { Namespace string AuthInfo string // contains filtered or unexported fields }
SecretsClient is a convenience wrapper for managing k8s Secrets
func MockNewSecretsClient ¶
func MockNewSecretsClient(config clientcmd.ClientConfig, namespace string) (*SecretsClient, error)
func NewSecretsClient ¶
func NewSecretsClient(namespace string) (*SecretsClient, error)
NewSecretsClient constructor
func (*SecretsClient) CreateWithData ¶
func (s *SecretsClient) CreateWithData(ctx context.Context, name string, data map[string][]byte) (*v1.Secret, error)
CreateWithData creates a new Secret and passed in Data keys
func (*SecretsClient) Delete ¶
func (s *SecretsClient) Delete(ctx context.Context, name string) error
Delete a secret
func (*SecretsClient) List ¶
func (s *SecretsClient) List(ctx context.Context) (*v1.SecretList, error)
List all Secrets
Click to show internal directories.
Click to hide internal directories.