Skip to content

Commit

Permalink
api/status: Declare constants for status codes
Browse files Browse the repository at this point in the history
Protocol Buffers V3 has no constants, and they are missing in the
generated code as well. To make them easier to access, they are exported
manually.

Signed-off-by: Leonard Lyubich <[email protected]>
  • Loading branch information
cthulhu-rider committed Jul 9, 2024
1 parent 4dea8bf commit 519d1f5
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions api/status/codes.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package status

// All supported status codes.
const (
OK = 0
InternalServerError = 1024
WrongNetMagic = 1025
SignatureVerificationFail = 1026
NodeUnderMaintenance = 1027
ObjectAccessDenied = 2048
ObjectNotFound = 2049
ObjectLocked = 2050
LockIrregularObject = 2051
ObjectAlreadyRemoved = 2052
OutOfRange = 2053
ContainerNotFound = 3072
EACLNotFound = 3073
SessionTokenNotFound = 4096
SessionTokenExpired = 4097
)

// All supported status details.
const (
DetailCorrectNetMagic = 0
DetailObjectAccessDenialReason = 0
)

0 comments on commit 519d1f5

Please sign in to comment.