secret

package
v0.21.8 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JoinPath

func JoinPath(base string, append ...string) string

func Parse

func Parse(gitClient *git.Client, files ...string) (trees []*tree.Tree, err error)

func Read

func Read(monitor mntr.Monitor, gitClient *git.Client, secretFunc GetFunc, path string) (string, error)

func Rewrite added in v0.21.0

func Rewrite(monitor mntr.Monitor, gitClient *git.Client, secretFunc GetFunc, operator string) error

func Write

func Write(monitor mntr.Monitor, gitClient *git.Client, secretFunc GetFunc, path, value string) error

Types

type Existing

type Existing struct {
	//Name of the Secret
	Name string `json:"name" yaml:"name"`
	//Key in the secret from where the value should be used
	Key string `json:"key" yaml:"key"`
	//Name which should be used internal, should be unique for the volume and volumemounts
	InternalName string `json:"internalName" yaml:"internalName"`
}

Existing: Used secret that has to be already existing in the cluster

type ExistingIDSecret

type ExistingIDSecret struct {
	//Name of the Secret
	Name string `json:"name" yaml:"name"`
	//Key in the secret which contains the ID
	IDKey string `json:"idKey" yaml:"idKey"`
	//Key in the secret which contains the secret
	SecretKey string `json:"secretKey" yaml:"secretKey"`
	//Name which should be used internal, should be unique for the volume and volumemounts
	InternalName string `json:"internalName" yaml:"internalName"`
}

Existing: Used secret that has to be already existing in the cluster and should contain id/username and secret/password

type Func

type Func func(monitor mntr.Monitor, desiredTree *tree.Tree) (secrets map[string]*Secret, err error)

type GetFunc

type GetFunc func(operator string) Func

type Secret

type Secret struct {
	//Used encryption for the secret
	Encryption string
	//Used encoding for the secret
	Encoding string
	//Value after encryption and encoding
	Value     string
	Masterkey string `yaml:"-"`
}

Secret: Secret handled with orbctl so no manual changes are required

func ClearEmpty

func ClearEmpty(secret *Secret) *Secret

func InitIfNil added in v0.21.0

func InitIfNil(sec *Secret, masterkey string) *Secret

func (*Secret) MarshalYAML

func (s *Secret) MarshalYAML() (interface{}, error)

func (*Secret) Unmarshal added in v0.21.0

func (s *Secret) Unmarshal(masterkey string) error

func (*Secret) UnmarshalYAML

func (s *Secret) UnmarshalYAML(node *yaml.Node) error

func (*Secret) UnmarshalYAMLWithExisting added in v0.21.0

func (s *Secret) UnmarshalYAMLWithExisting(node *yaml.Node, existing *Existing) error

Jump to

Keyboard shortcuts

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