server

package
v0.0.0-...-c0b5b33 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeStorageImagesCreateRequest

func DecodeStorageImagesCreateRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeStorageImagesCreateRequest returns a decoder for requests sent to the spin-registry storage_images_create endpoint.

func DecodeStorageImagesDeleteRequest

func DecodeStorageImagesDeleteRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeStorageImagesDeleteRequest returns a decoder for requests sent to the spin-registry storage_images_delete endpoint.

func DecodeStorageImagesGetRequest

func DecodeStorageImagesGetRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeStorageImagesGetRequest returns a decoder for requests sent to the spin-registry storage_images_get endpoint.

func DecodeStorageImagesListRequest

func DecodeStorageImagesListRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeStorageImagesListRequest returns a decoder for requests sent to the spin-registry storage_images_list endpoint.

func DecodeStorageVolumesCreateRequest

func DecodeStorageVolumesCreateRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeStorageVolumesCreateRequest returns a decoder for requests sent to the spin-registry storage_volumes_create endpoint.

func DecodeStorageVolumesDeleteRequest

func DecodeStorageVolumesDeleteRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeStorageVolumesDeleteRequest returns a decoder for requests sent to the spin-registry storage_volumes_delete 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-registry 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-registry 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-registry 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-registry vm_update endpoint.

func EncodeStorageImagesCreateResponse

func EncodeStorageImagesCreateResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeStorageImagesCreateResponse returns an encoder for responses returned by the spin-registry storage_images_create endpoint.

func EncodeStorageImagesDeleteResponse

func EncodeStorageImagesDeleteResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeStorageImagesDeleteResponse returns an encoder for responses returned by the spin-registry storage_images_delete endpoint.

func EncodeStorageImagesGetResponse

func EncodeStorageImagesGetResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeStorageImagesGetResponse returns an encoder for responses returned by the spin-registry storage_images_get endpoint.

func EncodeStorageImagesListResponse

func EncodeStorageImagesListResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeStorageImagesListResponse returns an encoder for responses returned by the spin-registry storage_images_list endpoint.

func EncodeStorageVolumesCreateResponse

func EncodeStorageVolumesCreateResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeStorageVolumesCreateResponse returns an encoder for responses returned by the spin-registry storage_volumes_create endpoint.

func EncodeStorageVolumesDeleteResponse

func EncodeStorageVolumesDeleteResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeStorageVolumesDeleteResponse returns an encoder for responses returned by the spin-registry storage_volumes_delete endpoint.

func EncodeStorageVolumesListResponse

func EncodeStorageVolumesListResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeStorageVolumesListResponse returns an encoder for responses returned by the spin-registry storage_volumes_list 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-registry 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-registry 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-registry 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-registry 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-registry vm_update endpoint.

func Mount

func Mount(mux goahttp.Muxer, h *Server)

Mount configures the mux to serve the spin-registry endpoints.

func MountStorageImagesCreateHandler

func MountStorageImagesCreateHandler(mux goahttp.Muxer, h http.Handler)

MountStorageImagesCreateHandler configures the mux to serve the "spin-registry" service "storage_images_create" endpoint.

func MountStorageImagesDeleteHandler

func MountStorageImagesDeleteHandler(mux goahttp.Muxer, h http.Handler)

MountStorageImagesDeleteHandler configures the mux to serve the "spin-registry" service "storage_images_delete" endpoint.

func MountStorageImagesGetHandler

func MountStorageImagesGetHandler(mux goahttp.Muxer, h http.Handler)

MountStorageImagesGetHandler configures the mux to serve the "spin-registry" service "storage_images_get" endpoint.

func MountStorageImagesListHandler

func MountStorageImagesListHandler(mux goahttp.Muxer, h http.Handler)

MountStorageImagesListHandler configures the mux to serve the "spin-registry" service "storage_images_list" endpoint.

func MountStorageVolumesCreateHandler

func MountStorageVolumesCreateHandler(mux goahttp.Muxer, h http.Handler)

MountStorageVolumesCreateHandler configures the mux to serve the "spin-registry" service "storage_volumes_create" endpoint.

func MountStorageVolumesDeleteHandler

func MountStorageVolumesDeleteHandler(mux goahttp.Muxer, h http.Handler)

MountStorageVolumesDeleteHandler configures the mux to serve the "spin-registry" service "storage_volumes_delete" endpoint.

func MountStorageVolumesListHandler

func MountStorageVolumesListHandler(mux goahttp.Muxer, h http.Handler)

MountStorageVolumesListHandler configures the mux to serve the "spin-registry" service "storage_volumes_list" endpoint.

func MountVMCreateHandler

func MountVMCreateHandler(mux goahttp.Muxer, h http.Handler)

MountVMCreateHandler configures the mux to serve the "spin-registry" service "vm_create" endpoint.

func MountVMDeleteHandler

func MountVMDeleteHandler(mux goahttp.Muxer, h http.Handler)

MountVMDeleteHandler configures the mux to serve the "spin-registry" service "vm_delete" endpoint.

func MountVMGetHandler

func MountVMGetHandler(mux goahttp.Muxer, h http.Handler)

MountVMGetHandler configures the mux to serve the "spin-registry" service "vm_get" endpoint.

func MountVMListHandler

func MountVMListHandler(mux goahttp.Muxer, h http.Handler)

MountVMListHandler configures the mux to serve the "spin-registry" service "vm_list" endpoint.

func MountVMUpdateHandler

func MountVMUpdateHandler(mux goahttp.Muxer, h http.Handler)

MountVMUpdateHandler configures the mux to serve the "spin-registry" service "vm_update" endpoint.

func NewStorageImagesCreateHandler

func NewStorageImagesCreateHandler(
	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

NewStorageImagesCreateHandler creates a HTTP handler which loads the HTTP request and calls the "spin-registry" service "storage_images_create" endpoint.

func NewStorageImagesCreateStorage

func NewStorageImagesCreateStorage(body *StorageImagesCreateRequestBody) *spinregistry.Storage

NewStorageImagesCreateStorage builds a spin-registry service storage_images_create endpoint payload.

func NewStorageImagesDeleteHandler

func NewStorageImagesDeleteHandler(
	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

NewStorageImagesDeleteHandler creates a HTTP handler which loads the HTTP request and calls the "spin-registry" service "storage_images_delete" endpoint.

func NewStorageImagesDeletePayload

func NewStorageImagesDeletePayload(body *StorageImagesDeleteRequestBody) *spinregistry.StorageImagesDeletePayload

NewStorageImagesDeletePayload builds a spin-registry service storage_images_delete endpoint payload.

func NewStorageImagesGetHandler

func NewStorageImagesGetHandler(
	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

NewStorageImagesGetHandler creates a HTTP handler which loads the HTTP request and calls the "spin-registry" service "storage_images_get" endpoint.

func NewStorageImagesGetPayload

func NewStorageImagesGetPayload(body *StorageImagesGetRequestBody) *spinregistry.StorageImagesGetPayload

NewStorageImagesGetPayload builds a spin-registry service storage_images_get endpoint payload.

func NewStorageImagesListHandler

func NewStorageImagesListHandler(
	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

NewStorageImagesListHandler creates a HTTP handler which loads the HTTP request and calls the "spin-registry" service "storage_images_list" endpoint.

func NewStorageImagesListPayload

func NewStorageImagesListPayload(body *StorageImagesListRequestBody) *spinregistry.StorageImagesListPayload

NewStorageImagesListPayload builds a spin-registry service storage_images_list endpoint payload.

func NewStorageVolumesCreateHandler

func NewStorageVolumesCreateHandler(
	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

NewStorageVolumesCreateHandler creates a HTTP handler which loads the HTTP request and calls the "spin-registry" service "storage_volumes_create" endpoint.

func NewStorageVolumesCreatePayload

func NewStorageVolumesCreatePayload(body *StorageVolumesCreateRequestBody) *spinregistry.StorageVolumesCreatePayload

NewStorageVolumesCreatePayload builds a spin-registry service storage_volumes_create endpoint payload.

func NewStorageVolumesDeleteHandler

func NewStorageVolumesDeleteHandler(
	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

NewStorageVolumesDeleteHandler creates a HTTP handler which loads the HTTP request and calls the "spin-registry" service "storage_volumes_delete" endpoint.

func NewStorageVolumesDeletePayload

func NewStorageVolumesDeletePayload(body *StorageVolumesDeleteRequestBody) *spinregistry.StorageVolumesDeletePayload

NewStorageVolumesDeletePayload builds a spin-registry service storage_volumes_delete endpoint payload.

func NewStorageVolumesListHandler

func NewStorageVolumesListHandler(
	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

NewStorageVolumesListHandler creates a HTTP handler which loads the HTTP request and calls the "spin-registry" service "storage_volumes_list" endpoint.

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-registry" service "vm_create" endpoint.

func NewVMCreateUpdatedVM

func NewVMCreateUpdatedVM(body *VMCreateRequestBody) *spinregistry.UpdatedVM

NewVMCreateUpdatedVM builds a spin-registry service vm_create endpoint payload.

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-registry" service "vm_delete" endpoint.

func NewVMDeletePayload

func NewVMDeletePayload(id uint64) *spinregistry.VMDeletePayload

NewVMDeletePayload builds a spin-registry 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-registry" service "vm_get" endpoint.

func NewVMGetPayload

func NewVMGetPayload(id uint64) *spinregistry.VMGetPayload

NewVMGetPayload builds a spin-registry 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-registry" 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-registry" service "vm_update" endpoint.

func NewVMUpdateUpdateVM

func NewVMUpdateUpdateVM(body *VMUpdateRequestBody, id uint64) *spinregistry.UpdateVM

NewVMUpdateUpdateVM builds a spin-registry service vm_update endpoint payload.

func StorageImagesCreateSpinRegistryPath

func StorageImagesCreateSpinRegistryPath() string

StorageImagesCreateSpinRegistryPath returns the URL path to the spin-registry service storage_images_create HTTP endpoint.

func StorageImagesDeleteSpinRegistryPath

func StorageImagesDeleteSpinRegistryPath() string

StorageImagesDeleteSpinRegistryPath returns the URL path to the spin-registry service storage_images_delete HTTP endpoint.

func StorageImagesGetSpinRegistryPath

func StorageImagesGetSpinRegistryPath() string

StorageImagesGetSpinRegistryPath returns the URL path to the spin-registry service storage_images_get HTTP endpoint.

func StorageImagesListSpinRegistryPath

func StorageImagesListSpinRegistryPath() string

StorageImagesListSpinRegistryPath returns the URL path to the spin-registry service storage_images_list HTTP endpoint.

func StorageVolumesCreateSpinRegistryPath

func StorageVolumesCreateSpinRegistryPath() string

StorageVolumesCreateSpinRegistryPath returns the URL path to the spin-registry service storage_volumes_create HTTP endpoint.

func StorageVolumesDeleteSpinRegistryPath

func StorageVolumesDeleteSpinRegistryPath() string

StorageVolumesDeleteSpinRegistryPath returns the URL path to the spin-registry service storage_volumes_delete HTTP endpoint.

func StorageVolumesListSpinRegistryPath

func StorageVolumesListSpinRegistryPath() string

StorageVolumesListSpinRegistryPath returns the URL path to the spin-registry service storage_volumes_list HTTP endpoint.

func VMCreateSpinRegistryPath

func VMCreateSpinRegistryPath() string

VMCreateSpinRegistryPath returns the URL path to the spin-registry service vm_create HTTP endpoint.

func VMDeleteSpinRegistryPath

func VMDeleteSpinRegistryPath(id uint64) string

VMDeleteSpinRegistryPath returns the URL path to the spin-registry service vm_delete HTTP endpoint.

func VMGetSpinRegistryPath

func VMGetSpinRegistryPath(id uint64) string

VMGetSpinRegistryPath returns the URL path to the spin-registry service vm_get HTTP endpoint.

func VMListSpinRegistryPath

func VMListSpinRegistryPath() string

VMListSpinRegistryPath returns the URL path to the spin-registry service vm_list HTTP endpoint.

func VMUpdateSpinRegistryPath

func VMUpdateSpinRegistryPath(id uint64) string

VMUpdateSpinRegistryPath returns the URL path to the spin-registry service vm_update HTTP endpoint.

func ValidateImageRequestBody

func ValidateImageRequestBody(body *ImageRequestBody) (err error)

ValidateImageRequestBody runs the validations defined on ImageRequestBody

func ValidateStorageImagesCreateRequestBody

func ValidateStorageImagesCreateRequestBody(body *StorageImagesCreateRequestBody) (err error)

ValidateStorageImagesCreateRequestBody runs the validations defined on storage_images_create_request_body

func ValidateStorageImagesDeleteRequestBody

func ValidateStorageImagesDeleteRequestBody(body *StorageImagesDeleteRequestBody) (err error)

ValidateStorageImagesDeleteRequestBody runs the validations defined on storage_images_delete_request_body

func ValidateStorageImagesGetRequestBody

func ValidateStorageImagesGetRequestBody(body *StorageImagesGetRequestBody) (err error)

ValidateStorageImagesGetRequestBody runs the validations defined on storage_images_get_request_body

func ValidateStorageImagesListRequestBody

func ValidateStorageImagesListRequestBody(body *StorageImagesListRequestBody) (err error)

ValidateStorageImagesListRequestBody runs the validations defined on storage_images_list_request_body

func ValidateStorageVolumesCreateRequestBody

func ValidateStorageVolumesCreateRequestBody(body *StorageVolumesCreateRequestBody) (err error)

ValidateStorageVolumesCreateRequestBody runs the validations defined on storage_volumes_create_request_body

func ValidateStorageVolumesDeleteRequestBody

func ValidateStorageVolumesDeleteRequestBody(body *StorageVolumesDeleteRequestBody) (err error)

ValidateStorageVolumesDeleteRequestBody runs the validations defined on storage_volumes_delete_request_body

func ValidateUpdatedVMRequestBody

func ValidateUpdatedVMRequestBody(body *UpdatedVMRequestBody) (err error)

ValidateUpdatedVMRequestBody runs the validations defined on UpdatedVMRequestBody

func ValidateVMCreateRequestBody

func ValidateVMCreateRequestBody(body *VMCreateRequestBody) (err error)

ValidateVMCreateRequestBody runs the validations defined on vm_create_request_body

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 ImageRequestBody

type ImageRequestBody 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"`
}

ImageRequestBody is used to define fields on request body types.

type ImageResponseBody

type ImageResponseBody 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"`
}

ImageResponseBody is used to define fields on response body types.

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
	VMUpdate             http.Handler
	VMDelete             http.Handler
	VMGet                http.Handler
	VMList               http.Handler
	StorageVolumesList   http.Handler
	StorageVolumesCreate http.Handler
	StorageVolumesDelete http.Handler
	StorageImagesList    http.Handler
	StorageImagesCreate  http.Handler
	StorageImagesDelete  http.Handler
	StorageImagesGet     http.Handler
}

Server lists the spin-registry service endpoint HTTP handlers.

func New

func New(
	e *spinregistry.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-registry 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.

func (*Server) Service

func (s *Server) Service() string

Service returns the name of the service served.

func (*Server) Use

func (s *Server) Use(m func(http.Handler) http.Handler)

Use wraps the server handlers with the given middleware.

type StorageImagesCreateRequestBody

type StorageImagesCreateRequestBody 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,omitempty" json:"image,omitempty" xml:"image,omitempty"`
	// 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,omitempty" json:"cdrom,omitempty" xml:"cdrom,omitempty"`
}

StorageImagesCreateRequestBody is the type of the "spin-registry" service "storage_images_create" endpoint HTTP request body.

type StorageImagesCreateResponseBody

type StorageImagesCreateResponseBody 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"`
}

StorageImagesCreateResponseBody is the type of the "spin-registry" service "storage_images_create" endpoint HTTP response body.

func NewStorageImagesCreateResponseBody

func NewStorageImagesCreateResponseBody(res *spinregistry.Image) *StorageImagesCreateResponseBody

NewStorageImagesCreateResponseBody builds the HTTP response body from the result of the "storage_images_create" endpoint of the "spin-registry" service.

type StorageImagesDeleteRequestBody

type StorageImagesDeleteRequestBody struct {
	// name of volume
	VolumeName *string `form:"volume_name,omitempty" json:"volume_name,omitempty" xml:"volume_name,omitempty"`
	// name of image
	ImageName *string `form:"image_name,omitempty" json:"image_name,omitempty" xml:"image_name,omitempty"`
}

StorageImagesDeleteRequestBody is the type of the "spin-registry" service "storage_images_delete" endpoint HTTP request body.

type StorageImagesGetRequestBody

type StorageImagesGetRequestBody struct {
	// name of volume
	VolumeName *string `form:"volume_name,omitempty" json:"volume_name,omitempty" xml:"volume_name,omitempty"`
	// name of image
	ImageName *string `form:"image_name,omitempty" json:"image_name,omitempty" xml:"image_name,omitempty"`
}

StorageImagesGetRequestBody is the type of the "spin-registry" service "storage_images_get" endpoint HTTP request body.

type StorageImagesGetResponseBody

type StorageImagesGetResponseBody 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"`
}

StorageImagesGetResponseBody is the type of the "spin-registry" service "storage_images_get" endpoint HTTP response body.

func NewStorageImagesGetResponseBody

func NewStorageImagesGetResponseBody(res *spinregistry.Image) *StorageImagesGetResponseBody

NewStorageImagesGetResponseBody builds the HTTP response body from the result of the "storage_images_get" endpoint of the "spin-registry" service.

type StorageImagesListRequestBody

type StorageImagesListRequestBody struct {
	// name of volume to list images for
	VolumeName *string `form:"volume_name,omitempty" json:"volume_name,omitempty" xml:"volume_name,omitempty"`
}

StorageImagesListRequestBody is the type of the "spin-registry" service "storage_images_list" endpoint HTTP request body.

type StorageVolumesCreateRequestBody

type StorageVolumesCreateRequestBody struct {
	// name of volume
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// path to volume
	Path *string `form:"path,omitempty" json:"path,omitempty" xml:"path,omitempty"`
}

StorageVolumesCreateRequestBody is the type of the "spin-registry" service "storage_volumes_create" endpoint HTTP request body.

type StorageVolumesDeleteRequestBody

type StorageVolumesDeleteRequestBody struct {
	// name of volume
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
}

StorageVolumesDeleteRequestBody is the type of the "spin-registry" service "storage_volumes_delete" endpoint HTTP request body.

type UpdatedVMRequestBody

type UpdatedVMRequestBody struct {
	// Image references
	Images []*ImageRequestBody `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"`
}

UpdatedVMRequestBody is used to define fields on request body types.

type VMCreateRequestBody

type VMCreateRequestBody struct {
	// Image references
	Images []*ImageRequestBody `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"`
}

VMCreateRequestBody is the type of the "spin-registry" service "vm_create" endpoint HTTP request body.

type VMGetResponseBody

type VMGetResponseBody struct {
	// Image references
	Images []*ImageResponseBody `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"`
}

VMGetResponseBody is the type of the "spin-registry" service "vm_get" endpoint HTTP response body.

func NewVMGetResponseBody

func NewVMGetResponseBody(res *spinregistry.UpdatedVM) *VMGetResponseBody

NewVMGetResponseBody builds the HTTP response body from the result of the "vm_get" endpoint of the "spin-registry" service.

type VMUpdateRequestBody

type VMUpdateRequestBody struct {
	// VM to publish
	VM *UpdatedVMRequestBody `form:"vm,omitempty" json:"vm,omitempty" xml:"vm,omitempty"`
}

VMUpdateRequestBody is the type of the "spin-registry" service "vm_update" endpoint HTTP request body.

Jump to

Keyboard shortcuts

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