forked from TrueCloudLab/frostfs-s3-gw
54 lines
2.1 KiB
Go
54 lines
2.1 KiB
Go
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"`
|
|
}
|
|
|
|
AbortIncompleteMultipartUpload struct {
|
|
DaysAfterInitiation *int `xml:"DaysAfterInitiation,omitempty"`
|
|
}
|
|
|
|
LifecycleExpiration struct {
|
|
Date string `xml:"Date,omitempty"`
|
|
Days *int `xml:"Days,omitempty"`
|
|
ExpiredObjectDeleteMarker *bool `xml:"ExpiredObjectDeleteMarker,omitempty"`
|
|
}
|
|
|
|
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"`
|
|
}
|
|
)
|