ecall

package
v0.0.0-...-689a9a2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Predefined WSS namespaces to be used in
	WssNsWSSE string = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
	WssNsWSU  string = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
	WssNsType string = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayOfAttachment

type ArrayOfAttachment struct {
	XMLName xml.Name `xml:"eCallWebservice ArrayOfAttachment"`

	Attachment []*Attachment `xml:"Attachment,omitempty"`
}

type Attachment

type Attachment struct {
	XMLName xml.Name `xml:"eCallWebservice Attachment"`

	FileName string `xml:"FileName,omitempty"`

	FileContent []byte `xml:"FileContent,omitempty"`
}

type BasicAuth

type BasicAuth struct {
	Login    string
	Password string
}

type ECallSoap

type ECallSoap struct {
	// contains filtered or unexported fields
}

func NewECallSoap

func NewECallSoap(url string, tls bool, auth *BasicAuth) *ECallSoap

func NewECallSoapWithTLSConfig

func NewECallSoapWithTLSConfig(url string, tlsCfg *tls.Config, auth *BasicAuth) *ECallSoap

func (*ECallSoap) AddHeader

func (service *ECallSoap) AddHeader(header interface{})

func (*ECallSoap) GetStateBasic

func (service *ECallSoap) GetStateBasic(request *GetStateBasic) (*GetStateBasicResponse, error)

Use this method to check the status of a message. <br>

func (*ECallSoap) SendFax

func (service *ECallSoap) SendFax(request *SendFax) (*SendFaxResponse, error)

Use this method to send a fax message with attachments. <br>

func (*ECallSoap) SendFaxBasic

func (service *ECallSoap) SendFaxBasic(request *SendFaxBasic) (*SendFaxBasicResponse, error)

Use this method to send a basic fax message without attachments. <br>

func (*ECallSoap) SendSMSBasic

func (service *ECallSoap) SendSMSBasic(request *SendSMSBasic) (*SendSMSBasicResponse, error)

Use this method to send a SMS to a handy or swiss pager.

func (*ECallSoap) SendVoiceBasic

func (service *ECallSoap) SendVoiceBasic(request *SendVoiceBasic) (*SendVoiceBasicResponse, error)

Use this method to send a voice message to a phone. <br>

func (*ECallSoap) SetHeader

func (service *ECallSoap) SetHeader(header interface{})

Backwards-compatible function: use AddHeader instead

type GetStateBasic

type GetStateBasic struct {
	XMLName xml.Name `xml:"eCallWebservice GetStateBasic"`

	AccountName string `xml:"AccountName,omitempty"`

	AccountPassword string `xml:"AccountPassword,omitempty"`

	JobID string `xml:"JobID,omitempty"`

	Address string `xml:"Address,omitempty"`
}

type GetStateBasicResponse

type GetStateBasicResponse struct {
	XMLName xml.Name `xml:"eCallWebservice GetStateBasicResponse"`

	GetStateBasicResult *StatusResponse `xml:"GetStateBasicResult,omitempty"`
}

type JobResponseDetail

type JobResponseDetail struct {
	XMLName xml.Name `xml:"eCallWebservice JobResponseDetail"`

	JobID string `xml:"JobID,omitempty"`

	Address string `xml:"Address,omitempty"`

	JobType int64 `xml:"JobType,omitempty"`

	SendState int64 `xml:"SendState,omitempty"`

	ErrorState int64 `xml:"ErrorState,omitempty"`

	PointsUsed float64 `xml:"PointsUsed,omitempty"`

	FinishDate time.Time `xml:"FinishDate,omitempty"`
}

type Response

type Response struct {
	XMLName xml.Name

	ResponseCode int64 `xml:"ResponseCode,omitempty"`

	ResponseText string `xml:"ResponseText,omitempty"`
}

type SOAPBody

type SOAPBody struct {
	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Body"`

	Fault   *SOAPFault  `xml:",omitempty"`
	Content interface{} `xml:",omitempty"`
}

func (*SOAPBody) UnmarshalXML

func (b *SOAPBody) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type SOAPClient

type SOAPClient struct {
	// contains filtered or unexported fields
}

func NewSOAPClient

func NewSOAPClient(url string, insecureSkipVerify bool, auth *BasicAuth) *SOAPClient

func NewSOAPClientWithTLSConfig

func NewSOAPClientWithTLSConfig(url string, tlsCfg *tls.Config, auth *BasicAuth) *SOAPClient

func (*SOAPClient) AddHeader

func (s *SOAPClient) AddHeader(header interface{})

func (*SOAPClient) Call

func (s *SOAPClient) Call(soapAction string, request, response interface{}) error

type SOAPEnvelope

type SOAPEnvelope struct {
	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
	Header  *SOAPHeader
	Body    SOAPBody
}

type SOAPFault

type SOAPFault struct {
	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault"`

	Code   string `xml:"faultcode,omitempty"`
	String string `xml:"faultstring,omitempty"`
	Actor  string `xml:"faultactor,omitempty"`
	Detail string `xml:"detail,omitempty"`
}

func (*SOAPFault) Error

func (f *SOAPFault) Error() string

type SOAPHeader

type SOAPHeader struct {
	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Header"`

	Items []interface{} `xml:",omitempty"`
}

type SendFax

type SendFax struct {
	XMLName xml.Name `xml:"eCallWebservice SendFax"`

	AccountName string `xml:"AccountName,omitempty"`

	AccountPassword string `xml:"AccountPassword,omitempty"`

	Address string `xml:"Address,omitempty"`

	Message string `xml:"Message,omitempty"`

	JobID string `xml:"JobID,omitempty"`

	FromText string `xml:"FromText,omitempty"`

	FaxHeaderID string `xml:"FaxHeaderID,omitempty"`

	FaxHeaderInfo string `xml:"FaxHeaderInfo,omitempty"`

	Subject string `xml:"Subject,omitempty"`

	SendDate string `xml:"SendDate,omitempty"`

	Files *ArrayOfAttachment `xml:"Files,omitempty"`

	Notification string `xml:"Notification,omitempty"`

	TokenFields string `xml:"TokenFields,omitempty"`
}

type SendFaxBasic

type SendFaxBasic struct {
	XMLName xml.Name `xml:"eCallWebservice SendFaxBasic"`

	AccountName string `xml:"AccountName,omitempty"`

	AccountPassword string `xml:"AccountPassword,omitempty"`

	Address string `xml:"Address,omitempty"`

	Message string `xml:"Message,omitempty"`

	JobID string `xml:"JobID,omitempty"`

	FromText string `xml:"FromText,omitempty"`

	Subject string `xml:"Subject,omitempty"`

	SendDate string `xml:"SendDate,omitempty"`
}

type SendFaxBasicResponse

type SendFaxBasicResponse struct {
	XMLName xml.Name `xml:"eCallWebservice SendFaxBasicResponse"`

	SendFaxBasicResult *Response `xml:"SendFaxBasicResult,omitempty"`
}

type SendFaxResponse

type SendFaxResponse struct {
	XMLName xml.Name `xml:"eCallWebservice SendFaxResponse"`

	SendFaxResult *Response `xml:"SendFaxResult,omitempty"`
}

type SendSMSBasic

type SendSMSBasic struct {
	XMLName xml.Name `xml:"eCallWebservice SendSMSBasic"`

	AccountName string `xml:"AccountName,omitempty"`

	AccountPassword string `xml:"AccountPassword,omitempty"`

	Address string `xml:"Address,omitempty"`

	Message string `xml:"Message,omitempty"`

	JobID string `xml:"JobID,omitempty"`

	SMSCallback string `xml:"SMSCallback,omitempty"`

	Notification string `xml:"Notification,omitempty"`

	Answer string `xml:"Answer,omitempty"`

	SendDate string `xml:"SendDate,omitempty"`

	MsgType string `xml:"MsgType,omitempty"`

	NoLog string `xml:"NoLog,omitempty"`

	AlwaysNotification string `xml:"AlwaysNotification,omitempty"`
}

type SendSMSBasicResponse

type SendSMSBasicResponse struct {
	XMLName xml.Name `xml:"eCallWebservice SendSMSBasicResponse"`

	SendSMSBasicResult *Response `xml:"SendSMSBasicResult,omitempty"`
}

type SendVoiceBasic

type SendVoiceBasic struct {
	XMLName xml.Name `xml:"eCallWebservice SendVoiceBasic"`

	AccountName string `xml:"AccountName,omitempty"`

	AccountPassword string `xml:"AccountPassword,omitempty"`

	Address string `xml:"Address,omitempty"`

	Message string `xml:"Message,omitempty"`

	JobID string `xml:"JobID,omitempty"`

	MsgLanguage string `xml:"MsgLanguage,omitempty"`

	FromText string `xml:"FromText,omitempty"`

	SendDate string `xml:"SendDate,omitempty"`
}

type SendVoiceBasicResponse

type SendVoiceBasicResponse struct {
	XMLName xml.Name `xml:"eCallWebservice SendVoiceBasicResponse"`

	SendVoiceBasicResult *Response `xml:"SendVoiceBasicResult,omitempty"`
}

type StatusResponse

type StatusResponse struct {
	XMLName xml.Name `xml:"eCallWebservice StatusResponse"`

	ServiceResponse *Response `xml:"ServiceResponse,omitempty"`

	JobResponse *JobResponseDetail `xml:"JobResponse,omitempty"`
}

type WSSPassword

type WSSPassword struct {
	XMLName   xml.Name `xml:"wsse:Password"`
	XmlNSWsse string   `xml:"xmlns:wsse,attr"`
	XmlNSType string   `xml:"Type,attr"`

	Data string `xml:",chardata"`
}

type WSSSecurityHeader

type WSSSecurityHeader struct {
	XMLName   xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ wsse:Security"`
	XmlNSWsse string   `xml:"xmlns:wsse,attr"`

	MustUnderstand string `xml:"mustUnderstand,attr,omitempty"`

	Token *WSSUsernameToken `xml:",omitempty"`
}

func NewWSSSecurityHeader

func NewWSSSecurityHeader(user, pass, mustUnderstand string) *WSSSecurityHeader

type WSSUsername

type WSSUsername struct {
	XMLName   xml.Name `xml:"wsse:Username"`
	XmlNSWsse string   `xml:"xmlns:wsse,attr"`

	Data string `xml:",chardata"`
}

type WSSUsernameToken

type WSSUsernameToken struct {
	XMLName   xml.Name `xml:"wsse:UsernameToken"`
	XmlNSWsu  string   `xml:"xmlns:wsu,attr"`
	XmlNSWsse string   `xml:"xmlns:wsse,attr"`

	Id string `xml:"wsu:Id,attr,omitempty"`

	Username *WSSUsername `xml:",omitempty"`
	Password *WSSPassword `xml:",omitempty"`
}

Jump to

Keyboard shortcuts

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