Documentation
¶
Overview ¶
Package client provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT.
Index ¶
- func NewCreateProxmoxHostRequest(server string, body CreateProxmoxHostJSONRequestBody) (*http.Request, error)
- func NewCreateProxmoxHostRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateProxmoxVmiRequest(server string, body CreateProxmoxVmiJSONRequestBody) (*http.Request, error)
- func NewCreateProxmoxVmiRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateVmRequest(server string, body CreateVmJSONRequestBody) (*http.Request, error)
- func NewCreateVmRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteVmRequest(server string, id int32) (*http.Request, error)
- func NewGetVmRequest(server string, id int32) (*http.Request, error)
- func NewListHostsRequest(server string) (*http.Request, error)
- func NewListVmisRequest(server string) (*http.Request, error)
- func NewRebootVmRequest(server string, id int32) (*http.Request, error)
- func NewStartVmRequest(server string, id int32) (*http.Request, error)
- func NewStopVmRequest(server string, id int32) (*http.Request, error)
- func NewUpdateVmRequest(server string, id int32, body UpdateVmJSONRequestBody) (*http.Request, error)
- func NewUpdateVmRequestWithBody(server string, id int32, contentType string, body io.Reader) (*http.Request, error)
- type Client
- func (c *Client) CreateProxmoxHost(ctx context.Context, body CreateProxmoxHostJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateProxmoxHostWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateProxmoxVmi(ctx context.Context, body CreateProxmoxVmiJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateProxmoxVmiWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateVm(ctx context.Context, body CreateVmJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateVmWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteVm(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetVm(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListHosts(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListVmis(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) RebootVm(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) StartVm(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) StopVm(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) UpdateVm(ctx context.Context, id int32, body UpdateVmJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateVmWithBody(ctx context.Context, id int32, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateProxmoxHostWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateProxmoxHostResponse, error)
- func (c *ClientWithResponses) CreateProxmoxHostWithResponse(ctx context.Context, body CreateProxmoxHostJSONRequestBody, ...) (*CreateProxmoxHostResponse, error)
- func (c *ClientWithResponses) CreateProxmoxVmiWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateProxmoxVmiResponse, error)
- func (c *ClientWithResponses) CreateProxmoxVmiWithResponse(ctx context.Context, body CreateProxmoxVmiJSONRequestBody, ...) (*CreateProxmoxVmiResponse, error)
- func (c *ClientWithResponses) CreateVmWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateVmResponse, error)
- func (c *ClientWithResponses) CreateVmWithResponse(ctx context.Context, body CreateVmJSONRequestBody, ...) (*CreateVmResponse, error)
- func (c *ClientWithResponses) DeleteVmWithResponse(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*DeleteVmResponse, error)
- func (c *ClientWithResponses) GetVmWithResponse(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*GetVmResponse, error)
- func (c *ClientWithResponses) ListHostsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListHostsResponse, error)
- func (c *ClientWithResponses) ListVmisWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListVmisResponse, error)
- func (c *ClientWithResponses) RebootVmWithResponse(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*RebootVmResponse, error)
- func (c *ClientWithResponses) StartVmWithResponse(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*StartVmResponse, error)
- func (c *ClientWithResponses) StopVmWithResponse(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*StopVmResponse, error)
- func (c *ClientWithResponses) UpdateVmWithBodyWithResponse(ctx context.Context, id int32, contentType string, body io.Reader, ...) (*UpdateVmResponse, error)
- func (c *ClientWithResponses) UpdateVmWithResponse(ctx context.Context, id int32, body UpdateVmJSONRequestBody, ...) (*UpdateVmResponse, error)
- type ClientWithResponsesInterface
- type CreateProxmoxHostJSONBody
- type CreateProxmoxHostJSONRequestBody
- type CreateProxmoxHostResponse
- type CreateProxmoxVmiJSONBody
- type CreateProxmoxVmiJSONRequestBody
- type CreateProxmoxVmiResponse
- type CreateVmJSONBody
- type CreateVmJSONRequestBody
- type CreateVmResponse
- type DeleteVmResponse
- type Error
- type ErrorCode
- type GetVmResponse
- type Host
- type HostCollection
- type HostStatus
- type HttpRequestDoer
- type ListHostsResponse
- type ListVmisResponse
- type NetworkInterface
- type RebootVmResponse
- type RequestEditorFn
- type StartVmResponse
- type StopVmResponse
- type UpdateVmJSONBody
- type UpdateVmJSONRequestBody
- type UpdateVmResponse
- type VirtualMachine
- type VirtualMachineImage
- type VirtualMachineImageCollection
- type VirtualMachineStatus
- type Volume
- type VolumeStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreateProxmoxHostRequest ¶ added in v0.5.0
func NewCreateProxmoxHostRequest(server string, body CreateProxmoxHostJSONRequestBody) (*http.Request, error)
NewCreateProxmoxHostRequest calls the generic CreateProxmoxHost builder with application/json body
func NewCreateProxmoxHostRequestWithBody ¶ added in v0.5.0
func NewCreateProxmoxHostRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateProxmoxHostRequestWithBody generates requests for CreateProxmoxHost with any type of body
func NewCreateProxmoxVmiRequest ¶ added in v0.5.0
func NewCreateProxmoxVmiRequest(server string, body CreateProxmoxVmiJSONRequestBody) (*http.Request, error)
NewCreateProxmoxVmiRequest calls the generic CreateProxmoxVmi builder with application/json body
func NewCreateProxmoxVmiRequestWithBody ¶ added in v0.5.0
func NewCreateProxmoxVmiRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateProxmoxVmiRequestWithBody generates requests for CreateProxmoxVmi with any type of body
func NewCreateVmRequest ¶
func NewCreateVmRequest(server string, body CreateVmJSONRequestBody) (*http.Request, error)
NewCreateVmRequest calls the generic CreateVm builder with application/json body
func NewCreateVmRequestWithBody ¶
func NewCreateVmRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateVmRequestWithBody generates requests for CreateVm with any type of body
func NewDeleteVmRequest ¶
NewDeleteVmRequest generates requests for DeleteVm
func NewGetVmRequest ¶
NewGetVmRequest generates requests for GetVm
func NewListHostsRequest ¶
NewListHostsRequest generates requests for ListHosts
func NewListVmisRequest ¶
NewListVmisRequest generates requests for ListVmis
func NewRebootVmRequest ¶ added in v0.4.0
NewRebootVmRequest generates requests for RebootVm
func NewStartVmRequest ¶
NewStartVmRequest generates requests for StartVm
func NewStopVmRequest ¶
NewStopVmRequest generates requests for StopVm
func NewUpdateVmRequest ¶ added in v0.3.0
func NewUpdateVmRequest(server string, id int32, body UpdateVmJSONRequestBody) (*http.Request, error)
NewUpdateVmRequest calls the generic UpdateVm builder with application/json body
Types ¶
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CreateProxmoxHost ¶ added in v0.5.0
func (c *Client) CreateProxmoxHost(ctx context.Context, body CreateProxmoxHostJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateProxmoxHostWithBody ¶ added in v0.5.0
func (*Client) CreateProxmoxVmi ¶ added in v0.5.0
func (c *Client) CreateProxmoxVmi(ctx context.Context, body CreateProxmoxVmiJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateProxmoxVmiWithBody ¶ added in v0.5.0
func (*Client) CreateVm ¶
func (c *Client) CreateVm(ctx context.Context, body CreateVmJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateVmWithBody ¶
type ClientInterface ¶
type ClientInterface interface {
// ListHosts request
ListHosts(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateProxmoxHostWithBody request with any body
CreateProxmoxHostWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateProxmoxHost(ctx context.Context, body CreateProxmoxHostJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListVmis request
ListVmis(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateProxmoxVmiWithBody request with any body
CreateProxmoxVmiWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateProxmoxVmi(ctx context.Context, body CreateProxmoxVmiJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateVmWithBody request with any body
CreateVmWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateVm(ctx context.Context, body CreateVmJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteVm request
DeleteVm(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetVm request
GetVm(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateVmWithBody request with any body
UpdateVmWithBody(ctx context.Context, id int32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateVm(ctx context.Context, id int32, body UpdateVmJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// RebootVm request
RebootVm(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*http.Response, error)
// StartVm request
StartVm(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*http.Response, error)
// StopVm request
StopVm(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CreateProxmoxHostWithBodyWithResponse ¶ added in v0.5.0
func (c *ClientWithResponses) CreateProxmoxHostWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProxmoxHostResponse, error)
CreateProxmoxHostWithBodyWithResponse request with arbitrary body returning *CreateProxmoxHostResponse
func (*ClientWithResponses) CreateProxmoxHostWithResponse ¶ added in v0.5.0
func (c *ClientWithResponses) CreateProxmoxHostWithResponse(ctx context.Context, body CreateProxmoxHostJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProxmoxHostResponse, error)
func (*ClientWithResponses) CreateProxmoxVmiWithBodyWithResponse ¶ added in v0.5.0
func (c *ClientWithResponses) CreateProxmoxVmiWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProxmoxVmiResponse, error)
CreateProxmoxVmiWithBodyWithResponse request with arbitrary body returning *CreateProxmoxVmiResponse
func (*ClientWithResponses) CreateProxmoxVmiWithResponse ¶ added in v0.5.0
func (c *ClientWithResponses) CreateProxmoxVmiWithResponse(ctx context.Context, body CreateProxmoxVmiJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProxmoxVmiResponse, error)
func (*ClientWithResponses) CreateVmWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateVmWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateVmResponse, error)
CreateVmWithBodyWithResponse request with arbitrary body returning *CreateVmResponse
func (*ClientWithResponses) CreateVmWithResponse ¶
func (c *ClientWithResponses) CreateVmWithResponse(ctx context.Context, body CreateVmJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateVmResponse, error)
func (*ClientWithResponses) DeleteVmWithResponse ¶
func (c *ClientWithResponses) DeleteVmWithResponse(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*DeleteVmResponse, error)
DeleteVmWithResponse request returning *DeleteVmResponse
func (*ClientWithResponses) GetVmWithResponse ¶
func (c *ClientWithResponses) GetVmWithResponse(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*GetVmResponse, error)
GetVmWithResponse request returning *GetVmResponse
func (*ClientWithResponses) ListHostsWithResponse ¶
func (c *ClientWithResponses) ListHostsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListHostsResponse, error)
ListHostsWithResponse request returning *ListHostsResponse
func (*ClientWithResponses) ListVmisWithResponse ¶
func (c *ClientWithResponses) ListVmisWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListVmisResponse, error)
ListVmisWithResponse request returning *ListVmisResponse
func (*ClientWithResponses) RebootVmWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) RebootVmWithResponse(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*RebootVmResponse, error)
RebootVmWithResponse request returning *RebootVmResponse
func (*ClientWithResponses) StartVmWithResponse ¶
func (c *ClientWithResponses) StartVmWithResponse(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*StartVmResponse, error)
StartVmWithResponse request returning *StartVmResponse
func (*ClientWithResponses) StopVmWithResponse ¶
func (c *ClientWithResponses) StopVmWithResponse(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*StopVmResponse, error)
StopVmWithResponse request returning *StopVmResponse
func (*ClientWithResponses) UpdateVmWithBodyWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) UpdateVmWithBodyWithResponse(ctx context.Context, id int32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateVmResponse, error)
UpdateVmWithBodyWithResponse request with arbitrary body returning *UpdateVmResponse
func (*ClientWithResponses) UpdateVmWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) UpdateVmWithResponse(ctx context.Context, id int32, body UpdateVmJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateVmResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ListHostsWithResponse request
ListHostsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListHostsResponse, error)
// CreateProxmoxHostWithBodyWithResponse request with any body
CreateProxmoxHostWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProxmoxHostResponse, error)
CreateProxmoxHostWithResponse(ctx context.Context, body CreateProxmoxHostJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProxmoxHostResponse, error)
// ListVmisWithResponse request
ListVmisWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListVmisResponse, error)
// CreateProxmoxVmiWithBodyWithResponse request with any body
CreateProxmoxVmiWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProxmoxVmiResponse, error)
CreateProxmoxVmiWithResponse(ctx context.Context, body CreateProxmoxVmiJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProxmoxVmiResponse, error)
// CreateVmWithBodyWithResponse request with any body
CreateVmWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateVmResponse, error)
CreateVmWithResponse(ctx context.Context, body CreateVmJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateVmResponse, error)
// DeleteVmWithResponse request
DeleteVmWithResponse(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*DeleteVmResponse, error)
// GetVmWithResponse request
GetVmWithResponse(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*GetVmResponse, error)
// UpdateVmWithBodyWithResponse request with any body
UpdateVmWithBodyWithResponse(ctx context.Context, id int32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateVmResponse, error)
UpdateVmWithResponse(ctx context.Context, id int32, body UpdateVmJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateVmResponse, error)
// RebootVmWithResponse request
RebootVmWithResponse(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*RebootVmResponse, error)
// StartVmWithResponse request
StartVmWithResponse(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*StartVmResponse, error)
// StopVmWithResponse request
StopVmWithResponse(ctx context.Context, id int32, reqEditors ...RequestEditorFn) (*StopVmResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateProxmoxHostJSONBody ¶ added in v0.5.0
type CreateProxmoxHostJSONBody struct {
IpAddress string `json:"ip_address"`
Name string `json:"name"`
SshPassword *string `json:"ssh_password,omitempty"`
SshUsername *string `json:"ssh_username,omitempty"`
}
CreateProxmoxHostJSONBody defines parameters for CreateProxmoxHost.
type CreateProxmoxHostJSONRequestBody ¶ added in v0.5.0
type CreateProxmoxHostJSONRequestBody CreateProxmoxHostJSONBody
CreateProxmoxHostJSONRequestBody defines body for CreateProxmoxHost for application/json ContentType.
type CreateProxmoxHostResponse ¶ added in v0.5.0
type CreateProxmoxHostResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *Host
JSON400 *Error
}
func ParseCreateProxmoxHostResponse ¶ added in v0.5.0
func ParseCreateProxmoxHostResponse(rsp *http.Response) (*CreateProxmoxHostResponse, error)
ParseCreateProxmoxHostResponse parses an HTTP response from a CreateProxmoxHostWithResponse call
func (CreateProxmoxHostResponse) Status ¶ added in v0.5.0
func (r CreateProxmoxHostResponse) Status() string
Status returns HTTPResponse.Status
func (CreateProxmoxHostResponse) StatusCode ¶ added in v0.5.0
func (r CreateProxmoxHostResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateProxmoxVmiJSONBody ¶ added in v0.5.0
type CreateProxmoxVmiJSONBody struct {
Name string `json:"name"`
Sha256 string `json:"sha256"`
Url string `json:"url"`
}
CreateProxmoxVmiJSONBody defines parameters for CreateProxmoxVmi.
type CreateProxmoxVmiJSONRequestBody ¶ added in v0.5.0
type CreateProxmoxVmiJSONRequestBody CreateProxmoxVmiJSONBody
CreateProxmoxVmiJSONRequestBody defines body for CreateProxmoxVmi for application/json ContentType.
type CreateProxmoxVmiResponse ¶ added in v0.5.0
type CreateProxmoxVmiResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *VirtualMachineImage
JSON400 *Error
}
func ParseCreateProxmoxVmiResponse ¶ added in v0.5.0
func ParseCreateProxmoxVmiResponse(rsp *http.Response) (*CreateProxmoxVmiResponse, error)
ParseCreateProxmoxVmiResponse parses an HTTP response from a CreateProxmoxVmiWithResponse call
func (CreateProxmoxVmiResponse) Status ¶ added in v0.5.0
func (r CreateProxmoxVmiResponse) Status() string
Status returns HTTPResponse.Status
func (CreateProxmoxVmiResponse) StatusCode ¶ added in v0.5.0
func (r CreateProxmoxVmiResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateVmJSONBody ¶
type CreateVmJSONBody struct {
Cores int32 `json:"cores"`
HostId *int32 `json:"host_id,omitempty"`
MemoryMegabytes int32 `json:"memory_megabytes"`
Name string `json:"name"`
RootVolumeSizeGigabytes int32 `json:"root_volume_size_gigabytes"`
SshKey *string `json:"ssh_key,omitempty"`
UserData *string `json:"user_data,omitempty"`
VmiId int32 `json:"vmi_id"`
}
CreateVmJSONBody defines parameters for CreateVm.
type CreateVmJSONRequestBody ¶
type CreateVmJSONRequestBody CreateVmJSONBody
CreateVmJSONRequestBody defines body for CreateVm for application/json ContentType.
type CreateVmResponse ¶
type CreateVmResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *VirtualMachine
JSON400 *Error
}
func ParseCreateVmResponse ¶
func ParseCreateVmResponse(rsp *http.Response) (*CreateVmResponse, error)
ParseCreateVmResponse parses an HTTP response from a CreateVmWithResponse call
func (CreateVmResponse) Status ¶
func (r CreateVmResponse) Status() string
Status returns HTTPResponse.Status
func (CreateVmResponse) StatusCode ¶
func (r CreateVmResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteVmResponse ¶
type DeleteVmResponse struct {
Body []byte
HTTPResponse *http.Response
JSON400 *Error
JSON404 *Error
}
func ParseDeleteVmResponse ¶
func ParseDeleteVmResponse(rsp *http.Response) (*DeleteVmResponse, error)
ParseDeleteVmResponse parses an HTTP response from a DeleteVmWithResponse call
func (DeleteVmResponse) Status ¶
func (r DeleteVmResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteVmResponse) StatusCode ¶
func (r DeleteVmResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetVmResponse ¶
type GetVmResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *VirtualMachine
JSON404 *Error
}
func ParseGetVmResponse ¶
func ParseGetVmResponse(rsp *http.Response) (*GetVmResponse, error)
ParseGetVmResponse parses an HTTP response from a GetVmWithResponse call
func (GetVmResponse) Status ¶
func (r GetVmResponse) Status() string
Status returns HTTPResponse.Status
func (GetVmResponse) StatusCode ¶
func (r GetVmResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Host ¶
type Host struct {
Id *int32 `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Object *string `json:"object,omitempty"`
Status *HostStatus `json:"status,omitempty"`
}
Host defines model for Host.
type HostCollection ¶
type HostCollection struct {
Data *[]Host `json:"data,omitempty"`
HasMore *bool `json:"has_more,omitempty"`
Object *string `json:"object,omitempty"`
}
HostCollection defines model for HostCollection.
type HostStatus ¶
type HostStatus string
HostStatus defines model for Host.Status.
const ( Offline HostStatus = "offline" Online HostStatus = "online" )
Defines values for HostStatus.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ListHostsResponse ¶
type ListHostsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *HostCollection
}
func ParseListHostsResponse ¶
func ParseListHostsResponse(rsp *http.Response) (*ListHostsResponse, error)
ParseListHostsResponse parses an HTTP response from a ListHostsWithResponse call
func (ListHostsResponse) Status ¶
func (r ListHostsResponse) Status() string
Status returns HTTPResponse.Status
func (ListHostsResponse) StatusCode ¶
func (r ListHostsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListVmisResponse ¶
type ListVmisResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *VirtualMachineImageCollection
}
func ParseListVmisResponse ¶
func ParseListVmisResponse(rsp *http.Response) (*ListVmisResponse, error)
ParseListVmisResponse parses an HTTP response from a ListVmisWithResponse call
func (ListVmisResponse) Status ¶
func (r ListVmisResponse) Status() string
Status returns HTTPResponse.Status
func (ListVmisResponse) StatusCode ¶
func (r ListVmisResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type NetworkInterface ¶
type NetworkInterface struct {
Dhcp *bool `json:"dhcp,omitempty"`
Id *int32 `json:"id,omitempty"`
IpAddress *string `json:"ip_address,omitempty"`
Object *string `json:"object,omitempty"`
}
NetworkInterface defines model for NetworkInterface.
type RebootVmResponse ¶ added in v0.4.0
type RebootVmResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *VirtualMachine
JSON400 *Error
JSON404 *Error
}
func ParseRebootVmResponse ¶ added in v0.4.0
func ParseRebootVmResponse(rsp *http.Response) (*RebootVmResponse, error)
ParseRebootVmResponse parses an HTTP response from a RebootVmWithResponse call
func (RebootVmResponse) Status ¶ added in v0.4.0
func (r RebootVmResponse) Status() string
Status returns HTTPResponse.Status
func (RebootVmResponse) StatusCode ¶ added in v0.4.0
func (r RebootVmResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type StartVmResponse ¶
type StartVmResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *VirtualMachine
JSON400 *Error
JSON404 *Error
}
func ParseStartVmResponse ¶
func ParseStartVmResponse(rsp *http.Response) (*StartVmResponse, error)
ParseStartVmResponse parses an HTTP response from a StartVmWithResponse call
func (StartVmResponse) Status ¶
func (r StartVmResponse) Status() string
Status returns HTTPResponse.Status
func (StartVmResponse) StatusCode ¶
func (r StartVmResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type StopVmResponse ¶
type StopVmResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *VirtualMachine
JSON400 *Error
JSON404 *Error
}
func ParseStopVmResponse ¶
func ParseStopVmResponse(rsp *http.Response) (*StopVmResponse, error)
ParseStopVmResponse parses an HTTP response from a StopVmWithResponse call
func (StopVmResponse) Status ¶
func (r StopVmResponse) Status() string
Status returns HTTPResponse.Status
func (StopVmResponse) StatusCode ¶
func (r StopVmResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateVmJSONBody ¶ added in v0.3.0
type UpdateVmJSONBody struct {
Cores *int32 `json:"cores,omitempty"`
MemoryMegabytes *int32 `json:"memory_megabytes,omitempty"`
UserData *string `json:"user_data,omitempty"`
}
UpdateVmJSONBody defines parameters for UpdateVm.
type UpdateVmJSONRequestBody ¶ added in v0.3.0
type UpdateVmJSONRequestBody UpdateVmJSONBody
UpdateVmJSONRequestBody defines body for UpdateVm for application/json ContentType.
type UpdateVmResponse ¶ added in v0.3.0
type UpdateVmResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *VirtualMachine
JSON400 *Error
JSON404 *Error
}
func ParseUpdateVmResponse ¶ added in v0.3.0
func ParseUpdateVmResponse(rsp *http.Response) (*UpdateVmResponse, error)
ParseUpdateVmResponse parses an HTTP response from a UpdateVmWithResponse call
func (UpdateVmResponse) Status ¶ added in v0.3.0
func (r UpdateVmResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateVmResponse) StatusCode ¶ added in v0.3.0
func (r UpdateVmResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type VirtualMachine ¶
type VirtualMachine struct {
Cores *int32 `json:"cores,omitempty"`
Host *Host `json:"host,omitempty"`
Id *int32 `json:"id,omitempty"`
MemoryBytes *int64 `json:"memory_bytes,omitempty"`
Name *string `json:"name,omitempty"`
Nic *NetworkInterface `json:"nic,omitempty"`
Object *string `json:"object,omitempty"`
RootVolume *Volume `json:"root_volume,omitempty"`
Status *VirtualMachineStatus `json:"status,omitempty"`
Vmi *VirtualMachineImage `json:"vmi,omitempty"`
}
VirtualMachine defines model for VirtualMachine.
type VirtualMachineImage ¶
type VirtualMachineImage struct {
Id *int32 `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Object *string `json:"object,omitempty"`
}
VirtualMachineImage defines model for VirtualMachineImage.
type VirtualMachineImageCollection ¶
type VirtualMachineImageCollection struct {
Data *[]VirtualMachineImage `json:"data,omitempty"`
HasMore *bool `json:"has_more,omitempty"`
Object *string `json:"object,omitempty"`
}
VirtualMachineImageCollection defines model for VirtualMachineImageCollection.
type VirtualMachineStatus ¶
type VirtualMachineStatus string
VirtualMachineStatus defines model for VirtualMachine.Status.
const ( VirtualMachineStatusCreating VirtualMachineStatus = "creating" VirtualMachineStatusDeleting VirtualMachineStatus = "deleting" VirtualMachineStatusRunning VirtualMachineStatus = "running" VirtualMachineStatusStopped VirtualMachineStatus = "stopped" VirtualMachineStatusSuspended VirtualMachineStatus = "suspended" VirtualMachineStatusUpdating VirtualMachineStatus = "updating" )
Defines values for VirtualMachineStatus.
type Volume ¶
type Volume struct {
Id *int32 `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Object *string `json:"object,omitempty"`
SizeBytes *int64 `json:"size_bytes,omitempty"`
Status *VolumeStatus `json:"status,omitempty"`
}
Volume defines model for Volume.
type VolumeStatus ¶
type VolumeStatus string
VolumeStatus defines model for Volume.Status.
const ( VolumeStatusAvailable VolumeStatus = "available" VolumeStatusCreating VolumeStatus = "creating" VolumeStatusDeleting VolumeStatus = "deleting" VolumeStatusInUse VolumeStatus = "in_use" )
Defines values for VolumeStatus.