models

package
v0.0.0-...-2ae28a0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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() *SecretsClient

mock client

func NewSecretsClient

func NewSecretsClient(namespace string) (*SecretsClient, error)

NewSecretsClient constructor

func (*SecretsClient) Create

func (s *SecretsClient) Create(name string) (*v1.Secret, error)

Create a new Secret

func (*SecretsClient) CreateWithData

func (s *SecretsClient) CreateWithData(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(name string) error

Delete a secret

func (*SecretsClient) Get

func (s *SecretsClient) Get(name string) (*v1.Secret, error)

Get Secret

func (*SecretsClient) GetKey

func (s *SecretsClient) GetKey(name, key string) (string, error)

GetKey retrieves an individual keys value from a secret

func (*SecretsClient) List

func (s *SecretsClient) List() (*v1.SecretList, error)

List all Secrets

func (*SecretsClient) Update

func (s *SecretsClient) Update(secret *v1.Secret, data map[string][]byte) (*v1.Secret, error)

Update Secret keys

func (*SecretsClient) Upsert

func (s *SecretsClient) Upsert(name string, data map[string][]byte) (*v1.Secret, error)

Upsert creates a Secret if needed and updates Secret keys

Jump to

Keyboard shortcuts

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