soaphlp

package
v0.26.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultLog = func(...interface{}) error { return nil }

DefaultLog is the logging function in use.

View Source
var ErrBodyNotFound = errors.New("body not found")

Functions

func FindBody

func FindBody(w io.Writer, r io.Reader) (*xml.Decoder, error)

func GetLog

func GetLog(ctx context.Context) func(keyvalue ...interface{}) error

GetLog returns the Log function from the Context.

func WithLog

func WithLog(ctx context.Context, Log func(...interface{}) error) context.Context

WithLog returns the context with the "Log" value set to the given Log.

Types

type Caller

type Caller interface {
	Call(ctx context.Context, w io.Writer, method string, body io.Reader) (*xml.Decoder, error)
}

Caller is the client interface.

func NewClient

func NewClient(endpointURL, soapActionBase string, cl *http.Client) Caller

NewClient returns a new client for the given endpoint.

type Fault

type Fault struct {
	soaptrip.SoapFault
}

func (*Fault) Error

func (f *Fault) Error() string

func (*Fault) FaultCode

func (f *Fault) FaultCode() string

func (*Fault) FaultString

func (f *Fault) FaultString() string

func (*Fault) Response

func (f *Fault) Response() *http.Response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL