Documentation ¶
Index ¶
- Variables
- type Error
- type ErrorCode
- func (ErrorCode) Descriptor() protoreflect.EnumDescriptor
- func (x ErrorCode) Enum() *ErrorCode
- func (ErrorCode) EnumDescriptor() ([]byte, []int)deprecated
- func (x ErrorCode) Number() protoreflect.EnumNumber
- func (x ErrorCode) String() string
- func (ErrorCode) Type() protoreflect.EnumType
- func (x *ErrorCode) UnmarshalJSON(b []byte) errordeprecated
- type ErrorResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorCode_name = map[int32]string{ 500: "internal_server_error", 301: "moved_permanently", 302: "found", 400: "bad_request", 401: "not_authorized", 403: "forbidden", 404: "not_found", } ErrorCode_value = map[string]int32{ "internal_server_error": 500, "moved_permanently": 301, "found": 302, "bad_request": 400, "not_authorized": 401, "forbidden": 403, "not_found": 404, } )
Enum value maps for ErrorCode.
View Source
var File_router_proto_api_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { Code *int32 `protobuf:"varint,1,opt,name=code" json:"code,omitempty"` Title *ErrorCode `protobuf:"varint,2,opt,name=title,enum=nagax.router.api.ErrorCode" json:"title,omitempty"` // corresponds to code, e.g. not_found, internal_server_error Detail *string `protobuf:"bytes,3,opt,name=detail" json:"detail,omitempty"` // optional long message // contains filtered or unexported fields }
func (*Error) Descriptor
deprecated
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type ErrorCode ¶
type ErrorCode int32
func (ErrorCode) Descriptor ¶
func (ErrorCode) Descriptor() protoreflect.EnumDescriptor
func (ErrorCode) EnumDescriptor
deprecated
func (ErrorCode) Number ¶
func (x ErrorCode) Number() protoreflect.EnumNumber
func (ErrorCode) Type ¶
func (ErrorCode) Type() protoreflect.EnumType
func (*ErrorCode) UnmarshalJSON
deprecated
type ErrorResponse ¶
type ErrorResponse struct { Errors []*Error `protobuf:"bytes,1,rep,name=errors" json:"errors,omitempty"` // contains filtered or unexported fields }
func (*ErrorResponse) Descriptor
deprecated
func (*ErrorResponse) Descriptor() ([]byte, []int)
Deprecated: Use ErrorResponse.ProtoReflect.Descriptor instead.
func (*ErrorResponse) GetErrors ¶
func (x *ErrorResponse) GetErrors() []*Error
func (*ErrorResponse) ProtoMessage ¶
func (*ErrorResponse) ProtoMessage()
func (*ErrorResponse) ProtoReflect ¶
func (x *ErrorResponse) ProtoReflect() protoreflect.Message
func (*ErrorResponse) Reset ¶
func (x *ErrorResponse) Reset()
func (*ErrorResponse) String ¶
func (x *ErrorResponse) String() string
Click to show internal directories.
Click to hide internal directories.