key

package
v0.0.5-0...-3bd4ab3 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: CC0-1.0 Imports: 9 Imported by: 0

Documentation

Overview

Package key provides filtering of KMS keys by Description

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

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

Key contains the necessary properties for testing *kms.KeyMetadata objects

func New

func New(client client.ConfigProvider) *Key

New returns a new *Key

func (*Key) Arn

func (a *Key) Arn(arn string) *Key

Arn adds the Arn filter to the filter list the Arn filter: filters keys by Arn where 'arn' provided is the expected Arn value

func (*Key) Assert

func (a *Key) Assert(t *testing.T, keys ...*kms.KeyMetadata) *Key

Assert applies all filters that have been called, resets the list of filters, fails the test if there is not exactly one match, and stores the matched key if keys is not provided, *kms.KeyMetadata objects will be retreived from AWS

func (*Key) Description

func (a *Key) Description(description string) *Key

Description adds the Description filter to the filter list the Description filter: filters keys by Description where 'description' provided is the expected key description value

func (*Key) Enabled

func (a *Key) Enabled(e bool) *Key

Enabled adds the Enabled filter to the filter list the Enabled filter: filters keys by Enabled where 'e' provided is the expected Enabled boolean value

func (*Key) Filter

func (a *Key) Filter(filter shared.Filter) *Key

Filter adds the 'filter' provided to the filter list

func (*Key) First

func (a *Key) First(t *testing.T, keys ...*kms.KeyMetadata) *Key

First applies all filters that have been called, resets the list of filters, fails the test if there are no matches, and stores the first match if keys is not provided, *kms.KeyMetadata objects will be retreived from AWS

func (*Key) ID

func (a *Key) ID(id string) *Key

ID adds the ID filter to the filter list the ID filter: filters keys by ID where 'id' provided is the expected KeyId value

func (*Key) Key

func (a *Key) Key(t *testing.T) *kms.KeyMetadata

Key returns the currently selected Keys' targeted *kms.KeyMetadata

func (*Key) KeyManager

func (a *Key) KeyManager(str string) *Key

KeyManager adds the KeyManager filter to the filter list the KeyManager filter: filters keys by KeyManager where 'str' provided is the expected KeyManager value

func (*Key) KeyState

func (a *Key) KeyState(str string) *Key

KeyState adds the KeyState filter to the filter list the KeyState filter: filters keys by KeyState where 'str' provided is the expected KeyState value

func (*Key) KeyUsage

func (a *Key) KeyUsage(str string) *Key

KeyUsage adds the KeyUsage filter to the filter list the KeyUsage filter: filters keys by KeyUsage where 'str' provided is the expected KeyUsage value

func (*Key) Origin

func (a *Key) Origin(str string) *Key

Origin adds the Origin filter to the filter list the Origin filter: filters keys by Origin where 'str' provided is the expected Origin value

func (*Key) Policy

func (a *Key) Policy(t *testing.T) *policy.Policy

Policy returns a newly instantiated *policy.Policy using the KeyId as the required keyID value requires a prior call to Assert or First to "select" the Key whose KeyId will be used

func (*Key) Selected

func (a *Key) Selected() *kms.KeyMetadata

Selected returns the currently selected *kms.KeyMetadata

Jump to

Keyboard shortcuts

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