Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(url string, opts ClientOpts) *Client
New creates a new Client. This client is supposed to be shared between threads
func (*Client) ListOperations ¶
ListOperations lists all supported operations by the service
type ClientIface ¶
type ClientIface interface { ListOperations() ([]string, error) RawQuery(op Operation) ([]byte, error) Query(op Operation) (*etree.Document, error) }
ClientIface defines the interface for a SOAP Client. It makes mocking the client easier in your tests
type ClientOpts ¶
type ClientOpts struct { // Certificate is the tls certificate. It is mandatory Certificate tls.Certificate // Username for the UsernameToken as defined in https://www.oasis-open.org/committees/download.php/13392/wss-v1.1-spec-pr-UsernameTokenProfile-01.htm#_Toc104276211 Username string // Password for the UsernameToken as defined in https://www.oasis-open.org/committees/download.php/13392/wss-v1.1-spec-pr-UsernameTokenProfile-01.htm#_Toc104276211 Password string // Debug enables the verbose mode which prints output of steps. Use it only for development Debug bool // V1 set the v1 namespace value for the operation V1 string }
ClientOpts defines the possible options to pass to a client
type Operation ¶
type Operation struct { // Name is the name of the operation. It is mandatory. Name string // Data receives the data/body of the request for the operation. Mandatory. Data map[string]any // Validate runs a validation of the signature before sending the request. Use it only for development Validate bool V1 string SortKeysFn func([]string) }
Operation defines an operation for the SOAP service
func (Operation) MarshalXML ¶
MarshalXML marshals the Operation in XML. The keys of the operation Data are always sorted alphabetically.
Click to show internal directories.
Click to hide internal directories.