Documentation ¶
Index ¶
- Variables
- func ConfigHasTemplateVars(RawConfig *[]byte) int
- func MapSliceToMap(slice yaml.MapSlice, m map[string]interface{}) map[string]interface{}
- func Prettify(raw string, indent string) (pretty string, e error)
- type AsynchArgs
- type Client
- func (client *Client) AppendHeaders(r *http.Request, HeadersConfig interface{})
- func (client *Client) LoadConfig() error
- func (client *Client) PrepareConfig(message Message) (Config map[string]interface{})
- func (client *Client) Request(message Message) *http.Response
- func (client *Client) RequestAsync(ctx context.Context, message Message) (*http.Response, chan []byte)
- func (client *Client) RequestAsync2(message Message, responseChannel chan []byte)
- func (client *Client) RequestAsynch(message Message, args AsynchArgs)
- func (client *Client) RequestSync(message Message) (string, http.Header)
- func (client *Client) RequestSynch(message Message) string
- type ClientOptions
- type Extras
- type Message
- func (message *Message) GetSoapConfig() (config SoapConfig)
- func (message *Message) Prepare() ([]byte, error)
- func (message *Message) RenderNDCParams(enc *xml.Encoder, item interface{}, key string, attr []xml.Attr, index int, ...)
- func (message *Message) RenderNDCWrapper(enc *xml.Encoder, buf *bytes.Buffer, item interface{}, key string, root bool, ...)
- type Param
- type Params
- type SOAPBody
- type SOAPEnvelope
- type SoapConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var NDCSupportedMethods = map[string]struct{}{
"AirShoppingRQ": {},
"FlightPriceRQ": {},
"SeatAvailabilityRQ": {},
"ServiceListRQ": {},
"ServicePriceRQ": {},
"OrderCreateRQ": {},
"OrderRetrieveRQ": {},
"OrderListRQ": {},
"OrderCancelRQ": {},
"ItinReshopRQ": {},
}
View Source
var TemplateVars = []string{"request_name"}
Functions ¶
func ConfigHasTemplateVars ¶
func MapSliceToMap ¶
Types ¶
type AsynchArgs ¶
type Client ¶
type Client struct { Options ClientOptions HasTemplateVars bool Extras map[string]Extras Config map[string]yaml.MapSlice RawConfig []byte HttpClient *http.Client }
func (*Client) AppendHeaders ¶
func (*Client) LoadConfig ¶
func (*Client) PrepareConfig ¶
func (*Client) RequestAsync ¶
func (*Client) RequestAsync2 ¶
func (*Client) RequestAsynch ¶
func (client *Client) RequestAsynch(message Message, args AsynchArgs)
func (*Client) RequestSync ¶
func (*Client) RequestSynch ¶
type ClientOptions ¶
type ClientOptions struct {
ConfigPath string
}
type Message ¶
type Message struct { XMLName xml.Name Client *Client `xml:"-"` SoapConfig SoapConfig Method string `xml:"-"` Params Params `xml:"-"` IsSoap bool `xml:"-"` XMLNS string `xml:"xmlns,attr,omitempty"` XMLNSXSI string `xml:"xmlns:xsi,attr,omitempty"` EchoToken string `xml:"EchoToken,attr,omitempty"` TimeStamp string `xml:"TimeStamp,attr,omitempty"` Version string `xml:"Version,attr,omitempty"` TransactionIdentifier string `xml:"TransactionIdentifier,attr,omitempty"` Body string `xml:",innerxml"` ParamsBody string `xml:",innerxml"` }
func (*Message) GetSoapConfig ¶
func (message *Message) GetSoapConfig() (config SoapConfig)
func (*Message) RenderNDCParams ¶
type SOAPEnvelope ¶
Click to show internal directories.
Click to hide internal directories.