Use `node is under maintenance` message in `NodeUnderMaintenance.Error`
is `message` field is unset in the status message.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Support decoding `NodeUnderMaintenance` status errors in `FromStatusV2`
function.
From now `NodeUnderMaintenance` instance can be decoded from
`status.Status` message of NeoFS API V2 protocol.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Define `SessionTokenNotFound`/`SessionTokenExpired` types for
`TOKEN_NOT_FOUND`/`TOKEN_EXPIRED` codes.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Define `ObjectAccessDenied` type for `ACCESS_DENIED` code. Provide
method to write/read human-readable reason.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
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>
Define `WrongMagicNumber` type for which encapsulates the work with
incorrect network magic. Provide method to read/write the correct magic
(which is a status detail in NeoFS API V2 protocol).
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Define base `Status` interface. Provide the functionality to distinguish
success and failure returns. Provide functionality to transport statuses
over NeoFS API V2 protocol. Support success `OK` and failure `INTERNAL`
returns.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>