secret

package
v1.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Masterkey = "empty"

Functions

func AppendSecrets added in v0.32.6

func AppendSecrets(prefix string, into, add map[string]*Secret)

func Read

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

func Rewrite added in v0.21.0

func Rewrite(monitor mntr.Monitor, gitClient *git.Client, newMasterKey string, desired *tree.Tree, pushFunc PushFunc) error

func Write

func Write(monitor mntr.Monitor, gitClient *git.Client, path, value string, getFunc GetFuncs, pushFunc PushFuncs) 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 internally, should be unique for the volume and volumemounts
	InternalName string `json:"internalName,omitempty" yaml:"internalName,omitempty"`
}

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 internally, should be unique for the volume and volumemounts
	InternalName string `json:"internalName,omitempty" yaml:"internalName,omitempty"`
}

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

type GetFuncs added in v0.32.6

type GetFuncs func(monitor mntr.Monitor, gitClient *git.Client) (map[string]*Secret, map[string]*tree.Tree, error)

type PushFunc added in v0.32.6

type PushFunc func(gitClient *git.Client, desired *tree.Tree) api.PushDesiredFunc

type PushFuncs added in v0.32.6

type PushFuncs func(monitor mntr.Monitor, gitClient *git.Client, trees map[string]*tree.Tree, path string) error

type Secret

type Secret struct {
	//Encryption algorithm used for the secret
	Encryption string `json:"encryption,omitempty" yaml:"encryption,omitempty"`
	//Encoding algorithm used for the secret
	Encoding string `json:"encoding,omitempty" yaml:"encoding,omitempty"`
	//Encrypted and encoded Value
	Value string `json:"value,omitempty" yaml:"value,omitempty"`
}

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

func InitIfNil added in v0.21.0

func InitIfNil(sec *Secret) *Secret

func (*Secret) IsZero added in v0.32.6

func (s *Secret) IsZero() bool

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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