[#195] Add PUT and GET default lock configuration

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2022-02-28 11:29:03 +03:00 committed by Angira Kekteeva
parent b96c3c5a33
commit fe9eb9cedc
5 changed files with 147 additions and 9 deletions

18
api/data/locking.go Normal file
View file

@ -0,0 +1,18 @@
package data
type (
ObjectLockConfiguration struct {
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"`
}
)