Documentation ¶
Index ¶
- func NewRequest(rw RequestWriter) (*http.Request, error)
- func NewResponse(rw ResponseWriter) (*http.Response, error)
- type AMQPRPCSettings
- type AMQPWriter
- type JSONRPCRequest
- type JSONRPCRequestReader
- type JSONRPCResponse
- type JSONRPCResponseReader
- type ReqParamsStruct
- type RequestWriter
- type RespParamsStruct
- type ResponseWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AMQPRPCSettings ¶
type AMQPRPCSettings struct { Exchange string ExchangeType string BindingKey string ConsumerTag string }
AMQPRPCSettings is ...
type AMQPWriter ¶
type AMQPWriter struct { ReplyTo string CorrelationID string Exchange string ExchangeType string AMQPConn *samqp.Connection Headers map[string][]string Status int }
AMQPWriter is ...
func AMQPFactory ¶
func AMQPFactory(ReplyTo, Exchange, ExchangeType, CorrelationID string, AMQPConn *samqp.Connection) (AMQPWriter, error)
AMQPFactory is ...
type JSONRPCRequest ¶
type JSONRPCRequest struct { Version string `json:"jsonrpc"` Method string `json:"method"` Params ReqParamsStruct `json:"params,omitempty"` ID string `json:"id,omitempty"` }
JSONRPCRequest is ...
type JSONRPCRequestReader ¶
type JSONRPCRequestReader struct {
// contains filtered or unexported fields
}
JSONRPCRequestReader is ...
func NewJSONRPCRequestReader ¶
func NewJSONRPCRequestReader(b []byte) (*JSONRPCRequestReader, error)
NewJSONRPCRequestReader is ...
func (*JSONRPCRequestReader) Headers ¶
func (j *JSONRPCRequestReader) Headers() http.Header
Headers is ...
func (*JSONRPCRequestReader) Reader ¶
func (j *JSONRPCRequestReader) Reader() io.Reader
Reader is ...
type JSONRPCResponse ¶
type JSONRPCResponse struct { Version string `json:"jsonrpc"` Result RespParamsStruct `json:"result,omitempty"` Error string `json:"error,omitempty"` ID string `json:"id,emitempty"` }
JSONRPCResponse is ...
type JSONRPCResponseReader ¶
type JSONRPCResponseReader struct {
// contains filtered or unexported fields
}
JSONRPCResponseReader is ...
func NewJSONRPCResponseReader ¶
func NewJSONRPCResponseReader(b []byte) (*JSONRPCResponseReader, error)
NewJSONRPCResponseReader is ...
func (*JSONRPCResponseReader) ContentLength ¶
func (j *JSONRPCResponseReader) ContentLength() int64
ContentLength is ...
func (*JSONRPCResponseReader) Headers ¶
func (j *JSONRPCResponseReader) Headers() http.Header
Headers is ...
func (*JSONRPCResponseReader) Reader ¶
func (j *JSONRPCResponseReader) Reader() io.ReadCloser
Reader is ...
func (*JSONRPCResponseReader) Status ¶
func (j *JSONRPCResponseReader) Status() string
Status is ...
func (*JSONRPCResponseReader) StatusCode ¶
func (j *JSONRPCResponseReader) StatusCode() int
StatusCode is ...
type ReqParamsStruct ¶
ReqParamsStruct is ...
type RequestWriter ¶
type RequestWriter interface { Headers() http.Header Method() string URL() string Reader() io.Reader }
RequestWriter is ...
type RespParamsStruct ¶
type RespParamsStruct struct { Status string `json:"status"` // Have this in resp StatusCode int `json:"statuscode"` // Proto string // ProtoMajor int // ProtoMinor int Header http.Header `json:"header"` // have this in amqp.go mq2http Body string `json:"body"` ContentLength int64 `json:"contentlength"` // = len(body) // TransferEncoding []string Close bool `json:"close"` // always false Uncompressed bool `json:"uncompressed"` // always true // Trailer http.Header `json:"trailer"` // same as headers Request *http.Request `json:"reqpest"` // nil }
RespParamsStruct is ....
type ResponseWriter ¶
type ResponseWriter interface { Status() string StatusCode() int Headers() http.Header Reader() io.ReadCloser ContentLength() int64 }
ResponseWriter is ...
Click to show internal directories.
Click to hide internal directories.