plugin

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginV1

type PluginV1 struct {
	*vault.Client
}

PluginV1 a kms plugin wrapper.

func NewPluginV1

func NewPluginV1(vc *vault.Client) *PluginV1

NewPluginV1 returns a kms wrapper.

func (*PluginV1) Decrypt

func (p *PluginV1) Decrypt(ctx context.Context, request *pb.DecryptRequest) (*pb.DecryptResponse, error)

nolint: staticcheck

func (*PluginV1) Encrypt

func (p *PluginV1) Encrypt(ctx context.Context, request *pb.EncryptRequest) (*pb.EncryptResponse, error)

nolint: staticcheck

func (*PluginV1) Health added in v1.0.0

func (p *PluginV1) Health() error

Health sends a simple plaintext for encryption and then compares the decrypted value. nolint: staticcheck

func (*PluginV1) Register

func (p *PluginV1) Register(s *grpc.Server)

nolint: staticcheck

func (*PluginV1) Version

func (p *PluginV1) Version(ctx context.Context, request *pb.VersionRequest) (*pb.VersionResponse, error)

nolint: staticcheck

type PluginV2

type PluginV2 struct {
	*vault.Client
}

PluginV2 a kms plugin wrapper.

func NewPluginV2

func NewPluginV2(vc *vault.Client) *PluginV2

PluginV2 returns a kms wrapper.

func (*PluginV2) Decrypt

func (p *PluginV2) Decrypt(ctx context.Context, request *pb.DecryptRequest) (*pb.DecryptResponse, error)

func (*PluginV2) Encrypt

func (p *PluginV2) Encrypt(ctx context.Context, request *pb.EncryptRequest) (*pb.EncryptResponse, error)

func (*PluginV2) Health

func (p *PluginV2) Health() error

Health sends a simple plaintext for encryption and then compares the decrypted value.

func (*PluginV2) Register

func (p *PluginV2) Register(s *grpc.Server)

func (*PluginV2) Status

func (p *PluginV2) Status(ctx context.Context, _ *pb.StatusRequest) (*pb.StatusResponse, error)

Status performs a simple health check and returns ok if encryption / decryption was successful https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/#developing-a-kms-plugin-gRPC-server-notes-kms-v2

Jump to

Keyboard shortcuts

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