Documentation ¶
Index ¶
- type Configuration
- type FilterRule
- type Notification
- func (n *Notification) Arn(arn string) *Notification
- func (n *Notification) Assert(t *testing.T, configs ...*Configuration) *Notification
- func (n *Notification) Events(event ...string) *Notification
- func (n *Notification) Filter(filter shared.Filter) *Notification
- func (n *Notification) First(t *testing.T, configs ...*Configuration) *Notification
- func (n *Notification) ID(id string) *Notification
- func (n *Notification) Prefix(value string) *Notification
- func (n *Notification) Rule(name, value string) *Notification
- func (n *Notification) Selected() *Configuration
- func (n *Notification) Suffix(value string) *Notification
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { // Events is a required field Events []string // A container for object key name filtering rules. For information about key // name filtering, see Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) // in the Amazon Simple Storage Service Developer Guide. Filter []*FilterRule // An optional unique identifier for configurations in a notification configuration. // If you don't provide one, Amazon S3 will assign an ID. ID string // The Amazon Resource Name (ARN) of the resource triggered // // Arn is a required field Arn string }
Configuration ... is a generic structure used for normalizing the three different types of S3 notifications. types: LambdaFunctionConfiguration, QueueConfiguration, and TopicConfiguration
type FilterRule ¶
FilterRule ... is a normalized version of s3.FilterRule without *string
type Notification ¶
type Notification struct {
// contains filtered or unexported fields
}
Notification contains the necessary properties for filtering *Configuration objects
func New ¶
func New(client client.ConfigProvider, name string) *Notification
New returns a new *Notification
func (*Notification) Arn ¶
func (n *Notification) Arn(arn string) *Notification
Arn adds the Arn filter to the filter list the Arn filter: filters configs by Arn where 'arn' provided is the expected Arn value
func (*Notification) Assert ¶
func (n *Notification) Assert(t *testing.T, configs ...*Configuration) *Notification
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 config if configs is not provided, *Configuration objects will be retreived from AWS
func (*Notification) Events ¶
func (n *Notification) Events(event ...string) *Notification
Events adds the Events filter to the filter list the Events filter: filters configs by Events where 'event' provided is the expected Events value
func (*Notification) Filter ¶
func (n *Notification) Filter(filter shared.Filter) *Notification
Filter adds the 'filter' provided to the filter list
func (*Notification) First ¶
func (n *Notification) First(t *testing.T, configs ...*Configuration) *Notification
First applies all filters that have been called, resets the list of filters, fails the test if there is not a match, and stores the first matched config if configs is not provided, *Configuration objects will be retreived from AWS
func (*Notification) ID ¶
func (n *Notification) ID(id string) *Notification
ID adds the ID filter to the filter list the ID filter: filters configs by ID where 'id' provided is the expected ID value
func (*Notification) Prefix ¶
func (n *Notification) Prefix(value string) *Notification
Prefix adds the Prefix filter to the filter list the Prefix filter: filters policies by Filter[Name:Prefix] where 'value' provided is the expected prefix value
func (*Notification) Rule ¶
func (n *Notification) Rule(name, value string) *Notification
Rule adds the Rule filter to the filter list the Rule filter: filters configs by FilterRule where 'name and value' provided is the expected FilterRule name and value
func (*Notification) Selected ¶
func (n *Notification) Selected() *Configuration
Selected returns the currently selected *Configuration
func (*Notification) Suffix ¶
func (n *Notification) Suffix(value string) *Notification
Suffix adds the Suffix filter to the filter list the Suffix filter: filters policies by Filter[Name:Suffix] where 'value' provided is the expected suffix value