Documentation ¶
Index ¶
- func WaitForBase64PluginToBeUpdated(plugin *Base64Plugin) error
- type Base64Plugin
- func (s *Base64Plugin) CleanUp()
- func (s *Base64Plugin) Decrypt(ctx context.Context, request *kmsapi.DecryptRequest) (*kmsapi.DecryptResponse, error)
- func (s *Base64Plugin) Encrypt(ctx context.Context, request *kmsapi.EncryptRequest) (*kmsapi.EncryptResponse, error)
- func (s *Base64Plugin) EnterFailedState()
- func (s *Base64Plugin) ExitFailedState()
- func (s *Base64Plugin) LastEncryptRequest() []byte
- func (s *Base64Plugin) SetVersion(ver string)
- func (s *Base64Plugin) Status(ctx context.Context, request *kmsapi.StatusRequest) (*kmsapi.StatusResponse, error)
- func (s *Base64Plugin) UpdateKeyID()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WaitForBase64PluginToBeUpdated ¶
func WaitForBase64PluginToBeUpdated(plugin *Base64Plugin) error
waitForBase64PluginToBeUpdated waits until the plugin updates keyID.
Types ¶
type Base64Plugin ¶
type Base64Plugin struct {
// contains filtered or unexported fields
}
Base64Plugin gRPC sever for a mock KMS provider. Uses base64 to simulate encrypt and decrypt.
func NewBase64Plugin ¶
func NewBase64Plugin(t testing.TB, socketPath string) *Base64Plugin
NewBase64Plugin is a constructor for Base64Plugin.
func (*Base64Plugin) CleanUp ¶
func (s *Base64Plugin) CleanUp()
CleanUp stops gRPC server and the underlying listener.
func (*Base64Plugin) Decrypt ¶
func (s *Base64Plugin) Decrypt(ctx context.Context, request *kmsapi.DecryptRequest) (*kmsapi.DecryptResponse, error)
Decrypt performs base64 decoding of the payload of kms.DecryptRequest.
func (*Base64Plugin) Encrypt ¶
func (s *Base64Plugin) Encrypt(ctx context.Context, request *kmsapi.EncryptRequest) (*kmsapi.EncryptResponse, error)
Encrypt performs base64 encoding of the payload of kms.EncryptRequest.
func (*Base64Plugin) EnterFailedState ¶
func (s *Base64Plugin) EnterFailedState()
EnterFailedState places the plugin into failed state.
func (*Base64Plugin) ExitFailedState ¶
func (s *Base64Plugin) ExitFailedState()
ExitFailedState removes the plugin from the failed state.
func (*Base64Plugin) LastEncryptRequest ¶
func (s *Base64Plugin) LastEncryptRequest() []byte
LastEncryptRequest returns the last EncryptRequest.Plain sent to the plugin.
func (*Base64Plugin) SetVersion ¶
func (s *Base64Plugin) SetVersion(ver string)
SetVersion sets the version of kms-plugin.
func (*Base64Plugin) Status ¶
func (s *Base64Plugin) Status(ctx context.Context, request *kmsapi.StatusRequest) (*kmsapi.StatusResponse, error)
Status returns the status of the kms-plugin.
func (*Base64Plugin) UpdateKeyID ¶
func (s *Base64Plugin) UpdateKeyID()
Update keyID for the plugin.