secrets

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2017 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultMode is readable only by user
	DefaultMode = "0444"
	//DefaultUID is Root
	DefaultUID = "0"
	//DefaultGID is Roots default group
	DefaultGID = "0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Decryptor

type Decryptor interface {
	Decrypt(cipherText string) ([]byte, error)
}

Decryptor handles decrypting messages

func NewRSADecryptor

func NewRSADecryptor(privateKeyPath string) (Decryptor, error)

NewRSADecryptor returns an RSA decryptor

type FlexVolume

type FlexVolume struct {
	// contains filtered or unexported fields
}

FlexVolume is a struct to implement the Rancher Volume interface

func (*FlexVolume) Attach

func (sv *FlexVolume) Attach(params map[string]interface{}) (string, error)

Attach is implemeneted as a no-op for the flexvolume API

func (*FlexVolume) Create

func (sv *FlexVolume) Create(options map[string]interface{}) (map[string]interface{}, error)

Create is implemented for Docker volume plugin API

func (*FlexVolume) Delete

func (sv *FlexVolume) Delete(options map[string]interface{}) error

Delete is implemented for Docker volume plugin API it detaches the volume and removes its content.

func (*FlexVolume) Detach

func (sv *FlexVolume) Detach(device string) error

Detach effectively erases the volume.

func (*FlexVolume) Init

func (sv *FlexVolume) Init() error

Init implements the flex volume interface and is a no-op at this time

func (*FlexVolume) Mount

func (sv *FlexVolume) Mount(dir, device string, params map[string]interface{}) error

Mount implements does a bind mount of the volume to the target directory

func (*FlexVolume) Unmount

func (sv *FlexVolume) Unmount(dir string) error

Unmount undoes the bind mount, and removes the target directory

type SecretGetter

type SecretGetter interface {
	GetSecrets(params *options) ([]secret, error)
}

SecretGetter gets the secrets froma remote source

func NewRancherSecretGetter

func NewRancherSecretGetter(params *options) (SecretGetter, error)

NewRancherSecretGetter returns a new rancherSecretGetter

type SecretWriter

type SecretWriter interface {
	Write(secrets []secret, dst string) error
}

SecretWriter implements the Writer interface

func NewRSASecretFileWriter

func NewRSASecretFileWriter(decryptor Decryptor) (SecretWriter, error)

NewRSASecretFileWriter returns a SecretWriter implemenation to talk to Rancher

Jump to

Keyboard shortcuts

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