Documentation ¶
Index ¶
- func BuildControlShutdownPayload(spinApiserverControlShutdownID string) (*spinapiserver.ControlShutdownPayload, error)
- func BuildControlStartPayload(spinApiserverControlStartID string) (*spinapiserver.ControlStartPayload, error)
- func BuildControlStopPayload(spinApiserverControlStopID string) (*spinapiserver.ControlStopPayload, error)
- func BuildVMCreatePayload(spinApiserverVMCreateBody string) (*spinapiserver.CreateVM, error)
- func BuildVMDeletePayload(spinApiserverVMDeleteID string) (*spinapiserver.VMDeletePayload, error)
- func BuildVMGetPayload(spinApiserverVMGetID string) (*spinapiserver.VMGetPayload, error)
- func BuildVMUpdatePayload(spinApiserverVMUpdateBody string, spinApiserverVMUpdateID string) (*spinapiserver.VMUpdatePayload, error)
- func ControlShutdownSpinApiserverPath(id uint64) string
- func ControlStartSpinApiserverPath(id uint64) string
- func ControlStopSpinApiserverPath(id uint64) string
- func DecodeControlShutdownResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func DecodeControlStartResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func DecodeControlStopResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func DecodeVMCreateResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func DecodeVMDeleteResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func DecodeVMGetResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func DecodeVMListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func DecodeVMUpdateResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func EncodeVMCreateRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
- func EncodeVMUpdateRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
- func NewVMGetUpdatedVMOK(body *VMGetResponseBody) *spinapiserver.UpdatedVM
- func VMCreateSpinApiserverPath() string
- func VMDeleteSpinApiserverPath(id uint64) string
- func VMGetSpinApiserverPath(id uint64) string
- func VMListSpinApiserverPath() string
- func VMUpdateSpinApiserverPath(id uint64) string
- func ValidateImageResponseBody(body *ImageResponseBody) (err error)
- func ValidateUpdatedVMRequestBody(body *UpdatedVMRequestBody) (err error)
- func ValidateVMGetResponseBody(body *VMGetResponseBody) (err error)
- type Client
- func (c *Client) BuildControlShutdownRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) BuildControlStartRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) BuildControlStopRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) BuildVMCreateRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) BuildVMDeleteRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) BuildVMGetRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) BuildVMListRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) BuildVMUpdateRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) ControlShutdown() goa.Endpoint
- func (c *Client) ControlStart() goa.Endpoint
- func (c *Client) ControlStop() goa.Endpoint
- func (c *Client) VMCreate() goa.Endpoint
- func (c *Client) VMDelete() goa.Endpoint
- func (c *Client) VMGet() goa.Endpoint
- func (c *Client) VMList() goa.Endpoint
- func (c *Client) VMUpdate() goa.Endpoint
- type ImageRequestBody
- type ImageResponseBody
- type StorageRequestBody
- type UpdatedVMRequestBody
- type VMCreateRequestBody
- type VMGetResponseBody
- type VMUpdateRequestBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildControlShutdownPayload ¶
func BuildControlShutdownPayload(spinApiserverControlShutdownID string) (*spinapiserver.ControlShutdownPayload, error)
BuildControlShutdownPayload builds the payload for the spin-apiserver control_shutdown endpoint from CLI flags.
func BuildControlStartPayload ¶
func BuildControlStartPayload(spinApiserverControlStartID string) (*spinapiserver.ControlStartPayload, error)
BuildControlStartPayload builds the payload for the spin-apiserver control_start endpoint from CLI flags.
func BuildControlStopPayload ¶
func BuildControlStopPayload(spinApiserverControlStopID string) (*spinapiserver.ControlStopPayload, error)
BuildControlStopPayload builds the payload for the spin-apiserver control_stop endpoint from CLI flags.
func BuildVMCreatePayload ¶
func BuildVMCreatePayload(spinApiserverVMCreateBody string) (*spinapiserver.CreateVM, error)
BuildVMCreatePayload builds the payload for the spin-apiserver vm_create endpoint from CLI flags.
func BuildVMDeletePayload ¶
func BuildVMDeletePayload(spinApiserverVMDeleteID string) (*spinapiserver.VMDeletePayload, error)
BuildVMDeletePayload builds the payload for the spin-apiserver vm_delete endpoint from CLI flags.
func BuildVMGetPayload ¶
func BuildVMGetPayload(spinApiserverVMGetID string) (*spinapiserver.VMGetPayload, error)
BuildVMGetPayload builds the payload for the spin-apiserver vm_get endpoint from CLI flags.
func BuildVMUpdatePayload ¶
func BuildVMUpdatePayload(spinApiserverVMUpdateBody string, spinApiserverVMUpdateID string) (*spinapiserver.VMUpdatePayload, error)
BuildVMUpdatePayload builds the payload for the spin-apiserver vm_update endpoint from CLI flags.
func ControlShutdownSpinApiserverPath ¶
ControlShutdownSpinApiserverPath returns the URL path to the spin-apiserver service control_shutdown HTTP endpoint.
func ControlStartSpinApiserverPath ¶
ControlStartSpinApiserverPath returns the URL path to the spin-apiserver service control_start HTTP endpoint.
func ControlStopSpinApiserverPath ¶
ControlStopSpinApiserverPath returns the URL path to the spin-apiserver service control_stop HTTP endpoint.
func DecodeControlShutdownResponse ¶
func DecodeControlShutdownResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeControlShutdownResponse returns a decoder for responses returned by the spin-apiserver control_shutdown endpoint. restoreBody controls whether the response body should be restored after having been read.
func DecodeControlStartResponse ¶
func DecodeControlStartResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeControlStartResponse returns a decoder for responses returned by the spin-apiserver control_start endpoint. restoreBody controls whether the response body should be restored after having been read.
func DecodeControlStopResponse ¶
func DecodeControlStopResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeControlStopResponse returns a decoder for responses returned by the spin-apiserver control_stop endpoint. restoreBody controls whether the response body should be restored after having been read.
func DecodeVMCreateResponse ¶
func DecodeVMCreateResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeVMCreateResponse returns a decoder for responses returned by the spin-apiserver vm_create endpoint. restoreBody controls whether the response body should be restored after having been read.
func DecodeVMDeleteResponse ¶
func DecodeVMDeleteResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeVMDeleteResponse returns a decoder for responses returned by the spin-apiserver vm_delete endpoint. restoreBody controls whether the response body should be restored after having been read.
func DecodeVMGetResponse ¶
func DecodeVMGetResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeVMGetResponse returns a decoder for responses returned by the spin-apiserver vm_get endpoint. restoreBody controls whether the response body should be restored after having been read.
func DecodeVMListResponse ¶
func DecodeVMListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeVMListResponse returns a decoder for responses returned by the spin-apiserver vm_list endpoint. restoreBody controls whether the response body should be restored after having been read.
func DecodeVMUpdateResponse ¶
func DecodeVMUpdateResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeVMUpdateResponse returns a decoder for responses returned by the spin-apiserver vm_update endpoint. restoreBody controls whether the response body should be restored after having been read.
func EncodeVMCreateRequest ¶
func EncodeVMCreateRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
EncodeVMCreateRequest returns an encoder for requests sent to the spin-apiserver vm_create server.
func EncodeVMUpdateRequest ¶
func EncodeVMUpdateRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
EncodeVMUpdateRequest returns an encoder for requests sent to the spin-apiserver vm_update server.
func NewVMGetUpdatedVMOK ¶
func NewVMGetUpdatedVMOK(body *VMGetResponseBody) *spinapiserver.UpdatedVM
NewVMGetUpdatedVMOK builds a "spin-apiserver" service "vm_get" endpoint result from a HTTP "OK" response.
func VMCreateSpinApiserverPath ¶
func VMCreateSpinApiserverPath() string
VMCreateSpinApiserverPath returns the URL path to the spin-apiserver service vm_create HTTP endpoint.
func VMDeleteSpinApiserverPath ¶
VMDeleteSpinApiserverPath returns the URL path to the spin-apiserver service vm_delete HTTP endpoint.
func VMGetSpinApiserverPath ¶
VMGetSpinApiserverPath returns the URL path to the spin-apiserver service vm_get HTTP endpoint.
func VMListSpinApiserverPath ¶
func VMListSpinApiserverPath() string
VMListSpinApiserverPath returns the URL path to the spin-apiserver service vm_list HTTP endpoint.
func VMUpdateSpinApiserverPath ¶
VMUpdateSpinApiserverPath returns the URL path to the spin-apiserver service vm_update HTTP endpoint.
func ValidateImageResponseBody ¶
func ValidateImageResponseBody(body *ImageResponseBody) (err error)
ValidateImageResponseBody runs the validations defined on ImageResponseBody
func ValidateUpdatedVMRequestBody ¶
func ValidateUpdatedVMRequestBody(body *UpdatedVMRequestBody) (err error)
ValidateUpdatedVMRequestBody runs the validations defined on UpdatedVMRequestBody
func ValidateVMGetResponseBody ¶
func ValidateVMGetResponseBody(body *VMGetResponseBody) (err error)
ValidateVMGetResponseBody runs the validations defined on vm_get_response_body
Types ¶
type Client ¶
type Client struct { // VMCreate Doer is the HTTP client used to make requests to the vm_create // endpoint. VMCreateDoer goahttp.Doer // VMDelete Doer is the HTTP client used to make requests to the vm_delete // endpoint. VMDeleteDoer goahttp.Doer // VMList Doer is the HTTP client used to make requests to the vm_list endpoint. VMListDoer goahttp.Doer // VMGet Doer is the HTTP client used to make requests to the vm_get endpoint. VMGetDoer goahttp.Doer // VMUpdate Doer is the HTTP client used to make requests to the vm_update // endpoint. VMUpdateDoer goahttp.Doer // ControlStart Doer is the HTTP client used to make requests to the // control_start endpoint. ControlStartDoer goahttp.Doer // ControlStop Doer is the HTTP client used to make requests to the // control_stop endpoint. ControlStopDoer goahttp.Doer // ControlShutdown Doer is the HTTP client used to make requests to the // control_shutdown endpoint. ControlShutdownDoer goahttp.Doer // RestoreResponseBody controls whether the response bodies are reset after // decoding so they can be read again. RestoreResponseBody bool // contains filtered or unexported fields }
Client lists the spin-apiserver service endpoint HTTP clients.
func NewClient ¶
func NewClient( scheme string, host string, doer goahttp.Doer, enc func(*http.Request) goahttp.Encoder, dec func(*http.Response) goahttp.Decoder, restoreBody bool, ) *Client
NewClient instantiates HTTP clients for all the spin-apiserver service servers.
func (*Client) BuildControlShutdownRequest ¶
func (c *Client) BuildControlShutdownRequest(ctx context.Context, v interface{}) (*http.Request, error)
BuildControlShutdownRequest instantiates a HTTP request object with method and path set to call the "spin-apiserver" service "control_shutdown" endpoint
func (*Client) BuildControlStartRequest ¶
func (c *Client) BuildControlStartRequest(ctx context.Context, v interface{}) (*http.Request, error)
BuildControlStartRequest instantiates a HTTP request object with method and path set to call the "spin-apiserver" service "control_start" endpoint
func (*Client) BuildControlStopRequest ¶
BuildControlStopRequest instantiates a HTTP request object with method and path set to call the "spin-apiserver" service "control_stop" endpoint
func (*Client) BuildVMCreateRequest ¶
BuildVMCreateRequest instantiates a HTTP request object with method and path set to call the "spin-apiserver" service "vm_create" endpoint
func (*Client) BuildVMDeleteRequest ¶
BuildVMDeleteRequest instantiates a HTTP request object with method and path set to call the "spin-apiserver" service "vm_delete" endpoint
func (*Client) BuildVMGetRequest ¶
BuildVMGetRequest instantiates a HTTP request object with method and path set to call the "spin-apiserver" service "vm_get" endpoint
func (*Client) BuildVMListRequest ¶
BuildVMListRequest instantiates a HTTP request object with method and path set to call the "spin-apiserver" service "vm_list" endpoint
func (*Client) BuildVMUpdateRequest ¶
BuildVMUpdateRequest instantiates a HTTP request object with method and path set to call the "spin-apiserver" service "vm_update" endpoint
func (*Client) ControlShutdown ¶
ControlShutdown returns an endpoint that makes HTTP requests to the spin-apiserver service control_shutdown server.
func (*Client) ControlStart ¶
ControlStart returns an endpoint that makes HTTP requests to the spin-apiserver service control_start server.
func (*Client) ControlStop ¶
ControlStop returns an endpoint that makes HTTP requests to the spin-apiserver service control_stop server.
func (*Client) VMCreate ¶
VMCreate returns an endpoint that makes HTTP requests to the spin-apiserver service vm_create server.
func (*Client) VMDelete ¶
VMDelete returns an endpoint that makes HTTP requests to the spin-apiserver service vm_delete server.
func (*Client) VMGet ¶
VMGet returns an endpoint that makes HTTP requests to the spin-apiserver service vm_get server.
type ImageRequestBody ¶
type ImageRequestBody struct { // Image path Path string `form:"path" json:"path" xml:"path"` // Is this a cdrom image? Cdrom bool `form:"cdrom" json:"cdrom" xml:"cdrom"` // Volume name Volume *string `form:"volume,omitempty" json:"volume,omitempty" xml:"volume,omitempty"` }
ImageRequestBody is used to define fields on request body types.
type ImageResponseBody ¶
type ImageResponseBody struct { // Image path Path *string `form:"path,omitempty" json:"path,omitempty" xml:"path,omitempty"` // Is this a cdrom image? Cdrom *bool `form:"cdrom,omitempty" json:"cdrom,omitempty" xml:"cdrom,omitempty"` // Volume name Volume *string `form:"volume,omitempty" json:"volume,omitempty" xml:"volume,omitempty"` }
ImageResponseBody is used to define fields on response body types.
type StorageRequestBody ¶
type StorageRequestBody struct { // Volume name; required if image is not a cdrom Volume *string `form:"volume,omitempty" json:"volume,omitempty" xml:"volume,omitempty"` // Image filename, no `/` characters Image string `form:"image" json:"image" xml:"image"` // Image size (in gigabytes); required if image is not a cdrom ImageSize *uint `form:"image_size,omitempty" json:"image_size,omitempty" xml:"image_size,omitempty"` // Is this image a cdrom? Cdrom bool `form:"cdrom" json:"cdrom" xml:"cdrom"` }
StorageRequestBody is used to define fields on request body types.
type UpdatedVMRequestBody ¶
type UpdatedVMRequestBody struct { // Image references Images []*ImageRequestBody `form:"images" json:"images" xml:"images"` // Name of VM; does not need to be unique Name string `form:"name" json:"name" xml:"name"` // CPU count Cpus uint `form:"cpus" json:"cpus" xml:"cpus"` // Memory (in megabytes) Memory uint `form:"memory" json:"memory" xml:"memory"` }
UpdatedVMRequestBody is used to define fields on request body types.
type VMCreateRequestBody ¶
type VMCreateRequestBody struct { // Storage references Storage []*StorageRequestBody `form:"storage" json:"storage" xml:"storage"` // Name of VM; does not need to be unique Name string `form:"name" json:"name" xml:"name"` // CPU count Cpus uint `form:"cpus" json:"cpus" xml:"cpus"` // Memory (in megabytes) Memory uint `form:"memory" json:"memory" xml:"memory"` }
VMCreateRequestBody is the type of the "spin-apiserver" service "vm_create" endpoint HTTP request body.
func NewVMCreateRequestBody ¶
func NewVMCreateRequestBody(p *spinapiserver.CreateVM) *VMCreateRequestBody
NewVMCreateRequestBody builds the HTTP request body from the payload of the "vm_create" endpoint of the "spin-apiserver" service.
type VMGetResponseBody ¶
type VMGetResponseBody struct { // Image references Images []*ImageResponseBody `form:"images,omitempty" json:"images,omitempty" xml:"images,omitempty"` // Name of VM; does not need to be unique Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` // CPU count Cpus *uint `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` // Memory (in megabytes) Memory *uint `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` }
VMGetResponseBody is the type of the "spin-apiserver" service "vm_get" endpoint HTTP response body.
type VMUpdateRequestBody ¶
type VMUpdateRequestBody struct { // VM Manifest to Update VM *UpdatedVMRequestBody `form:"vm" json:"vm" xml:"vm"` }
VMUpdateRequestBody is the type of the "spin-apiserver" service "vm_update" endpoint HTTP request body.
func NewVMUpdateRequestBody ¶
func NewVMUpdateRequestBody(p *spinapiserver.VMUpdatePayload) *VMUpdateRequestBody
NewVMUpdateRequestBody builds the HTTP request body from the payload of the "vm_update" endpoint of the "spin-apiserver" service.