client

package
v0.0.0-...-a68df68 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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 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

func ControlShutdownSpinApiserverPath(id uint64) string

ControlShutdownSpinApiserverPath returns the URL path to the spin-apiserver service control_shutdown HTTP endpoint.

func ControlStartSpinApiserverPath

func ControlStartSpinApiserverPath(id uint64) string

ControlStartSpinApiserverPath returns the URL path to the spin-apiserver service control_start HTTP endpoint.

func ControlStopSpinApiserverPath

func ControlStopSpinApiserverPath(id uint64) string

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 VMCreateSpinApiserverPath

func VMCreateSpinApiserverPath() string

VMCreateSpinApiserverPath returns the URL path to the spin-apiserver service vm_create HTTP endpoint.

func VMDeleteSpinApiserverPath

func VMDeleteSpinApiserverPath(id uint64) string

VMDeleteSpinApiserverPath returns the URL path to the spin-apiserver service vm_delete HTTP endpoint.

func VMGetSpinApiserverPath

func VMGetSpinApiserverPath(id uint64) string

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

func VMUpdateSpinApiserverPath(id uint64) string

VMUpdateSpinApiserverPath returns the URL path to the spin-apiserver service vm_update HTTP endpoint.

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

func (c *Client) BuildControlStopRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildControlStopRequest instantiates a HTTP request object with method and path set to call the "spin-apiserver" service "control_stop" endpoint

func (*Client) BuildVMCreateRequest

func (c *Client) BuildVMCreateRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildVMCreateRequest instantiates a HTTP request object with method and path set to call the "spin-apiserver" service "vm_create" endpoint

func (*Client) BuildVMDeleteRequest

func (c *Client) BuildVMDeleteRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildVMDeleteRequest instantiates a HTTP request object with method and path set to call the "spin-apiserver" service "vm_delete" endpoint

func (*Client) BuildVMGetRequest

func (c *Client) BuildVMGetRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildVMGetRequest instantiates a HTTP request object with method and path set to call the "spin-apiserver" service "vm_get" endpoint

func (*Client) BuildVMListRequest

func (c *Client) BuildVMListRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildVMListRequest instantiates a HTTP request object with method and path set to call the "spin-apiserver" service "vm_list" endpoint

func (*Client) BuildVMUpdateRequest

func (c *Client) BuildVMUpdateRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildVMUpdateRequest instantiates a HTTP request object with method and path set to call the "spin-apiserver" service "vm_update" endpoint

func (*Client) ControlShutdown

func (c *Client) ControlShutdown() goa.Endpoint

ControlShutdown returns an endpoint that makes HTTP requests to the spin-apiserver service control_shutdown server.

func (*Client) ControlStart

func (c *Client) ControlStart() goa.Endpoint

ControlStart returns an endpoint that makes HTTP requests to the spin-apiserver service control_start server.

func (*Client) ControlStop

func (c *Client) ControlStop() goa.Endpoint

ControlStop returns an endpoint that makes HTTP requests to the spin-apiserver service control_stop server.

func (*Client) VMCreate

func (c *Client) VMCreate() goa.Endpoint

VMCreate returns an endpoint that makes HTTP requests to the spin-apiserver service vm_create server.

func (*Client) VMDelete

func (c *Client) VMDelete() goa.Endpoint

VMDelete returns an endpoint that makes HTTP requests to the spin-apiserver service vm_delete server.

func (*Client) VMGet

func (c *Client) VMGet() goa.Endpoint

VMGet returns an endpoint that makes HTTP requests to the spin-apiserver service vm_get server.

func (*Client) VMList

func (c *Client) VMList() goa.Endpoint

VMList returns an endpoint that makes HTTP requests to the spin-apiserver service vm_list server.

func (*Client) VMUpdate

func (c *Client) VMUpdate() goa.Endpoint

VMUpdate returns an endpoint that makes HTTP requests to the spin-apiserver service vm_update server.

type VMUpdateRequestBody

type VMUpdateRequestBody struct {
	// VM Manifest to Update
	VM *vm.Transient `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.

Jump to

Keyboard shortcuts

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