secret

package
v1.3.13 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMetadataName

func GetMetadataName(name string) string

GetMetadataName returns secret metadata name

func NewApplySpec added in v0.8.1

func NewApplySpec(id, namespace string, labels, stringData map[string]string) *corev1.SecretApplyConfiguration

NewApplySpec is a method to return secret apply spec

func NewSpec

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

NewSpec is a method to return secret spec

Types

type Client

type Client struct {
	ClientSet *kubernetes.Clientset
	Log       *zap.SugaredLogger
	Namespace string
}

Client provide methods to manage secrets

func NewClient

func NewClient(namespace string) (*Client, error)

NewClient is a method to create new secret client

func (*Client) Apply added in v0.8.1

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

Apply is a method to create or update a 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) List

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

List is a method to retrieve all existing secrets

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