secret

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// TestkubeTestSecretLabel is testkube test secrets label
	TestkubeTestSecretLabel = "tests-secrets"
	// TestkubeTestSourcesSecretLabel is testkube test sources secrets label
	TestkubeTestSourcesSecretLabel = "test-sources-secrets"
)

Variables

This section is empty.

Functions

func GetMetadataName

func GetMetadataName(name, kind string) string

GetMetadataName returns secret metadata name

func NewSpec

func NewSpec(id, namespace, label string, labels, stringData map[string]string) *v1.Secret

NewSpec is a method to return secret spec

Types

type Client

type Client struct {
	client.Client
	// contains filtered or unexported fields
}

Client provide methods to manage secrets

func NewClient

func NewClient(cli client.Client, namespace, label string) *Client

NewClient is a method to create new secret client

func (*Client) Apply

func (c *Client) Apply(id string, labels, stringData map[string]string) error

Apply is a method to create new secret or update an existing secret

func (*Client) Create

func (c *Client) Create(id string, labels, stringData map[string]string) error

Create is a method to create new secret

func (*Client) Delete

func (c *Client) Delete(id string) error

Delete is a method to delete an existing secret

func (*Client) DeleteAll

func (c *Client) DeleteAll(selector string) error

DeleteAll is a method to delete all existing secrets

func (*Client) Get

func (c *Client) Get(id string) (map[string]string, error)

Get is a method to retrieve an existing secret

func (*Client) Update

func (c *Client) Update(id string, labels, stringData map[string]string) error

Update is a method to update an existing secret

Jump to

Keyboard shortcuts

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