Documentation ¶
Index ¶
- Variables
- type Request
- type Response
- func (*Response) Descriptor() ([]byte, []int)deprecated
- func (x *Response) GetCode() ResponseCode
- func (x *Response) GetMsg() string
- func (x *Response) GetRequestId() string
- func (*Response) ProtoMessage()
- func (x *Response) ProtoReflect() protoreflect.Message
- func (x *Response) Reset()
- func (x *Response) String() string
- type ResponseCode
- func (ResponseCode) Descriptor() protoreflect.EnumDescriptor
- func (x ResponseCode) Enum() *ResponseCode
- func (ResponseCode) EnumDescriptor() ([]byte, []int)deprecated
- func (x ResponseCode) Number() protoreflect.EnumNumber
- func (x ResponseCode) String() string
- func (ResponseCode) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ResponseCode_name = map[int32]string{ 0: "OK", 400: "BAD_REQUEST", 401: "Unauthorized", 403: "FORBIDDEN", 404: "NOT_FOUND", 408: "TIMEOUT", 500: "INTERNAL_ERROR", } ResponseCode_value = map[string]int32{ "OK": 0, "BAD_REQUEST": 400, "Unauthorized": 401, "FORBIDDEN": 403, "NOT_FOUND": 404, "TIMEOUT": 408, "INTERNAL_ERROR": 500, } )
Enum value maps for ResponseCode.
View Source
var File_base_base_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Request ¶ added in v0.2.0
type Request struct { // We will generate an id for this request if id in request is empty. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The timeout in milliseconds of request. // A value <= 0 is no timeout. TimeoutMillis int32 `protobuf:"varint,2,opt,name=timeout_millis,json=timeoutMillis,proto3" json:"timeout_millis,omitempty"` // contains filtered or unexported fields }
The base request of services.
func (*Request) Descriptor
deprecated
added in
v0.2.0
func (*Request) GetTimeoutMillis ¶ added in v0.2.0
func (*Request) ProtoMessage ¶ added in v0.2.0
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶ added in v0.2.0
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶ added in v0.2.0
type Response struct { // It will be the id in request if passed or an id generated by the service. RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // The status code of this response. Code ResponseCode `protobuf:"varint,2,opt,name=code,proto3,enum=base.ResponseCode" json:"code,omitempty"` // The message of response. Msg string `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
The base response of services.
func (*Response) Descriptor
deprecated
added in
v0.2.0
func (*Response) GetCode ¶ added in v0.2.0
func (x *Response) GetCode() ResponseCode
func (*Response) GetRequestId ¶ added in v0.2.0
func (*Response) ProtoMessage ¶ added in v0.2.0
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶ added in v0.2.0
func (x *Response) ProtoReflect() protoreflect.Message
type ResponseCode ¶ added in v0.2.0
type ResponseCode int32
All response codes of avino-plan services.
const ( ResponseCode_OK ResponseCode = 0 ResponseCode_BAD_REQUEST ResponseCode = 400 ResponseCode_FORBIDDEN ResponseCode = 403 ResponseCode_NOT_FOUND ResponseCode = 404 ResponseCode_TIMEOUT ResponseCode = 408 ResponseCode_INTERNAL_ERROR ResponseCode = 500 )
func (ResponseCode) Descriptor ¶ added in v0.2.0
func (ResponseCode) Descriptor() protoreflect.EnumDescriptor
func (ResponseCode) Enum ¶ added in v0.2.0
func (x ResponseCode) Enum() *ResponseCode
func (ResponseCode) EnumDescriptor
deprecated
added in
v0.2.0
func (ResponseCode) EnumDescriptor() ([]byte, []int)
Deprecated: Use ResponseCode.Descriptor instead.
func (ResponseCode) Number ¶ added in v0.2.0
func (x ResponseCode) Number() protoreflect.EnumNumber
func (ResponseCode) String ¶ added in v0.2.0
func (x ResponseCode) String() string
func (ResponseCode) Type ¶ added in v0.2.0
func (ResponseCode) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.