2022-02-28 08:29:03 +00:00
|
|
|
package data
|
|
|
|
|
2022-02-28 13:39:04 +00:00
|
|
|
import (
|
|
|
|
"encoding/xml"
|
|
|
|
"time"
|
2022-03-04 14:36:30 +00:00
|
|
|
|
|
|
|
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
2022-02-28 13:39:04 +00:00
|
|
|
)
|
2022-02-28 10:22:07 +00:00
|
|
|
|
2022-02-28 08:29:03 +00:00
|
|
|
type (
|
|
|
|
ObjectLockConfiguration struct {
|
2022-02-28 13:39:04 +00:00
|
|
|
XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ObjectLockConfiguration" json:"-"`
|
2022-02-28 08:29:03 +00:00
|
|
|
ObjectLockEnabled string `xml:"ObjectLockEnabled" json:"ObjectLockEnabled"`
|
|
|
|
Rule *ObjectLockRule `xml:"Rule" json:"Rule"`
|
|
|
|
}
|
|
|
|
|
|
|
|
ObjectLockRule struct {
|
|
|
|
DefaultRetention *DefaultRetention `xml:"DefaultRetention" json:"DefaultRetention"`
|
|
|
|
}
|
|
|
|
|
|
|
|
DefaultRetention struct {
|
|
|
|
Days int64 `xml:"Days" json:"Days"`
|
|
|
|
Mode string `xml:"Mode" json:"Mode"`
|
|
|
|
Years int64 `xml:"Years" json:"Years"`
|
|
|
|
}
|
2022-02-28 10:22:07 +00:00
|
|
|
|
2022-02-28 13:39:04 +00:00
|
|
|
LegalHold struct {
|
|
|
|
XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LegalHold" json:"-"`
|
|
|
|
Status string `xml:"Status" json:"Status"`
|
|
|
|
}
|
|
|
|
|
|
|
|
Retention struct {
|
|
|
|
XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Retention" json:"-"`
|
|
|
|
Mode string `xml:"Mode" json:"Mode"`
|
|
|
|
RetainUntilDate string `xml:"RetainUntilDate" json:"RetainUntilDate"`
|
|
|
|
}
|
|
|
|
|
2022-02-28 10:22:07 +00:00
|
|
|
ObjectLock struct {
|
|
|
|
Until time.Time
|
|
|
|
LegalHold bool
|
|
|
|
IsCompliance bool
|
2022-03-04 14:36:30 +00:00
|
|
|
Objects []oid.ID
|
2022-02-28 10:22:07 +00:00
|
|
|
}
|
2022-02-28 08:29:03 +00:00
|
|
|
)
|