Documentation ¶
Index ¶
- Variables
- type Callback
- type Data
- type Endpoints
- type Headers
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetContent() []byte
- func (x *Message) GetError() string
- func (x *Message) GetHeaders() *Headers
- func (x *Message) GetMethod() uint32
- func (x *Message) GetUri() string
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type Method
- type RequestCallback
- type URI
Constants ¶
This section is empty.
Variables ¶
var File_restLikeMessages_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Callback ¶
Callback serves as an Endpoint function to be called when a Request is received Should return the desired response to be sent back to the sender
type Data ¶
type Data []byte
Data provides a generic structure for data sent with a Request or received in a Message NOTE: The way this is encoded is up to the implementation. For example, protobuf or JSON
type Endpoints ¶
Endpoints represents a map of internal endpoints for a RestServer
type Headers ¶
type Headers struct { // Headers allows for custom headers to be included with a Request Headers []byte `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers,omitempty"` // Version allows for endpoints to be backwards-compatible // and handle different formats of the same Request Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` // contains filtered or unexported fields }
Headers allows different configurations for each Request that will be specified in the Request header
func (*Headers) Descriptor
deprecated
func (*Headers) GetHeaders ¶
func (*Headers) GetVersion ¶
func (*Headers) ProtoMessage ¶
func (*Headers) ProtoMessage()
func (*Headers) ProtoReflect ¶
func (x *Headers) ProtoReflect() protoreflect.Message
type Message ¶
type Message struct { Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` Headers *Headers `protobuf:"bytes,2,opt,name=headers,proto3" json:"headers,omitempty"` Method uint32 `protobuf:"varint,3,opt,name=method,proto3" json:"method,omitempty"` Uri string `protobuf:"bytes,4,opt,name=uri,proto3" json:"uri,omitempty"` Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
Message are used for sending to and receiving from a RestServer
func (*Message) Descriptor
deprecated
func (*Message) GetContent ¶
func (*Message) GetHeaders ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type RequestCallback ¶
type RequestCallback func(*Message)
RequestCallback provides the ability to make asynchronous Request in order to get the Message later without blocking