Documentation
¶
Index ¶
- func ControlShutdownSpinApiserverPath(id uint64) string
- func ControlStartSpinApiserverPath(id uint64) string
- func ControlStopSpinApiserverPath(id uint64) string
- func DecodeControlShutdownRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DecodeControlStartRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DecodeControlStopRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DecodeVMCreateRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DecodeVMDeleteRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DecodeVMGetRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DecodeVMUpdateRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func EncodeControlShutdownResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeControlStartResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeControlStopResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeVMCreateResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeVMDeleteResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeVMGetResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeVMListResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeVMUpdateResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func Mount(mux goahttp.Muxer, h *Server)
- func MountControlShutdownHandler(mux goahttp.Muxer, h http.Handler)
- func MountControlStartHandler(mux goahttp.Muxer, h http.Handler)
- func MountControlStopHandler(mux goahttp.Muxer, h http.Handler)
- func MountVMCreateHandler(mux goahttp.Muxer, h http.Handler)
- func MountVMDeleteHandler(mux goahttp.Muxer, h http.Handler)
- func MountVMGetHandler(mux goahttp.Muxer, h http.Handler)
- func MountVMListHandler(mux goahttp.Muxer, h http.Handler)
- func MountVMUpdateHandler(mux goahttp.Muxer, h http.Handler)
- func NewControlShutdownHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewControlShutdownPayload(id uint64) *spinapiserver.ControlShutdownPayload
- func NewControlStartHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewControlStartPayload(id uint64) *spinapiserver.ControlStartPayload
- func NewControlStopHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewControlStopPayload(id uint64) *spinapiserver.ControlStopPayload
- func NewVMCreateHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewVMDeleteHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewVMDeletePayload(id uint64) *spinapiserver.VMDeletePayload
- func NewVMGetHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewVMGetPayload(id uint64) *spinapiserver.VMGetPayload
- func NewVMListHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewVMUpdateHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewVMUpdatePayload(body *VMUpdateRequestBody, id uint64) *spinapiserver.VMUpdatePayload
- func VMCreateSpinApiserverPath() string
- func VMDeleteSpinApiserverPath(id uint64) string
- func VMGetSpinApiserverPath(id uint64) string
- func VMListSpinApiserverPath() string
- func VMUpdateSpinApiserverPath(id uint64) string
- func ValidateVMUpdateRequestBody(body *VMUpdateRequestBody) (err error)
- type ErrorNamer
- type MountPoint
- type Server
- type VMUpdateRequestBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 DecodeControlShutdownRequest ¶
func DecodeControlShutdownRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeControlShutdownRequest returns a decoder for requests sent to the spin-apiserver control_shutdown endpoint.
func DecodeControlStartRequest ¶
func DecodeControlStartRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeControlStartRequest returns a decoder for requests sent to the spin-apiserver control_start endpoint.
func DecodeControlStopRequest ¶
func DecodeControlStopRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeControlStopRequest returns a decoder for requests sent to the spin-apiserver control_stop endpoint.
func DecodeVMCreateRequest ¶
func DecodeVMCreateRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeVMCreateRequest returns a decoder for requests sent to the spin-apiserver vm_create endpoint.
func DecodeVMDeleteRequest ¶
func DecodeVMDeleteRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeVMDeleteRequest returns a decoder for requests sent to the spin-apiserver vm_delete endpoint.
func DecodeVMGetRequest ¶
func DecodeVMGetRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeVMGetRequest returns a decoder for requests sent to the spin-apiserver vm_get endpoint.
func DecodeVMUpdateRequest ¶
func DecodeVMUpdateRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeVMUpdateRequest returns a decoder for requests sent to the spin-apiserver vm_update endpoint.
func EncodeControlShutdownResponse ¶
func EncodeControlShutdownResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeControlShutdownResponse returns an encoder for responses returned by the spin-apiserver control_shutdown endpoint.
func EncodeControlStartResponse ¶
func EncodeControlStartResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeControlStartResponse returns an encoder for responses returned by the spin-apiserver control_start endpoint.
func EncodeControlStopResponse ¶
func EncodeControlStopResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeControlStopResponse returns an encoder for responses returned by the spin-apiserver control_stop endpoint.
func EncodeVMCreateResponse ¶
func EncodeVMCreateResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeVMCreateResponse returns an encoder for responses returned by the spin-apiserver vm_create endpoint.
func EncodeVMDeleteResponse ¶
func EncodeVMDeleteResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeVMDeleteResponse returns an encoder for responses returned by the spin-apiserver vm_delete endpoint.
func EncodeVMGetResponse ¶
func EncodeVMGetResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeVMGetResponse returns an encoder for responses returned by the spin-apiserver vm_get endpoint.
func EncodeVMListResponse ¶
func EncodeVMListResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeVMListResponse returns an encoder for responses returned by the spin-apiserver vm_list endpoint.
func EncodeVMUpdateResponse ¶
func EncodeVMUpdateResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeVMUpdateResponse returns an encoder for responses returned by the spin-apiserver vm_update endpoint.
func MountControlShutdownHandler ¶
MountControlShutdownHandler configures the mux to serve the "spin-apiserver" service "control_shutdown" endpoint.
func MountControlStartHandler ¶
MountControlStartHandler configures the mux to serve the "spin-apiserver" service "control_start" endpoint.
func MountControlStopHandler ¶
MountControlStopHandler configures the mux to serve the "spin-apiserver" service "control_stop" endpoint.
func MountVMCreateHandler ¶
MountVMCreateHandler configures the mux to serve the "spin-apiserver" service "vm_create" endpoint.
func MountVMDeleteHandler ¶
MountVMDeleteHandler configures the mux to serve the "spin-apiserver" service "vm_delete" endpoint.
func MountVMGetHandler ¶
MountVMGetHandler configures the mux to serve the "spin-apiserver" service "vm_get" endpoint.
func MountVMListHandler ¶
MountVMListHandler configures the mux to serve the "spin-apiserver" service "vm_list" endpoint.
func MountVMUpdateHandler ¶
MountVMUpdateHandler configures the mux to serve the "spin-apiserver" service "vm_update" endpoint.
func NewControlShutdownHandler ¶
func NewControlShutdownHandler( endpoint goa.Endpoint, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(err error) goahttp.Statuser, ) http.Handler
NewControlShutdownHandler creates a HTTP handler which loads the HTTP request and calls the "spin-apiserver" service "control_shutdown" endpoint.
func NewControlShutdownPayload ¶
func NewControlShutdownPayload(id uint64) *spinapiserver.ControlShutdownPayload
NewControlShutdownPayload builds a spin-apiserver service control_shutdown endpoint payload.
func NewControlStartHandler ¶
func NewControlStartHandler( endpoint goa.Endpoint, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(err error) goahttp.Statuser, ) http.Handler
NewControlStartHandler creates a HTTP handler which loads the HTTP request and calls the "spin-apiserver" service "control_start" endpoint.
func NewControlStartPayload ¶
func NewControlStartPayload(id uint64) *spinapiserver.ControlStartPayload
NewControlStartPayload builds a spin-apiserver service control_start endpoint payload.
func NewControlStopHandler ¶
func NewControlStopHandler( endpoint goa.Endpoint, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(err error) goahttp.Statuser, ) http.Handler
NewControlStopHandler creates a HTTP handler which loads the HTTP request and calls the "spin-apiserver" service "control_stop" endpoint.
func NewControlStopPayload ¶
func NewControlStopPayload(id uint64) *spinapiserver.ControlStopPayload
NewControlStopPayload builds a spin-apiserver service control_stop endpoint payload.
func NewVMCreateHandler ¶
func NewVMCreateHandler( endpoint goa.Endpoint, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(err error) goahttp.Statuser, ) http.Handler
NewVMCreateHandler creates a HTTP handler which loads the HTTP request and calls the "spin-apiserver" service "vm_create" endpoint.
func NewVMDeleteHandler ¶
func NewVMDeleteHandler( endpoint goa.Endpoint, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(err error) goahttp.Statuser, ) http.Handler
NewVMDeleteHandler creates a HTTP handler which loads the HTTP request and calls the "spin-apiserver" service "vm_delete" endpoint.
func NewVMDeletePayload ¶
func NewVMDeletePayload(id uint64) *spinapiserver.VMDeletePayload
NewVMDeletePayload builds a spin-apiserver service vm_delete endpoint payload.
func NewVMGetHandler ¶
func NewVMGetHandler( endpoint goa.Endpoint, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(err error) goahttp.Statuser, ) http.Handler
NewVMGetHandler creates a HTTP handler which loads the HTTP request and calls the "spin-apiserver" service "vm_get" endpoint.
func NewVMGetPayload ¶
func NewVMGetPayload(id uint64) *spinapiserver.VMGetPayload
NewVMGetPayload builds a spin-apiserver service vm_get endpoint payload.
func NewVMListHandler ¶
func NewVMListHandler( endpoint goa.Endpoint, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(err error) goahttp.Statuser, ) http.Handler
NewVMListHandler creates a HTTP handler which loads the HTTP request and calls the "spin-apiserver" service "vm_list" endpoint.
func NewVMUpdateHandler ¶
func NewVMUpdateHandler( endpoint goa.Endpoint, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(err error) goahttp.Statuser, ) http.Handler
NewVMUpdateHandler creates a HTTP handler which loads the HTTP request and calls the "spin-apiserver" service "vm_update" endpoint.
func NewVMUpdatePayload ¶
func NewVMUpdatePayload(body *VMUpdateRequestBody, id uint64) *spinapiserver.VMUpdatePayload
NewVMUpdatePayload builds a spin-apiserver service vm_update endpoint payload.
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 ValidateVMUpdateRequestBody ¶
func ValidateVMUpdateRequestBody(body *VMUpdateRequestBody) (err error)
ValidateVMUpdateRequestBody runs the validations defined on vm_update_request_body
Types ¶
type ErrorNamer ¶
type ErrorNamer interface {
ErrorName() string
}
ErrorNamer is an interface implemented by generated error structs that exposes the name of the error as defined in the design.
type MountPoint ¶
type MountPoint struct {
// Method is the name of the service method served by the mounted HTTP handler.
Method string
// Verb is the HTTP method used to match requests to the mounted handler.
Verb string
// Pattern is the HTTP request path pattern used to match requests to the
// mounted handler.
Pattern string
}
MountPoint holds information about the mounted endpoints.
type Server ¶
type Server struct {
Mounts []*MountPoint
VMCreate http.Handler
VMDelete http.Handler
VMList http.Handler
VMGet http.Handler
VMUpdate http.Handler
ControlStart http.Handler
ControlStop http.Handler
ControlShutdown http.Handler
}
Server lists the spin-apiserver service endpoint HTTP handlers.
func New ¶
func New( e *spinapiserver.Endpoints, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(err error) goahttp.Statuser, ) *Server
New instantiates HTTP handlers for all the spin-apiserver service endpoints using the provided encoder and decoder. The handlers are mounted on the given mux using the HTTP verb and path defined in the design. errhandler is called whenever a response fails to be encoded. formatter is used to format errors returned by the service methods prior to encoding. Both errhandler and formatter are optional and can be nil.
type VMUpdateRequestBody ¶
type VMUpdateRequestBody struct {
// VM Manifest to Update
VM *vm.Transient `form:"vm,omitempty" json:"vm,omitempty" xml:"vm,omitempty"`
}
VMUpdateRequestBody is the type of the "spin-apiserver" service "vm_update" endpoint HTTP request body.