Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec struct { }
Codec creates a CodecRequest to process each request.
func (*Codec) NewRequest ¶
func (c *Codec) NewRequest(r *http.Request) rpc.CodecRequest
NewRequest returns a CodecRequest.
type CodecRequest ¶
type CodecRequest struct {
// contains filtered or unexported fields
}
CodecRequest decodes and encodes a single request.
func (*CodecRequest) Method ¶
func (c *CodecRequest) Method() (string, error)
Method returns the RPC method for the current request.
The method uses a dotted notation as in "Service.Method".
func (*CodecRequest) ReadRequest ¶
func (c *CodecRequest) ReadRequest(args interface{}) error
ReadRequest fills the request object for the RPC method.
func (*CodecRequest) WriteResponse ¶
func (c *CodecRequest) WriteResponse(w http.ResponseWriter, reply interface{}, methodErr error) error
WriteResponse encodes the response and writes it to the ResponseWriter.
The err parameter is the error resulted from calling the RPC method, or nil if there was no error.
type RequestBody ¶
type RequestEnvelope ¶
type RequestEnvelope struct { XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"` Header []byte `xml:"http://schemas.xmlsoap.org/soap/envelope/ Header,omitempty"` Body RequestBody `xml:"http://schemas.xmlsoap.org/soap/envelope/ Body"` }
type ResponseBody ¶
type ResponseEnvelope ¶
type ResponseEnvelope struct { XMLName xml.Name `xml:"SOAP-ENV:Envelope"` ENV string `xml:"xmlns:SOAP-ENV,attr"` Header []byte `xml:"SOAP-ENV:Header,omitempty"` Body interface{} `xml:"SOAP-ENV:Body"` }
func NewFault ¶
func NewFault(c, s string, detail interface{}) *ResponseEnvelope
func NewResponse ¶
func NewResponse(data interface{}) *ResponseEnvelope
Click to show internal directories.
Click to hide internal directories.