lifecycle

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lifecycle

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

Lifecycle contains the necessary properties for filtering *s3.LifecycleRule objects

func New

func New(client client.ConfigProvider, name string) *Lifecycle

New returns a new *Lifecycle

func (*Lifecycle) Assert

func (l *Lifecycle) Assert(t *testing.T, rules ...*s3.LifecycleRule) *Lifecycle

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 rule if rules is not provided, *s3.LifecycleRule objects will be retreived from AWS

func (*Lifecycle) ExpDate

func (l *Lifecycle) ExpDate(date time.Time) *Lifecycle

ExpDate adds the ExpDate filter to the filter list the ExpDate filter: filters rules by ExpDate where 'date' provided is the expected Expiration Date value

func (*Lifecycle) ExpDays

func (l *Lifecycle) ExpDays(days int64) *Lifecycle

ExpDays adds the ExpDays filter to the filter list the ExpDays filter: filters rules by ExpDays where 'days' provided is the expected Expiration Days value

func (*Lifecycle) Filter

func (l *Lifecycle) Filter(filter shared.Filter) *Lifecycle

Filter adds the 'filter' provided to the filter list

func (*Lifecycle) FilterAnd

func (l *Lifecycle) FilterAnd(prefix string, tag ...*s3.Tag) *Lifecycle

FilterAnd adds the FilterAnd filter to the filter list the FilterAnd filter: filters rules by Filter[And] where 'key and value' provided is the expected Tag key and value

func (*Lifecycle) FilterPrefix

func (l *Lifecycle) FilterPrefix(value string) *Lifecycle

FilterPrefix adds the FilterPrefix filter to the filter list the FilterPrefix filter: filters rules by Filter[Prefix] where 'value' provided is the expected Prefix value

func (*Lifecycle) FilterTag

func (l *Lifecycle) FilterTag(key, value string) *Lifecycle

FilterTag adds the FilterTag filter to the filter list the FilterTag filter: filters rules by Filter[Tag] where 'key and value' provided is the expected Tag key and value

func (*Lifecycle) First

func (l *Lifecycle) First(t *testing.T, rules ...*s3.LifecycleRule) *Lifecycle

First 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 rule if rules is not provided, *s3.LifecycleRule objects will be retreived from AWS

func (*Lifecycle) IsExp

func (l *Lifecycle) IsExp() *Lifecycle

IsExp adds the IsExp filter to the filter list the IsExp filter: filters rules by whether they have an Expiration set

func (*Lifecycle) Method

func (l *Lifecycle) Method(method string) *Lifecycle

Method adds the Method filter to the filter list the Method filter: filters rules by Method where 'method' provided is the expected ID value

func (*Lifecycle) Selected

func (l *Lifecycle) Selected() *s3.LifecycleRule

Selected returns the currently selected *s3.LifecycleRule

func (*Lifecycle) Status

func (l *Lifecycle) Status(status string) *Lifecycle

Status adds the Status filter to the filter list the Status filter: filters rules by Status where 'status' provided is the expected Status value

Jump to

Keyboard shortcuts

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