2024-08-12 11:22:56 +00:00
|
|
|
package data
|
|
|
|
|
|
|
|
import "encoding/xml"
|
|
|
|
|
|
|
|
const (
|
|
|
|
LifecycleStatusEnabled = "Enabled"
|
|
|
|
LifecycleStatusDisabled = "Disabled"
|
|
|
|
)
|
|
|
|
|
|
|
|
type (
|
|
|
|
LifecycleConfiguration struct {
|
|
|
|
XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LifecycleConfiguration" json:"-"`
|
|
|
|
Rules []LifecycleRule `xml:"Rule"`
|
|
|
|
}
|
|
|
|
|
|
|
|
LifecycleRule struct {
|
|
|
|
Status string `xml:"Status,omitempty"`
|
|
|
|
AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `xml:"AbortIncompleteMultipartUpload,omitempty"`
|
|
|
|
Expiration *LifecycleExpiration `xml:"Expiration,omitempty"`
|
|
|
|
Filter *LifecycleRuleFilter `xml:"Filter,omitempty"`
|
|
|
|
ID string `xml:"ID,omitempty"`
|
|
|
|
NonCurrentVersionExpiration *NonCurrentVersionExpiration `xml:"NoncurrentVersionExpiration,omitempty"`
|
2024-11-07 14:28:16 +00:00
|
|
|
Prefix string `xml:"Prefix,omitempty"`
|
2024-08-12 11:22:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
AbortIncompleteMultipartUpload struct {
|
|
|
|
DaysAfterInitiation *int `xml:"DaysAfterInitiation,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
LifecycleExpiration struct {
|
2024-10-14 14:03:53 +00:00
|
|
|
Date string `xml:"Date,omitempty"`
|
|
|
|
Days *int `xml:"Days,omitempty"`
|
|
|
|
Epoch *uint64 `xml:"Epoch,omitempty"`
|
|
|
|
ExpiredObjectDeleteMarker *bool `xml:"ExpiredObjectDeleteMarker,omitempty"`
|
2024-08-12 11:22:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
LifecycleRuleFilter struct {
|
|
|
|
And *LifecycleRuleAndOperator `xml:"And,omitempty"`
|
|
|
|
ObjectSizeGreaterThan *uint64 `xml:"ObjectSizeGreaterThan,omitempty"`
|
|
|
|
ObjectSizeLessThan *uint64 `xml:"ObjectSizeLessThan,omitempty"`
|
|
|
|
Prefix string `xml:"Prefix,omitempty"`
|
|
|
|
Tag *Tag `xml:"Tag,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
LifecycleRuleAndOperator struct {
|
|
|
|
ObjectSizeGreaterThan *uint64 `xml:"ObjectSizeGreaterThan,omitempty"`
|
|
|
|
ObjectSizeLessThan *uint64 `xml:"ObjectSizeLessThan,omitempty"`
|
|
|
|
Prefix string `xml:"Prefix,omitempty"`
|
|
|
|
Tags []Tag `xml:"Tag"`
|
|
|
|
}
|
|
|
|
|
|
|
|
NonCurrentVersionExpiration struct {
|
|
|
|
NewerNonCurrentVersions *int `xml:"NewerNoncurrentVersions,omitempty"`
|
|
|
|
NonCurrentDays *int `xml:"NoncurrentDays,omitempty"`
|
|
|
|
}
|
|
|
|
)
|