kms

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2019 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DecryptRequest

type DecryptRequest struct {
	Key string
	*Resource
}

func (*DecryptRequest) Validate added in v0.26.0

func (r *DecryptRequest) Validate() error

type DecryptResponse

type DecryptResponse struct {
	Data []byte
	Text string
}

type EncryptRequest

type EncryptRequest struct {
	Key string
	*Resource
	TargetURL string
}

func (*EncryptRequest) Validate added in v0.26.0

func (r *EncryptRequest) Validate() error

type EncryptResponse

type EncryptResponse struct {
	EncryptedData []byte
	EncryptedText string
}

type Resource

type Resource struct {
	URL       string
	Parameter string
	Data      []byte
}

type Service

type Service interface {
	Encrypt(context.Context, *EncryptRequest) (*EncryptResponse, error)

	Decrypt(context.Context, *DecryptRequest) (*DecryptResponse, error)

	Decode(ctx context.Context, decryptRequest *DecryptRequest, factory toolbox.DecoderFactory, target interface{}) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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