vault

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsInvalidHTTPStatus

func IsInvalidHTTPStatus(err error) bool

IsInvalidHTTPStatus asserts invalidHTTPStatusCodeError.

func IsKeyNotFound

func IsKeyNotFound(err error) bool

IsKeyNotFound asserts keyNotFoundError.

Types

type AWSAuthRole

type AWSAuthRole struct {
	BoundIAMRoleARN []string `json:"bound_iam_role_arn"`
}

type AWSAuthRoleResponse

type AWSAuthRoleResponse struct {
	Data AWSAuthRole `json:"data"`
}

type DecryptPayload

type DecryptPayload struct {
	Ciphertext string `json:"ciphertext"`
}

type DecryptResponse

type DecryptResponse struct {
	Data DecryptResponseData `json:"data"`
}

type DecryptResponseData

type DecryptResponseData struct {
	Plaintext string `json:"plaintext"`
}

type EncryptPayload

type EncryptPayload struct {
	Plaintext string `json:"plaintext"`
}

type EncryptResponse

type EncryptResponse struct {
	Data EncryptResponseData `json:"data"`
}

type EncryptResponseData

type EncryptResponseData struct {
	Ciphertext string `json:"ciphertext"`
}

type Encrypter

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

func NewEncrypter

func NewEncrypter(c *EncrypterConfig) (*Encrypter, error)

func (*Encrypter) Address

func (e *Encrypter) Address() string

func (*Encrypter) Decrypt

func (e *Encrypter) Decrypt(key, ciphertext string) (string, error)

func (*Encrypter) Encrypt

func (e *Encrypter) Encrypt(ctx context.Context, key, plaintext string) (string, error)

func (*Encrypter) EncryptionKey

func (e *Encrypter) EncryptionKey(ctx context.Context, customObject v1alpha1.Cluster) (string, error)

func (*Encrypter) EnsureCreatedAuthorizedIAMRoles

func (e *Encrypter) EnsureCreatedAuthorizedIAMRoles(ctx context.Context, customObject v1alpha1.Cluster) error

func (*Encrypter) EnsureCreatedEncryptionKey

func (e *Encrypter) EnsureCreatedEncryptionKey(ctx context.Context, customObject v1alpha1.Cluster) error

func (*Encrypter) EnsureDeletedAuthorizedIAMRoles

func (e *Encrypter) EnsureDeletedAuthorizedIAMRoles(ctx context.Context, customObject v1alpha1.Cluster) error

func (*Encrypter) EnsureDeletedEncryptionKey

func (e *Encrypter) EnsureDeletedEncryptionKey(ctx context.Context, customObject v1alpha1.Cluster) error

func (*Encrypter) IsKeyNotFound

func (e *Encrypter) IsKeyNotFound(err error) bool

type EncrypterConfig

type EncrypterConfig struct {
	Logger micrologger.Logger

	Address string
}

type ErrorResponse

type ErrorResponse struct {
	Errors []string `json:"errors"`
}

type KeyConfigPayload

type KeyConfigPayload struct {
	DeletionAllowed bool `json:"deletion_allowed"`
}

type LoginAuthMetadataResponse

type LoginAuthMetadataResponse struct {
	Nonce string `json:"nonce"`
}

type LoginAuthResponse

type LoginAuthResponse struct {
	Metadata    LoginAuthMetadataResponse `json:"metadata"`
	ClientToken string                    `json:"client_token"`
}

type LoginPayload

type LoginPayload struct {
	Role  string `json:"role"`
	PKCS7 string `json:"pkcs7"`
	Nonce string `json:"nonce,omitempty"`
}

type LoginResponse

type LoginResponse struct {
	Auth LoginAuthResponse `json:"auth"`
}

Jump to

Keyboard shortcuts

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