rest

package
v0.0.0-...-3617f28 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*soap.Client
}

Client extends soap.Client to support JSON encoding, while inheriting security features, debug tracing and session persistence.

func NewClient

func NewClient(c *vim25.Client) *Client

NewClient creates a new Client instance.

func (*Client) Do

func (c *Client) Do(ctx context.Context, req *http.Request, resBody interface{}) error

Do sends the http.Request, decoding resBody if provided.

func (*Client) Login

func (c *Client) Login(ctx context.Context, user *url.Userinfo) error

Login creates a new session via Basic Authentication with the given url.Userinfo.

func (*Client) Logout

func (c *Client) Logout(ctx context.Context) error

Logout deletes the current session.

Jump to

Keyboard shortcuts

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