Documentation ¶
Index ¶
- Variables
- type CommonFail
- type Container
- type Object
- type Section
- type Session
- type Status
- func (*Status) Descriptor() ([]byte, []int)deprecated
- func (x *Status) GetCode() uint32
- func (x *Status) GetDetails() []*Status_Detail
- func (x *Status) GetMessage() string
- func (*Status) ProtoMessage()
- func (x *Status) ProtoReflect() protoreflect.Message
- func (x *Status) Reset()
- func (x *Status) SetCode(v uint32)
- func (x *Status) SetDetails(v []*Status_Detail)
- func (x *Status) SetMessage(v string)
- func (x *Status) String() string
- type Status_Detail
- func (*Status_Detail) Descriptor() ([]byte, []int)deprecated
- func (x *Status_Detail) GetId() uint32
- func (x *Status_Detail) GetValue() []byte
- func (*Status_Detail) ProtoMessage()
- func (x *Status_Detail) ProtoReflect() protoreflect.Message
- func (x *Status_Detail) Reset()
- func (x *Status_Detail) SetId(v uint32)
- func (x *Status_Detail) SetValue(v []byte)
- func (x *Status_Detail) String() string
- type Success
Constants ¶
This section is empty.
Variables ¶
var ( Section_name = map[int32]string{ 0: "SECTION_SUCCESS", 1: "SECTION_FAILURE_COMMON", 2: "SECTION_OBJECT", 3: "SECTION_CONTAINER", 4: "SECTION_SESSION", } Section_value = map[string]int32{ "SECTION_SUCCESS": 0, "SECTION_FAILURE_COMMON": 1, "SECTION_OBJECT": 2, "SECTION_CONTAINER": 3, "SECTION_SESSION": 4, } )
Enum value maps for Section.
var ( Success_name = map[int32]string{ 0: "OK", } Success_value = map[string]int32{ "OK": 0, } )
Enum value maps for Success.
var ( CommonFail_name = map[int32]string{ 0: "INTERNAL", 1: "WRONG_MAGIC_NUMBER", } CommonFail_value = map[string]int32{ "INTERNAL": 0, "WRONG_MAGIC_NUMBER": 1, } )
Enum value maps for CommonFail.
var ( Object_name = map[int32]string{ 0: "ACCESS_DENIED", 1: "OBJECT_NOT_FOUND", 2: "LOCKED", 3: "LOCK_NON_REGULAR_OBJECT", 4: "OBJECT_ALREADY_REMOVED", } Object_value = map[string]int32{ "ACCESS_DENIED": 0, "OBJECT_NOT_FOUND": 1, "LOCKED": 2, "LOCK_NON_REGULAR_OBJECT": 3, "OBJECT_ALREADY_REMOVED": 4, } )
Enum value maps for Object.
var ( Container_name = map[int32]string{ 0: "CONTAINER_NOT_FOUND", } Container_value = map[string]int32{ "CONTAINER_NOT_FOUND": 0, } )
Enum value maps for Container.
var ( Session_name = map[int32]string{ 0: "TOKEN_NOT_FOUND", 1: "TOKEN_EXPIRED", } Session_value = map[string]int32{ "TOKEN_NOT_FOUND": 0, "TOKEN_EXPIRED": 1, } )
Enum value maps for Session.
var File_status_grpc_types_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type CommonFail ¶
type CommonFail int32
Section of failed statuses independent of the operation.
const ( // [**1024**] Internal server error, default failure. Not detailed. // If the server cannot match failed outcome to the code, it should // use this code. CommonFail_INTERNAL CommonFail = 0 // [**1025**] Wrong magic of the NeoFS network. // Details: // - [**0**] Magic number of the served NeoFS network (big-endian 64-bit // unsigned integer). CommonFail_WRONG_MAGIC_NUMBER CommonFail = 1 )
func (CommonFail) Descriptor ¶
func (CommonFail) Descriptor() protoreflect.EnumDescriptor
func (CommonFail) Enum ¶
func (x CommonFail) Enum() *CommonFail
func (CommonFail) EnumDescriptor
deprecated
func (CommonFail) EnumDescriptor() ([]byte, []int)
Deprecated: Use CommonFail.Descriptor instead.
func (CommonFail) Number ¶
func (x CommonFail) Number() protoreflect.EnumNumber
func (CommonFail) String ¶
func (x CommonFail) String() string
func (CommonFail) Type ¶
func (CommonFail) Type() protoreflect.EnumType
type Container ¶ added in v2.12.0
type Container int32
Section of statuses for container-related operations.
const ( // [**3072**] Container not found. Container_CONTAINER_NOT_FOUND Container = 0 )
func (Container) Descriptor ¶ added in v2.12.0
func (Container) Descriptor() protoreflect.EnumDescriptor
func (Container) EnumDescriptor
deprecated
added in
v2.12.0
func (Container) Number ¶ added in v2.12.0
func (x Container) Number() protoreflect.EnumNumber
func (Container) Type ¶ added in v2.12.0
func (Container) Type() protoreflect.EnumType
type Object ¶ added in v2.12.0
type Object int32
Section of statuses for object-related operations.
const ( // [**2048**] Access denied by ACL. // Details: // - [**0**] Human-readable description (UTF-8 encoded string). Object_ACCESS_DENIED Object = 0 // [**2049**] Object not found. Object_OBJECT_NOT_FOUND Object = 1 // [**2050**] Operation rejected by the object lock. Object_LOCKED Object = 2 // [**2051**] Locking an object with a non-REGULAR type rejected. Object_LOCK_NON_REGULAR_OBJECT Object = 3 // [**2052**] Object has been marked deleted. Object_OBJECT_ALREADY_REMOVED Object = 4 )
func (Object) Descriptor ¶ added in v2.12.0
func (Object) Descriptor() protoreflect.EnumDescriptor
func (Object) EnumDescriptor
deprecated
added in
v2.12.0
func (Object) Number ¶ added in v2.12.0
func (x Object) Number() protoreflect.EnumNumber
func (Object) Type ¶ added in v2.12.0
func (Object) Type() protoreflect.EnumType
type Section ¶
type Section int32
Section identifiers.
const ( // Successful return codes. Section_SECTION_SUCCESS Section = 0 // Failure codes regardless of the operation. Section_SECTION_FAILURE_COMMON Section = 1 // Object service-specific errors. Section_SECTION_OBJECT Section = 2 // Container service-specific errors. Section_SECTION_CONTAINER Section = 3 // Session service-specific errors. Section_SECTION_SESSION Section = 4 )
func (Section) Descriptor ¶
func (Section) Descriptor() protoreflect.EnumDescriptor
func (Section) EnumDescriptor
deprecated
func (Section) Number ¶
func (x Section) Number() protoreflect.EnumNumber
func (Section) Type ¶
func (Section) Type() protoreflect.EnumType
type Session ¶ added in v2.12.0
type Session int32
Section of statuses for session-related operations.
func (Session) Descriptor ¶ added in v2.12.0
func (Session) Descriptor() protoreflect.EnumDescriptor
func (Session) EnumDescriptor
deprecated
added in
v2.12.0
func (Session) Number ¶ added in v2.12.0
func (x Session) Number() protoreflect.EnumNumber
func (Session) Type ¶ added in v2.12.0
func (Session) Type() protoreflect.EnumType
type Status ¶
type Status struct { // The status code Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // Developer-facing error message Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // Data detailing the outcome of the operation. Must be unique by ID. Details []*Status_Detail `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty"` // contains filtered or unexported fields }
Declares the general format of the status returns of the NeoFS RPC protocol. Status is present in all response messages. Each RPC of NeoFS protocol describes the possible outcomes and details of the operation.
Each status is assigned a one-to-one numeric code. Any unique result of an operation in NeoFS is unambiguously associated with the code value.
Numerical set of codes is split into 1024-element sections. An enumeration is defined for each section. Values can be referred to in the following ways:
* numerical value ranging from 0 to 4,294,967,295 (global code);
- values from enumeration (local code). The formula for the ratio of the local code (`L`) of a defined section (`S`) to the global one (`G`): `G = 1024 * S + L`.
All outcomes are divided into successful and failed, which corresponds to the success or failure of the operation. The definition of success follows from the semantics of RPC and the description of its purpose. The server must not attach code that is the opposite of outcome type.
See the set of return codes in the description for calls.
Each status can carry developer-facing error message. It should be human readable text in English. The server should not transmit (and the client should not expect) useful information in the message. Field `details` should make the return more detailed.
func (*Status) Descriptor
deprecated
func (*Status) GetDetails ¶
func (x *Status) GetDetails() []*Status_Detail
func (*Status) GetMessage ¶
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
func (*Status) ProtoReflect ¶
func (x *Status) ProtoReflect() protoreflect.Message
func (*Status) SetDetails ¶
func (x *Status) SetDetails(v []*Status_Detail)
SetDetails sets details of the Status.
func (*Status) SetMessage ¶
SetMessage sets message about the Status.
type Status_Detail ¶
type Status_Detail struct { // Detail ID. The identifier is required to determine the binary format // of the detail and how to decode it. Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Binary status detail. Must follow the format associated with ID. // The possibility of missing a value must be explicitly allowed. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
Return detail. It contains additional information that can be used to analyze the response. Each code defines a set of details that can be attached to a status. Client should not handle details that are not covered by the code.
func (*Status_Detail) Descriptor
deprecated
func (*Status_Detail) Descriptor() ([]byte, []int)
Deprecated: Use Status_Detail.ProtoReflect.Descriptor instead.
func (*Status_Detail) GetId ¶
func (x *Status_Detail) GetId() uint32
func (*Status_Detail) GetValue ¶
func (x *Status_Detail) GetValue() []byte
func (*Status_Detail) ProtoMessage ¶
func (*Status_Detail) ProtoMessage()
func (*Status_Detail) ProtoReflect ¶
func (x *Status_Detail) ProtoReflect() protoreflect.Message
func (*Status_Detail) Reset ¶
func (x *Status_Detail) Reset()
func (*Status_Detail) SetId ¶
func (x *Status_Detail) SetId(v uint32)
SetId sets identifier of the Status_Detail.
func (*Status_Detail) SetValue ¶
func (x *Status_Detail) SetValue(v []byte)
SetValue sets value of the Status_Detail.
func (*Status_Detail) String ¶
func (x *Status_Detail) String() string
type Success ¶
type Success int32
Section of NeoFS successful return codes.
const ( // [**0**] Default success. Not detailed. // If the server cannot match successful outcome to the code, it should // use this code. Success_OK Success = 0 )
func (Success) Descriptor ¶
func (Success) Descriptor() protoreflect.EnumDescriptor
func (Success) EnumDescriptor
deprecated
func (Success) Number ¶
func (x Success) Number() protoreflect.EnumNumber
func (Success) Type ¶
func (Success) Type() protoreflect.EnumType