forked from TrueCloudLab/frostfs-sdk-go
[#140] object: Support LOCK
type
Add `TypeLock` value to `Type` enum. Implement `Lock` type compatible with corresponding message. Implement `ObjectLocked` and `IrregularObjectLock` errors in `apistatus` package. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
07817fb403
commit
2b28f91a89
6 changed files with 170 additions and 17 deletions
|
@ -25,6 +25,10 @@ func TestType_ToV2(t *testing.T) {
|
|||
t: object.TypeStorageGroup,
|
||||
t2: v2object.TypeStorageGroup,
|
||||
},
|
||||
{
|
||||
t: object.TypeLock,
|
||||
t2: v2object.TypeLock,
|
||||
},
|
||||
}
|
||||
|
||||
for _, item := range typs {
|
||||
|
@ -45,6 +49,7 @@ func TestType_String(t *testing.T) {
|
|||
{val: toPtr(object.TypeTombstone), str: "TOMBSTONE"},
|
||||
{val: toPtr(object.TypeStorageGroup), str: "STORAGE_GROUP"},
|
||||
{val: toPtr(object.TypeRegular), str: "REGULAR"},
|
||||
{val: toPtr(object.TypeLock), str: "LOCK"},
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue