internal

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Path                           = "/rest/com/vmware"
	SessionPath                    = "/cis/session"
	CategoryPath                   = "/cis/tagging/category"
	TagPath                        = "/cis/tagging/tag"
	AssociationPath                = "/cis/tagging/tag-association"
	LibraryPath                    = "/content/library"
	LibraryItemFileData            = "/cis/data"
	LibraryItemPath                = "/content/library/item"
	LibraryItemFilePath            = "/content/library/item/file"
	LibraryItemUpdateSession       = "/content/library/item/update-session"
	LibraryItemUpdateSessionFile   = "/content/library/item/updatesession/file"
	LibraryItemDownloadSession     = "/content/library/item/download-session"
	LibraryItemDownloadSessionFile = "/content/library/item/downloadsession/file"
	LocalLibraryPath               = "/content/local-library"
	VCenterOVFLibraryItem          = "/vcenter/ovf/library-item"
	SessionCookieName              = "vmware-api-session-id"
)

VAPI REST Paths

Variables

This section is empty.

Functions

This section is empty.

Types

type AssociatedObject

type AssociatedObject struct {
	Type  string `json:"type"`
	Value string `json:"id"`
}

AssociatedObject is the same structure as types.ManagedObjectReference, just with a different field name (ID instead of Value). In the API we use mo.Reference, this type is only used for wire transfer.

func (AssociatedObject) Reference

Reference implements mo.Reference

type Association

type Association struct {
	ObjectID *AssociatedObject `json:"object_id,omitempty"`
}

Association for tag-association requests.

func NewAssociation

func NewAssociation(ref mo.Reference) Association

NewAssociation returns an Association, converting ref to an AssociatedObject.

type CloneURL

type CloneURL interface {
	URL() *url.URL
}

CloneURL defines an interface for cloned urls

type Resource

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

Resource wraps url.URL with helpers

func URL

func URL(c CloneURL, path string) *Resource

URL creates a URL resource

func (*Resource) Request

func (r *Resource) Request(method string, body ...interface{}) *http.Request

Request returns a new http.Request for the given method. An optional body can be provided for POST and PATCH methods.

func (*Resource) String added in v0.21.0

func (r *Resource) String() string

func (*Resource) WithAction

func (r *Resource) WithAction(action string) *Resource

WithAction sets adds action to the URL.RawQuery

func (*Resource) WithID

func (r *Resource) WithID(id string) *Resource

WithID appends id to the URL.Path

func (*Resource) WithParameter added in v0.21.0

func (r *Resource) WithParameter(name string, value string) *Resource

WithParameter sets adds a parameter to the URL.RawQuery

Jump to

Keyboard shortcuts

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