edit

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2019 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindKeyId

func FindKeyId(manifestPath string) (string, error)

Types

type KeysLocation

type KeysLocation struct {
	TextLocation
	Key string
}

type Manifest

type Manifest []*Object

func NewManifest

func NewManifest(in io.Reader) (Manifest, error)

func (Manifest) CorrelateWith

func (m Manifest) CorrelateWith(origManifest Manifest) error

func (Manifest) Decrypt

func (m Manifest) Decrypt(kmsService kmsiface.KMSAPI) error

func (Manifest) Encrypt

func (m Manifest) Encrypt(kmsService kmsiface.KMSAPI, defaultKeyId string, forceKeyId bool) error

func (Manifest) Serialize

func (m Manifest) Serialize(out io.Writer) error

type Object

type Object struct {
	// The original text as parsed by NewYAMLOrJSONDecoder.
	Raw []byte
	// The original object as decoded by UniversalDeserializer.
	Object runtime.Object
	Meta   metav1.Object

	// Tracking for the various stages of encryption and decryption.
	OrigEnc  *secretsv1beta1.EncryptedSecret
	OrigDec  *hacksecretsv1beta1.DecryptedSecret
	AfterDec *hacksecretsv1beta1.DecryptedSecret
	AfterEnc *secretsv1beta1.EncryptedSecret
	Kind     string
	Data     map[string]string

	// The KMS KeyId used for this object, if known. If nil, it might be a new
	// object.
	KeyId string

	// Byte coordinates for areas of the raw text we need to edit when re-serializing.
	KindLoc TextLocation
	DataLoc TextLocation
	KeyLocs []KeysLocation
}

func NewObject

func NewObject(raw []byte) (*Object, error)

func (*Object) Decrypt

func (o *Object) Decrypt(kmsService kmsiface.KMSAPI) error

func (*Object) Encrypt

func (o *Object) Encrypt(kmsService kmsiface.KMSAPI, defaultKeyId string, forceKeyId bool) error

func (*Object) Serialize

func (o *Object) Serialize(out io.Writer) error

type TextLocation

type TextLocation struct {
	Start int
	End   int
}

Jump to

Keyboard shortcuts

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