aws

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opts

type Opts func(opts *opts)

Opts a Functional Options.

func WithKeyAliasPrefix

func WithKeyAliasPrefix(prefix string) Opts

WithKeyAliasPrefix sets the given prefix in the returns Opts.

type Service

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

Service aws kms.

func New

func New(awsConfig *aws.Config, metrics metricsProvider,
	healthCheckKeyID string, opts ...Opts) *Service

New return aws service.

func (*Service) Create

func (s *Service) Create(kt arieskms.KeyType) (string, interface{}, error)

Create key.

func (*Service) CreateAndExportPubKeyBytes

func (s *Service) CreateAndExportPubKeyBytes(kt arieskms.KeyType, opts ...arieskms.KeyOpts) (string, []byte, error)

CreateAndExportPubKeyBytes create and export key.

func (*Service) ExportPubKeyBytes

func (s *Service) ExportPubKeyBytes(keyURI string) ([]byte, arieskms.KeyType, error)

ExportPubKeyBytes export public key.

func (*Service) Get

func (s *Service) Get(keyID string) (interface{}, error)

Get key handle.

func (*Service) HealthCheck

func (s *Service) HealthCheck() error

HealthCheck check kms.

func (*Service) ImportPrivateKey

func (s *Service) ImportPrivateKey(privKey interface{}, kt arieskms.KeyType,
	opts ...arieskms.PrivateKeyOpts) (string, interface{}, error)

ImportPrivateKey private key.

func (*Service) Sign

func (s *Service) Sign(msg []byte, kh interface{}) ([]byte, error)

Sign data.

func (*Service) SignMulti

func (s *Service) SignMulti(messages [][]byte, kh interface{}) ([]byte, error)

SignMulti sign multi.

func (*Service) Verify

func (s *Service) Verify(signature, msg []byte, kh interface{}) error

Verify signature.

Jump to

Keyboard shortcuts

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