Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotAFunc = errors.New("must be a func") ErrWrongArgumentCount = errors.New("must have exactly two arguments") ErrFirstArgumentWrongType = errors.New("first argument must be a struct") ErrSecondArgumentWrongType = errors.New("second argument must be *http.Request") ErrWrongReturnValueCount = errors.New("must have exactly two return values") ErrFirstReturnValueWrongType = errors.New("first return value must be a struct") ErrSecondReturnValueWrongType = errors.New("second return value must be error") )
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action interface { EmptyArguments() interface{} Handle(interface{}, *http.Request) (interface{}, error) }
Action is a SOAP action
func ActionFunc ¶
ActionFunc converts a function into an Action. The function must conform to the func(A, *http.Request) (B, error) signature where A and B are struct types.
type Fault ¶
type Fault struct { XMLName xml.Name `xml:"Fault"` Code string `xml:"faultcode"` Message string `xml:"faultstring"` Actor string `xml:"faultactor,omitempty"` Detail string `xml:"detail,omitempty"` }
Fault is used to send errors
func ConvertError ¶
Error converts any error into a SOAP Fault
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server holds the action map and can serve SOAP through HTTP
func (*Server) RegisterAction ¶
RegisterAction adds a Handler for a given action
Click to show internal directories.
Click to hide internal directories.