Documentation ¶
Index ¶
- Constants
- Variables
- func NewStorageImagesCreateEndpoint(s Service) goa.Endpoint
- func NewStorageImagesDeleteEndpoint(s Service) goa.Endpoint
- func NewStorageImagesGetEndpoint(s Service) goa.Endpoint
- func NewStorageImagesListEndpoint(s Service) goa.Endpoint
- func NewStorageVolumesCreateEndpoint(s Service) goa.Endpoint
- func NewStorageVolumesDeleteEndpoint(s Service) goa.Endpoint
- func NewStorageVolumesListEndpoint(s Service) goa.Endpoint
- func NewVMCreateEndpoint(s Service) goa.Endpoint
- func NewVMDeleteEndpoint(s Service) goa.Endpoint
- func NewVMGetEndpoint(s Service) goa.Endpoint
- func NewVMListEndpoint(s Service) goa.Endpoint
- func NewVMUpdateEndpoint(s Service) goa.Endpoint
- type Client
- func (c *Client) StorageImagesCreate(ctx context.Context, p *Storage) (res *Image, err error)
- func (c *Client) StorageImagesDelete(ctx context.Context, p *StorageImagesDeletePayload) (err error)
- func (c *Client) StorageImagesGet(ctx context.Context, p *StorageImagesGetPayload) (res *Image, err error)
- func (c *Client) StorageImagesList(ctx context.Context, p *StorageImagesListPayload) (res []string, err error)
- func (c *Client) StorageVolumesCreate(ctx context.Context, p *StorageVolumesCreatePayload) (err error)
- func (c *Client) StorageVolumesDelete(ctx context.Context, p *StorageVolumesDeletePayload) (err error)
- func (c *Client) StorageVolumesList(ctx context.Context) (res map[string]string, err error)
- func (c *Client) VMCreate(ctx context.Context, p *UpdatedVM) (res uint64, err error)
- func (c *Client) VMDelete(ctx context.Context, p *VMDeletePayload) (err error)
- func (c *Client) VMGet(ctx context.Context, p *VMGetPayload) (res *UpdatedVM, err error)
- func (c *Client) VMList(ctx context.Context) (res []uint64, err error)
- func (c *Client) VMUpdate(ctx context.Context, p *UpdateVM) (err error)
- type Endpoints
- type Image
- type Service
- type Storage
- type StorageImagesDeletePayload
- type StorageImagesGetPayload
- type StorageImagesListPayload
- type StorageVolumesCreatePayload
- type StorageVolumesDeletePayload
- type UpdateVM
- type UpdatedVM
- type VMDeletePayload
- type VMGetPayload
Constants ¶
const ServiceName = "spin-registry"
ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.
Variables ¶
var MethodNames = [12]string{"vm_create", "vm_update", "vm_delete", "vm_get", "vm_list", "storage_volumes_list", "storage_volumes_create", "storage_volumes_delete", "storage_images_list", "storage_images_create", "storage_images_delete", "storage_images_get"}
MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.
Functions ¶
func NewStorageImagesCreateEndpoint ¶
NewStorageImagesCreateEndpoint returns an endpoint function that calls the method "storage_images_create" of service "spin-registry".
func NewStorageImagesDeleteEndpoint ¶
NewStorageImagesDeleteEndpoint returns an endpoint function that calls the method "storage_images_delete" of service "spin-registry".
func NewStorageImagesGetEndpoint ¶
NewStorageImagesGetEndpoint returns an endpoint function that calls the method "storage_images_get" of service "spin-registry".
func NewStorageImagesListEndpoint ¶
NewStorageImagesListEndpoint returns an endpoint function that calls the method "storage_images_list" of service "spin-registry".
func NewStorageVolumesCreateEndpoint ¶
NewStorageVolumesCreateEndpoint returns an endpoint function that calls the method "storage_volumes_create" of service "spin-registry".
func NewStorageVolumesDeleteEndpoint ¶
NewStorageVolumesDeleteEndpoint returns an endpoint function that calls the method "storage_volumes_delete" of service "spin-registry".
func NewStorageVolumesListEndpoint ¶
NewStorageVolumesListEndpoint returns an endpoint function that calls the method "storage_volumes_list" of service "spin-registry".
func NewVMCreateEndpoint ¶
NewVMCreateEndpoint returns an endpoint function that calls the method "vm_create" of service "spin-registry".
func NewVMDeleteEndpoint ¶
NewVMDeleteEndpoint returns an endpoint function that calls the method "vm_delete" of service "spin-registry".
func NewVMGetEndpoint ¶
NewVMGetEndpoint returns an endpoint function that calls the method "vm_get" of service "spin-registry".
func NewVMListEndpoint ¶
NewVMListEndpoint returns an endpoint function that calls the method "vm_list" of service "spin-registry".
func NewVMUpdateEndpoint ¶
NewVMUpdateEndpoint returns an endpoint function that calls the method "vm_update" of service "spin-registry".
Types ¶
type Client ¶
type Client struct { VMCreateEndpoint goa.Endpoint VMUpdateEndpoint goa.Endpoint VMDeleteEndpoint goa.Endpoint VMGetEndpoint goa.Endpoint VMListEndpoint goa.Endpoint StorageVolumesListEndpoint goa.Endpoint StorageVolumesCreateEndpoint goa.Endpoint StorageVolumesDeleteEndpoint goa.Endpoint StorageImagesListEndpoint goa.Endpoint StorageImagesCreateEndpoint goa.Endpoint StorageImagesDeleteEndpoint goa.Endpoint StorageImagesGetEndpoint goa.Endpoint }
Client is the "spin-registry" service client.
func NewClient ¶
func NewClient(vMCreate, vMUpdate, vMDelete, vMGet, vMList, storageVolumesList, storageVolumesCreate, storageVolumesDelete, storageImagesList, storageImagesCreate, storageImagesDelete, storageImagesGet goa.Endpoint) *Client
NewClient initializes a "spin-registry" service client given the endpoints.
func (*Client) StorageImagesCreate ¶
StorageImagesCreate calls the "storage_images_create" endpoint of the "spin-registry" service.
func (*Client) StorageImagesDelete ¶
func (c *Client) StorageImagesDelete(ctx context.Context, p *StorageImagesDeletePayload) (err error)
StorageImagesDelete calls the "storage_images_delete" endpoint of the "spin-registry" service.
func (*Client) StorageImagesGet ¶
func (c *Client) StorageImagesGet(ctx context.Context, p *StorageImagesGetPayload) (res *Image, err error)
StorageImagesGet calls the "storage_images_get" endpoint of the "spin-registry" service.
func (*Client) StorageImagesList ¶
func (c *Client) StorageImagesList(ctx context.Context, p *StorageImagesListPayload) (res []string, err error)
StorageImagesList calls the "storage_images_list" endpoint of the "spin-registry" service.
func (*Client) StorageVolumesCreate ¶
func (c *Client) StorageVolumesCreate(ctx context.Context, p *StorageVolumesCreatePayload) (err error)
StorageVolumesCreate calls the "storage_volumes_create" endpoint of the "spin-registry" service.
func (*Client) StorageVolumesDelete ¶
func (c *Client) StorageVolumesDelete(ctx context.Context, p *StorageVolumesDeletePayload) (err error)
StorageVolumesDelete calls the "storage_volumes_delete" endpoint of the "spin-registry" service.
func (*Client) StorageVolumesList ¶
StorageVolumesList calls the "storage_volumes_list" endpoint of the "spin-registry" service.
func (*Client) VMDelete ¶
func (c *Client) VMDelete(ctx context.Context, p *VMDeletePayload) (err error)
VMDelete calls the "vm_delete" endpoint of the "spin-registry" service.
type Endpoints ¶
type Endpoints struct { VMCreate goa.Endpoint VMUpdate goa.Endpoint VMDelete goa.Endpoint VMGet goa.Endpoint VMList goa.Endpoint StorageVolumesList goa.Endpoint StorageVolumesCreate goa.Endpoint StorageVolumesDelete goa.Endpoint StorageImagesList goa.Endpoint StorageImagesCreate goa.Endpoint StorageImagesDelete goa.Endpoint StorageImagesGet goa.Endpoint }
Endpoints wraps the "spin-registry" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "spin-registry" service with endpoints.
type Image ¶
type Image struct { // Image path Path string // Is this a cdrom image? Cdrom bool // Volume name Volume *string }
Image is the result type of the spin-registry service storage_images_create method.
type Service ¶
type Service interface { // Create a VM VMCreate(context.Context, *UpdatedVM) (res uint64, err error) // Update a VM VMUpdate(context.Context, *UpdateVM) (err error) // Delete a VM by ID VMDelete(context.Context, *VMDeletePayload) (err error) // Retrieve a VM by ID VMGet(context.Context, *VMGetPayload) (res *UpdatedVM, err error) // Retrieve all VM IDs VMList(context.Context) (res []uint64, err error) // list all volumes StorageVolumesList(context.Context) (res map[string]string, err error) // create a new volume StorageVolumesCreate(context.Context, *StorageVolumesCreatePayload) (err error) // delete an existing volume StorageVolumesDelete(context.Context, *StorageVolumesDeletePayload) (err error) // list all images by volume StorageImagesList(context.Context, *StorageImagesListPayload) (res []string, err error) // add an image definition to the registry StorageImagesCreate(context.Context, *Storage) (res *Image, err error) // remove an image definition from the registry StorageImagesDelete(context.Context, *StorageImagesDeletePayload) (err error) // retrieves an image definition from the registry StorageImagesGet(context.Context, *StorageImagesGetPayload) (res *Image, err error) }
Keeper of the VMs
type Storage ¶
type Storage struct { // Volume name; required if image is not a cdrom Volume *string // Image filename, no `/` characters Image string // Image size (in gigabytes); required if image is not a cdrom ImageSize *uint // Is this image a cdrom? Cdrom bool }
Storage is the payload type of the spin-registry service storage_images_create method.
type StorageImagesDeletePayload ¶
type StorageImagesDeletePayload struct { // name of volume VolumeName string // name of image ImageName string }
StorageImagesDeletePayload is the payload type of the spin-registry service storage_images_delete method.
type StorageImagesGetPayload ¶
type StorageImagesGetPayload struct { // name of volume VolumeName string // name of image ImageName string }
StorageImagesGetPayload is the payload type of the spin-registry service storage_images_get method.
type StorageImagesListPayload ¶
type StorageImagesListPayload struct { // name of volume to list images for VolumeName string }
StorageImagesListPayload is the payload type of the spin-registry service storage_images_list method.
type StorageVolumesCreatePayload ¶
type StorageVolumesCreatePayload struct { // name of volume Name string // path to volume Path string }
StorageVolumesCreatePayload is the payload type of the spin-registry service storage_volumes_create method.
type StorageVolumesDeletePayload ¶
type StorageVolumesDeletePayload struct { // name of volume Name string }
StorageVolumesDeletePayload is the payload type of the spin-registry service storage_volumes_delete method.
type UpdatedVM ¶
type UpdatedVM struct { // Image references Images []*Image // Name of VM; does not need to be unique Name string // CPU count Cpus uint // Memory (in megabytes) Memory uint }
UpdatedVM is the payload type of the spin-registry service vm_create method.
type VMDeletePayload ¶
type VMDeletePayload struct { // ID of VM to remove ID uint64 }
VMDeletePayload is the payload type of the spin-registry service vm_delete method.
type VMGetPayload ¶
type VMGetPayload struct { // ID of VM to remove ID uint64 }
VMGetPayload is the payload type of the spin-registry service vm_get method.