Documentation
¶
Index ¶
- func CodeToGRPC(v Code) uint32
- func GlobalizeCommonFail(c *Code)
- func GlobalizeSuccess(c *Code)
- func IsCommonFail(c Code) bool
- func IsInSection(code Code, sec uint32) bool
- func IsSuccess(c Code) bool
- func LocalizeCommonFail(c *Code)
- func LocalizeSuccess(c *Code)
- type Code
- type Detail
- func (x *Detail) FromGRPCMessage(m grpc.Message) error
- func (x *Detail) ID() uint32
- func (x *Detail) SetID(id uint32)
- func (x *Detail) SetValue(val []byte)
- func (x *Detail) StableMarshal(buf []byte) ([]byte, error)
- func (x *Detail) StableSize() (size int)
- func (x *Detail) ToGRPCMessage() grpc.Message
- func (x *Detail) Unmarshal(data []byte) error
- func (x *Detail) Value() []byte
- type Status
- func (x *Status) Code() Code
- func (x *Status) FromGRPCMessage(m grpc.Message) error
- func (x *Status) IterateDetails(f func(*Detail) bool)
- func (x *Status) Message() string
- func (x *Status) NumberOfDetails() int
- func (x *Status) SetCode(code Code)
- func (x *Status) SetDetails(v []*Detail)
- func (x *Status) SetMessage(msg string)
- func (x *Status) StableMarshal(buf []byte) ([]byte, error)
- func (x *Status) StableSize() (size int)
- func (x *Status) ToGRPCMessage() grpc.Message
- func (x *Status) Unmarshal(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CodeToGRPC ¶
func GlobalizeCommonFail ¶
func GlobalizeCommonFail(c *Code)
GlobalizeCommonFail globalizes the Code to the common fail section.
func GlobalizeSuccess ¶
func GlobalizeSuccess(c *Code)
GlobalizeSuccess globalizes the Code to the success section.
func IsCommonFail ¶
IsCommonFail checks if the Code is a common failure code.
func IsInSection ¶
IsInSection returns true if the Code belongs to sec-th section.
func LocalizeCommonFail ¶
func LocalizeCommonFail(c *Code)
LocalizeCommonFail localizes the Code to the common fail section.
func LocalizeSuccess ¶
func LocalizeSuccess(c *Code)
LocalizeSuccess localizes the Code to the success section.
Types ¶
type Code ¶
type Code uint32
Code represents NeoFS API V2-compatible status code.
Common failure codes.
func CodeFromGRPC ¶
func (*Code) GlobalizeSection ¶
GlobalizeSection globalizes the Code of the sec-th section.
Does not make sense if the Code is outside the section.
func (Code) InSections ¶
InSections checks if the Code is in [i,j] section list.
func (*Code) LocalizeSection ¶
LocalizeSection localizes the Code to the sec-th section.
Does not make sense if the Code is outside the section.
type Detail ¶
type Detail struct {
// contains filtered or unexported fields
}
Detail represents structure of NeoFS API V2-compatible status detail message.
func (*Detail) StableSize ¶
func (*Detail) ToGRPCMessage ¶
type Status ¶
type Status struct {
// contains filtered or unexported fields
}
Status represents structure of NeoFS API V2-compatible status return message.
func (*Status) IterateDetails ¶
IterateDetails iterates over details of the Status. Breaks iteration on f's true return.
Handler must not be nil.
func (*Status) NumberOfDetails ¶
NumberOfParameters returns number of network parameters.
func (*Status) SetDetails ¶
SetDetails sets Detail list of the Status.
func (*Status) SetMessage ¶
SetMessage sets message of the Status.