secret

package
v1.0.15-test01 Latest Latest
Warning

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

Go to latest
Published: May 6, 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, stringData map[string]string) *corev1.SecretApplyConfiguration

NewApplySpec is a method to return secret apply spec

func NewSpec

func NewSpec(id, namespace string, 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, stringData map[string]string) error

Apply is a method to create or update a secret

func (*Client) Create

func (c *Client) Create(id string, 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() 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, 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