topic

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 topic provides functions and filters to test AWS SNS Topics

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attributes

type Attributes struct {
	Policy                  string
	DeliveryPolicy          string
	Owner                   string
	SubscriptionsPending    string
	TopicArn                string
	EffectiveDeliveryPolicy string
	SubscriptionsConfirmed  string
	DisplayName             string
	SubscriptionsDeleted    string
	KmsMasterKeyID          string `json:"KmsMasterKeyId"`
}

Attributes A struct of the topic's attributes map.

type Topic

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

Topic contains the necessary properties for testing *sns.Topic objects

func New

func New(client client.ConfigProvider) *Topic

New returns a new *Topic

func (*Topic) Arn

func (r *Topic) Arn(arn string) *Topic

Arn adds the Arn filter as an alias to the TopicArn filter

func (*Topic) Assert

func (r *Topic) Assert(t *testing.T, topics ...*Attributes) *Topic

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 topic if topics is not provided, *Attributes objects will be retreived from AWS

func (*Topic) DisplayName

func (r *Topic) DisplayName(name string) *Topic

DisplayName adds the DisplayName filter to the filter list the DisplayName filter: filters topics by DisplayName where 'name' provided is the expected DisplayName value

func (*Topic) Filter

func (r *Topic) Filter(filter shared.Filter) *Topic

Filter adds the 'filter' provided to the filter list

func (*Topic) First

func (r *Topic) First(t *testing.T, topics ...*Attributes) *Topic

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 topics is not provided, *Attributes objects will be retreived from AWS

func (*Topic) KmsMasterKeyID

func (r *Topic) KmsMasterKeyID(id string) *Topic

KmsMasterKeyID adds the KmsMasterKeyID filter to the filter list the KmsMasterKeyID filter: filters topics by KmsMasterKeyId where 'id' provided is the expected KmsMasterKeyId value

func (*Topic) Name

func (r *Topic) Name(name string) *Topic

Name adds the Name filter as an alias to the DisplayName filter

func (*Topic) Owner

func (r *Topic) Owner(str string) *Topic

Owner adds the Owner filter to the filter list the Owner filter: filters topics by Owner where 'str' provided is the expected Owner value

func (*Topic) Policy

func (r *Topic) Policy() *policy.Policy

Policy returns a new *policy.Policy instantiated with the current bucket name set by calling Name()

func (*Topic) Selected

func (r *Topic) Selected() *Attributes

Selected returns the currently selected *Attributes

func (*Topic) TopicArn

func (r *Topic) TopicArn(arn string) *Topic

TopicArn adds the TopicArn filter to the filter list the TopicArn filter: filters topics by TopicArn where 'arn' provided is the expected TopicArn value

Directories

Path Synopsis
Package policy provides types and functions for breaking down SNS Buucket policies which allows the filter actions to take place.
Package policy provides types and functions for breaking down SNS Buucket policies which allows the filter actions to take place.

Jump to

Keyboard shortcuts

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