secret

package
v0.0.0-...-75a2d0c Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 8 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdditionalOptions

type AdditionalOptions func(builder *Builder) (*Builder, error)

AdditionalOptions additional options for Secret object.

type Builder

type Builder struct {
	// Secret definition. Used to store the secret object.
	Definition *corev1.Secret
	// Created secret object.
	Object *corev1.Secret
	// contains filtered or unexported fields
}

Builder provides struct for secret object containing connection to the cluster and the secret definitions.

func NewBuilder

func NewBuilder(apiClient *clients.Settings, name, nsname string, secretType corev1.SecretType) *Builder

NewBuilder creates a new instance of Builder.

func Pull

func Pull(apiClient *clients.Settings, name, nsname string) (*Builder, error)

Pull loads an existing secret into Builder struct.

func (*Builder) Create

func (builder *Builder) Create() (*Builder, error)

Create makes a secret in the cluster and stores the created object in struct.

func (*Builder) Delete

func (builder *Builder) Delete() error

Delete removes a secret from the cluster.

func (*Builder) Exists

func (builder *Builder) Exists() bool

Exists checks whether the given secret exists.

func (*Builder) Update

func (builder *Builder) Update() (*Builder, error)

Update modifies the existing secret in the cluster.

func (*Builder) WithAnnotations

func (builder *Builder) WithAnnotations(annotations map[string]string) *Builder

WithAnnotations defines the annotations in the secret.

func (*Builder) WithData

func (builder *Builder) WithData(data map[string][]byte) *Builder

WithData defines the data placed in the secret.

func (*Builder) WithOptions

func (builder *Builder) WithOptions(options ...AdditionalOptions) *Builder

WithOptions creates secret with generic mutation options.

func (*Builder) WithStringData

func (builder *Builder) WithStringData(data map[string]string) *Builder

WithStringData defines the stringData placed in the secret.

Jump to

Keyboard shortcuts

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