Documentation ¶
Index ¶
- Variables
- func IsRegularError(err error) bool
- func IsSoapFault(err error) bool
- func IsVimFault(err error) bool
- func ToRegularError(err error) error
- func ToVimFault(err error) types.BaseMethodFault
- func Wrap(err error) error
- func WrapRegularError(err error) error
- func WrapSoapFault(f *Fault) error
- func WrapVimFault(v types.BaseMethodFault) error
- type Client
- func (c *Client) DownloadFile(file string, u *url.URL, param *Download) error
- func (c *Client) MarshalJSON() ([]byte, error)
- func (c *Client) ParseURL(urlStr string) (*url.URL, error)
- func (c *Client) RoundTrip(reqBody, resBody HasFault) error
- func (c *Client) URL() url.URL
- func (c *Client) UnmarshalJSON(b []byte) error
- func (c *Client) Upload(f io.Reader, u *url.URL, param *Upload) error
- func (c *Client) UploadFile(file string, u *url.URL, param *Upload) error
- type Download
- type Envelope
- type Fault
- type HasFault
- type Header
- type RoundTripper
- type Upload
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultDownload = Download{
Method: "GET",
}
View Source
var DefaultUpload = Upload{
Type: "application/octet-stream",
Method: "PUT",
}
Functions ¶
func IsRegularError ¶
func IsSoapFault ¶
func IsVimFault ¶
func ToRegularError ¶
func ToVimFault ¶
func ToVimFault(err error) types.BaseMethodFault
func WrapRegularError ¶
func WrapSoapFault ¶
func WrapVimFault ¶
func WrapVimFault(v types.BaseMethodFault) error
Types ¶
type Client ¶
func (*Client) DownloadFile ¶
DownloadFile GETs the given URL to a local file
func (*Client) MarshalJSON ¶
func (*Client) ParseURL ¶
ParseURL wraps url.Parse to rewrite the URL.Host field In the case of VM guest uploads or NFC lease URLs, a Host field with a value of "*" is rewritten to the Client's URL.Host.
func (*Client) UnmarshalJSON ¶
type Fault ¶
type Fault struct { XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault"` Code string `xml:"faultcode"` String string `xml:"faultstring"` Detail struct { Fault types.AnyType `xml:",any"` } `xml:"detail"` }
func ToSoapFault ¶
type RoundTripper ¶
Click to show internal directories.
Click to hide internal directories.