Commit graph

25 commits

Author SHA1 Message Date
3dc8129ed7 [#135] Make all error status receivers pointers
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
2023-08-04 08:35:01 +00:00
9a072a8f49 [#68] Replace interface{} with any
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2023-05-15 17:21:49 +03:00
94476f9055 Rename package name
Due to source code relocation from GitHub.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-03-07 15:47:21 +03:00
4ff9c00de3 [#4] Rename NeoFS mentions in comments and method names
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2022-12-30 13:40:50 +03:00
Pavel Karpy
4c779423f5 Move to frostfs-sdk-go
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
2022-12-14 09:59:29 +03:00
Pavel Karpy
45a6e7a7c2 [#369] status: Make errors return default messages
Use default messages in `Error` methods like in `ToStatusV2`.

Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
2022-12-14 09:59:29 +03:00
Leonard Lyubich
f2f97f656d [#315] apistatus: Write default message in NodeUnderMaintenance.Error
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>
2022-09-20 11:23:22 +04:00
Leonard Lyubich
be9a1aca90 [#315] apistatus: Support NodeUnderMaintenance in FromStatusV2
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>
2022-09-20 11:23:22 +04:00
Evgenii Stratonikov
4662d39886 [#315] client/status: Add NodeUnderMaintenance status
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-09-19 16:49:27 +04:00
Evgenii Stratonikov
84888854ab [#322] *: Go fmt -s
go1.19 rewrites comments to proper render them in docs.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-08-24 18:58:59 +03:00
Pavel Karpy
7a99cc916c [#307] status: Support EACL_NOT_FOUND status code
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2022-08-01 19:57:07 +03:00
Pavel Karpy
df6538c68c [#282] apistatus: Support OUT_OF_RANGE error
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2022-07-05 11:53:29 +03:00
Pavel Karpy
27fe9c19a7 [#273] status: Support signature status
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2022-07-05 11:50:44 +03:00
Alex Vanin
a55ffa4796 [#176] status: Do not lose built-in error text message
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-16 17:16:20 +03:00
Alex Vanin
9c5d3d9dfa [#168] client: Adopt replacement of pointer slices with struct slices
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-15 16:59:59 +03:00
Leonard Lyubich
12aa7ae144 [#140] apistatus: Support session errors
Define `SessionTokenNotFound`/`SessionTokenExpired` types for
`TOKEN_NOT_FOUND`/`TOKEN_EXPIRED` codes.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-02 18:27:08 +03:00
Leonard Lyubich
c627648798 [#140] apistatus: Support CONTAINER_NOT_FOUND error
Define `ContainerNotFound` type for `CONTAINER_NOT_FOUND` code.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-02 18:27:08 +03:00
Leonard Lyubich
f1e46d35de [#140] apistatus: Support OBJECT_ALREADY_REMOVED error
Define `ObjectAlreadyRemoved` type for `OBJECT_ALREADY_REMOVED` code.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-02 18:27:08 +03:00
Leonard Lyubich
ff3826ae6b [#140] apistatus: Support OBJECT_NOT_FOUND error
Define `ObjectNotFound` type for `OBJECT_NOT_FOUND` code.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-02 18:27:08 +03:00
Leonard Lyubich
3e94b7c892 [#140] apistatus: Support ACCESS_DENIED error
Define `ObjectAccessDenied` type for `ACCESS_DENIED` code. Provide
method to write/read human-readable reason.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-02 18:27:08 +03:00
Leonard Lyubich
2b28f91a89 [#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>
2022-03-02 18:27:08 +03:00
Evgenii Stratonikov
fa670ab57a *: Fix linter warnings
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-02-24 18:49:55 +03:00
Leonard Lyubich
9414f42aa3 [#127] apistatus: Fix grammar of fromStatusV2 method docs
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-02-01 17:02:58 +03:00
Leonard Lyubich
0fb22361a3 [#127] apistatus: Support WRONG_MAGIC_NUMBER status
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>
2022-02-01 17:02:58 +03:00
Leonard Lyubich
9dcff95a29 [#83] client: Implement status library
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>
2021-11-23 13:03:40 +03:00