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
|
@ -59,6 +59,18 @@ func TestToStatusV2(t *testing.T) {
|
|||
}),
|
||||
codeV2: 1025,
|
||||
},
|
||||
{
|
||||
status: (statusConstructor)(func() apistatus.Status {
|
||||
return new(apistatus.ObjectLocked)
|
||||
}),
|
||||
codeV2: 2050,
|
||||
},
|
||||
{
|
||||
status: (statusConstructor)(func() apistatus.Status {
|
||||
return new(apistatus.LockNonRegularObject)
|
||||
}),
|
||||
codeV2: 2051,
|
||||
},
|
||||
} {
|
||||
var st apistatus.Status
|
||||
|
||||
|
@ -137,6 +149,18 @@ func TestFromStatusV2(t *testing.T) {
|
|||
}),
|
||||
codeV2: 1025,
|
||||
},
|
||||
{
|
||||
status: (statusConstructor)(func() apistatus.Status {
|
||||
return new(apistatus.ObjectLocked)
|
||||
}),
|
||||
codeV2: 2050,
|
||||
},
|
||||
{
|
||||
status: (statusConstructor)(func() apistatus.Status {
|
||||
return new(apistatus.LockNonRegularObject)
|
||||
}),
|
||||
codeV2: 2051,
|
||||
},
|
||||
} {
|
||||
var st apistatus.Status
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue