Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBearerToken ¶ added in v0.3.0
func GetBearerToken() string
GetBearerToken - Returns the bearer token
func ToError ¶
func ToError(e *APIErrorResponse) error
ToError - Converts an APIErrorResponse to an error
Types ¶
type APIErrorResponse ¶
type APIErrorResponse struct { Code string `json:"code"` Reason string `json:"reason"` Message string `json:"message"` }
func (*APIErrorResponse) FormatError ¶
func (e *APIErrorResponse) FormatError() string
FormatError - Formats the error
type Client ¶
type Client struct { *resty.Client Vmware *govcd.VCDClient Org *govcd.Org AdminOrg *govcd.AdminOrg }
func (*Client) GetEndpoint ¶ added in v0.6.0
GetEndpoint - Returns the API endpoint
func (*Client) GetOrganization ¶ added in v0.5.4
GetOrganization - Returns the organization
func (*Client) GetOrganizationID ¶ added in v0.6.0
GetOrganizationID - Returns the organization ID
func (*Client) GetUsername ¶ added in v0.5.4
GetUsername - Returns the username
type Opts ¶
type Opts struct { URL string `env:"URL,overwrite"` // Computed from Org if not provided Username string `env:"USERNAME,overwrite"` // Required Password string `env:"PASSWORD,overwrite"` // Required Org string `env:"ORG,overwrite"` // Required VDC string `env:"VDC,overwrite"` Debug bool `env:"DEBUG,overwrite"` VCDVersion string `env:"VCD_VERSION,overwrite,default=37.2"` Dev bool `env:"DEV,overwrite"` // Only for development }
Opts - Is a struct that contains the options for the vmware client
Click to show internal directories.
Click to hide internal directories.