Documentation
¶
Index ¶
Constants ¶
const ( // PutBucketLifecycleAction - PutBucketLifecycle Rest API action. PutBucketLifecycleAction = "s3:PutBucketLifecycle" // GetBucketLifecycleAction - GetBucketLifecycle Rest API action. GetBucketLifecycleAction = "s3:GetBucketLifecycle" // DeleteBucketLifecycleAction - DeleteBucketLifecycleAction Rest API action. DeleteBucketLifecycleAction = "s3:DeleteBucketLifecycle" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action string
Action - policy action. Refer https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazons3.html for more information about available actions.
type And ¶
type And struct {
XMLName xml.Name `xml:"And"`
Prefix string `xml:"Prefix,omitempty"`
Tags []Tag `xml:"Tag,omitempty"`
}
And - a tag to combine a prefix and multiple tags for lifecycle configuration rule.
func (And) MarshalXML ¶
MarshalXML is extended to leave out <And></And> tags
func (And) UnmarshalXML ¶
UnmarshalXML is extended to indicate lack of support for And xml tag in object lifecycle configuration
type Expiration ¶
type Expiration struct {
XMLName xml.Name `xml:"Expiration"`
Days ExpirationDays `xml:"Days,omitempty"`
Date ExpirationDate `xml:"Date,omitempty"`
}
Expiration - expiration actions for a rule in lifecycle configuration.
func (Expiration) Validate ¶
func (e Expiration) Validate() error
Validate - validates the "Expiration" element
type ExpirationDate ¶
ExpirationDate is a embedded type containing time.Time to unmarshal Date in Expiration
func (*ExpirationDate) MarshalXML ¶
func (eDate *ExpirationDate) MarshalXML(e *xml.Encoder, startElement xml.StartElement) error
MarshalXML encodes expiration date if it is non-zero and encodes empty string otherwise
func (*ExpirationDate) UnmarshalXML ¶
func (eDate *ExpirationDate) UnmarshalXML(d *xml.Decoder, startElement xml.StartElement) error
UnmarshalXML parses date from Expiration and validates date format
type ExpirationDays ¶
type ExpirationDays int
ExpirationDays is a type alias to unmarshal Days in Expiration
func (*ExpirationDays) MarshalXML ¶
func (eDays *ExpirationDays) MarshalXML(e *xml.Encoder, startElement xml.StartElement) error
MarshalXML encodes number of days to expire if it is non-zero and encodes empty string otherwise
func (*ExpirationDays) UnmarshalXML ¶
func (eDays *ExpirationDays) UnmarshalXML(d *xml.Decoder, startElement xml.StartElement) error
UnmarshalXML parses number of days from Expiration and validates if greater than zero
type Filter ¶
type Filter struct {
XMLName xml.Name `xml:"Filter"`
And And `xml:"And,omitempty"`
Prefix string `xml:"Prefix"`
Tag Tag `xml:"Tag,omitempty"`
}
Filter - a filter for a lifecycle configuration Rule.
type Lifecycle ¶
Lifecycle - Configuration for bucket lifecycle.
func ParseLifecycleConfig ¶
ParseLifecycleConfig - parses data in given reader to Lifecycle.
type NoncurrentVersionExpiration ¶
type NoncurrentVersionExpiration struct {
XMLName xml.Name `xml:"NoncurrentVersionExpiration"`
NoncurrentDays int `xml:"NoncurrentDays,omitempty"`
}
NoncurrentVersionExpiration - an action for lifecycle configuration rule.
func (NoncurrentVersionExpiration) MarshalXML ¶
func (n NoncurrentVersionExpiration) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML is extended to leave out <NoncurrentVersionExpiration></NoncurrentVersionExpiration> tags
func (NoncurrentVersionExpiration) UnmarshalXML ¶
func (n NoncurrentVersionExpiration) UnmarshalXML(d *xml.Decoder, startElement xml.StartElement) error
UnmarshalXML is extended to indicate lack of support for NoncurrentVersionExpiration xml tag in object lifecycle configuration
type NoncurrentVersionTransition ¶
type NoncurrentVersionTransition struct {
NoncurrentDays int `xml:"NoncurrentDays"`
StorageClass string `xml:"StorageClass"`
}
NoncurrentVersionTransition - an action for lifecycle configuration rule.
func (NoncurrentVersionTransition) MarshalXML ¶
func (n NoncurrentVersionTransition) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML is extended to leave out <NoncurrentVersionTransition></NoncurrentVersionTransition> tags
func (NoncurrentVersionTransition) UnmarshalXML ¶
func (n NoncurrentVersionTransition) UnmarshalXML(d *xml.Decoder, startElement xml.StartElement) error
UnmarshalXML is extended to indicate lack of support for NoncurrentVersionTransition xml tag in object lifecycle configuration
type Rule ¶
type Rule struct {
XMLName xml.Name `xml:"Rule"`
ID string `xml:"ID,omitempty"`
Status string `xml:"Status"`
Filter Filter `xml:"Filter"`
Expiration Expiration `xml:"Expiration,omitempty"`
Transition Transition `xml:"Transition,omitempty"`
// FIXME: add a type to catch unsupported AbortIncompleteMultipartUpload AbortIncompleteMultipartUpload `xml:"AbortIncompleteMultipartUpload,omitempty"`
NoncurrentVersionExpiration NoncurrentVersionExpiration `xml:"NoncurrentVersionExpiration,omitempty"`
NoncurrentVersionTransition NoncurrentVersionTransition `xml:"NoncurrentVersionTransition,omitempty"`
}
Rule - a rule for lifecycle configuration.
type Tag ¶
type Tag struct {
XMLName xml.Name `xml:"Tag"`
Key string `xml:"Key,omitempty"`
Value string `xml:"Value,omitempty"`
}
Tag - a tag for a lifecycle configuration Rule filter.
func (Tag) MarshalXML ¶
MarshalXML is extended to leave out <Tag></Tag> tags
func (Tag) UnmarshalXML ¶
UnmarshalXML is extended to indicate lack of support for Tag xml tag in object lifecycle configuration
type Transition ¶
type Transition struct {
XMLName xml.Name `xml:"Transition"`
Days int `xml:"Days,omitempty"`
Date string `xml:"Date,omitempty"`
StorageClass string `xml:"StorageClass"`
}
Transition - transition actions for a rule in lifecycle configuration.
func (Transition) MarshalXML ¶
func (t Transition) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML is extended to leave out <Transition></Transition> tags
func (Transition) UnmarshalXML ¶
func (t Transition) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML is extended to indicate lack of support for Transition xml tag in object lifecycle configuration