Documentation ¶
Index ¶
- Constants
- func AttachVolumeFailErrMocked(t *testing.T, volumeIn *types.Volume) *types.Server
- func AttachVolumeFailJSONMocked(t *testing.T, volumeIn *types.Volume) *types.Server
- func AttachVolumeFailStatusMocked(t *testing.T, volumeIn *types.Volume) *types.Server
- func AttachVolumeMocked(t *testing.T, volumeIn *types.Volume) *types.Server
- func CreateVolumeFailErrMocked(t *testing.T, volumeIn *types.Volume) *types.Volume
- func CreateVolumeFailJSONMocked(t *testing.T, volumeIn *types.Volume) *types.Volume
- func CreateVolumeFailStatusMocked(t *testing.T, volumeIn *types.Volume) *types.Volume
- func CreateVolumeMocked(t *testing.T, volumeIn *types.Volume) *types.Volume
- func DeleteVolumeFailErrMocked(t *testing.T, volumeIn *types.Volume)
- func DeleteVolumeFailStatusMocked(t *testing.T, volumeIn *types.Volume)
- func DeleteVolumeMocked(t *testing.T, volumeIn *types.Volume)
- func DetachVolumeFailErrMocked(t *testing.T, volumeIn *types.Volume)
- func DetachVolumeFailStatusMocked(t *testing.T, volumeIn *types.Volume)
- func DetachVolumeMocked(t *testing.T, volumeIn *types.Volume)
- func DiscardVolumeFailErrMocked(t *testing.T, volumeIn *types.Volume)
- func DiscardVolumeFailStatusMocked(t *testing.T, volumeIn *types.Volume)
- func DiscardVolumeMocked(t *testing.T, volumeIn *types.Volume)
- func GetStoragePlanFailErrMocked(t *testing.T, storagePlan *types.StoragePlan) *types.StoragePlan
- func GetStoragePlanFailJSONMocked(t *testing.T, storagePlan *types.StoragePlan) *types.StoragePlan
- func GetStoragePlanFailStatusMocked(t *testing.T, storagePlan *types.StoragePlan) *types.StoragePlan
- func GetStoragePlanMocked(t *testing.T, storagePlan *types.StoragePlan) *types.StoragePlan
- func GetVolumeFailErrMocked(t *testing.T, volumeIn *types.Volume) *types.Volume
- func GetVolumeFailJSONMocked(t *testing.T, volumeIn *types.Volume) *types.Volume
- func GetVolumeFailStatusMocked(t *testing.T, volumeIn *types.Volume) *types.Volume
- func GetVolumeMocked(t *testing.T, volumeIn *types.Volume) *types.Volume
- func ListVolumesFailErrMocked(t *testing.T, volumesIn []*types.Volume) []*types.Volume
- func ListVolumesFailJSONMocked(t *testing.T, volumesIn []*types.Volume) []*types.Volume
- func ListVolumesFailStatusMocked(t *testing.T, volumesIn []*types.Volume) []*types.Volume
- func ListVolumesMocked(t *testing.T, volumesIn []*types.Volume) []*types.Volume
- func ListVolumesMockedFilteredByServer(t *testing.T, volumesIn []*types.Volume) []*types.Volume
- func UpdateVolumeFailErrMocked(t *testing.T, volumeIn *types.Volume) *types.Volume
- func UpdateVolumeFailJSONMocked(t *testing.T, volumeIn *types.Volume) *types.Volume
- func UpdateVolumeFailStatusMocked(t *testing.T, volumeIn *types.Volume) *types.Volume
- func UpdateVolumeMocked(t *testing.T, volumeIn *types.Volume) *types.Volume
- type StoragePlanService
- type VolumeService
- func (vs *VolumeService) AttachVolume(volumeID string, volumeParams *map[string]interface{}) (server *types.Server, err error)
- func (vs *VolumeService) CreateVolume(volumeParams *map[string]interface{}) (volume *types.Volume, err error)
- func (vs *VolumeService) DeleteVolume(volumeID string) (err error)
- func (vs *VolumeService) DetachVolume(volumeID string) (err error)
- func (vs *VolumeService) DiscardVolume(volumeID string) (err error)
- func (vs *VolumeService) GetVolume(volumeID string) (volume *types.Volume, err error)
- func (vs *VolumeService) ListVolumes(serverID string) (volumes []*types.Volume, err error)
- func (vs *VolumeService) UpdateVolume(volumeID string, volumeParams *map[string]interface{}) (volume *types.Volume, err error)
Constants ¶
const APIPathCloudServerVolumes = "/cloud/servers/%s/volumes"
const APIPathStoragePlan = "/storage/plans/%s"
const APIPathStorageVolume = "/storage/volumes/%s"
const APIPathStorageVolumeAttachedServer = "/storage/volumes/%s/attached_server"
const APIPathStorageVolumeDiscard = "/storage/volumes/%s/discard"
const APIPathStorageVolumes = "/storage/volumes"
Variables ¶
This section is empty.
Functions ¶
func AttachVolumeFailErrMocked ¶
AttachVolumeFailErrMocked test mocked function
func AttachVolumeFailJSONMocked ¶
AttachVolumeFailJSONMocked test mocked function
func AttachVolumeFailStatusMocked ¶
AttachVolumeFailStatusMocked test mocked function
func AttachVolumeMocked ¶
AttachVolumeMocked test mocked function
func CreateVolumeFailErrMocked ¶
CreateVolumeFailErrMocked test mocked function
func CreateVolumeFailJSONMocked ¶
CreateVolumeFailJSONMocked test mocked function
func CreateVolumeFailStatusMocked ¶
CreateVolumeFailStatusMocked test mocked function
func CreateVolumeMocked ¶
CreateVolumeMocked test mocked function
func DeleteVolumeFailErrMocked ¶
DeleteVolumeFailErrMocked test mocked function
func DeleteVolumeFailStatusMocked ¶
DeleteVolumeFailStatusMocked test mocked function
func DeleteVolumeMocked ¶
DeleteVolumeMocked test mocked function
func DetachVolumeFailErrMocked ¶
DetachVolumeFailErrMocked test mocked function
func DetachVolumeFailStatusMocked ¶
DetachVolumeFailStatusMocked test mocked function
func DetachVolumeMocked ¶
DetachVolumeMocked test mocked function
func DiscardVolumeFailErrMocked ¶
DiscardVolumeFailErrMocked test mocked function
func DiscardVolumeFailStatusMocked ¶
DiscardVolumeFailStatusMocked test mocked function
func DiscardVolumeMocked ¶
DiscardVolumeMocked test mocked function
func GetStoragePlanFailErrMocked ¶
func GetStoragePlanFailErrMocked(t *testing.T, storagePlan *types.StoragePlan) *types.StoragePlan
GetStoragePlanFailErrMocked test mocked function
func GetStoragePlanFailJSONMocked ¶
func GetStoragePlanFailJSONMocked(t *testing.T, storagePlan *types.StoragePlan) *types.StoragePlan
GetStoragePlanFailJSONMocked test mocked function
func GetStoragePlanFailStatusMocked ¶
func GetStoragePlanFailStatusMocked(t *testing.T, storagePlan *types.StoragePlan) *types.StoragePlan
GetStoragePlanFailStatusMocked test mocked function
func GetStoragePlanMocked ¶
func GetStoragePlanMocked(t *testing.T, storagePlan *types.StoragePlan) *types.StoragePlan
GetStoragePlanMocked test mocked function
func GetVolumeFailErrMocked ¶
GetVolumeFailErrMocked test mocked function
func GetVolumeFailJSONMocked ¶
GetVolumeFailJSONMocked test mocked function
func GetVolumeFailStatusMocked ¶
GetVolumeFailStatusMocked test mocked function
func GetVolumeMocked ¶
GetVolumeMocked test mocked function
func ListVolumesFailErrMocked ¶ added in v0.12.0
ListVolumesFailErrMocked test mocked function
func ListVolumesFailJSONMocked ¶ added in v0.12.0
ListVolumesFailJSONMocked test mocked function
func ListVolumesFailStatusMocked ¶ added in v0.12.0
ListVolumesFailStatusMocked test mocked function
func ListVolumesMocked ¶ added in v0.12.0
ListVolumesMocked test mocked function
func ListVolumesMockedFilteredByServer ¶ added in v0.12.0
func UpdateVolumeFailErrMocked ¶
UpdateVolumeFailErrMocked test mocked function
func UpdateVolumeFailJSONMocked ¶
UpdateVolumeFailJSONMocked test mocked function
func UpdateVolumeFailStatusMocked ¶
UpdateVolumeFailStatusMocked test mocked function
Types ¶
type StoragePlanService ¶
type StoragePlanService struct {
// contains filtered or unexported fields
}
StoragePlanService manages storage plan operations
func NewStoragePlanService ¶
func NewStoragePlanService(concertoService utils.ConcertoService) (*StoragePlanService, error)
NewStoragePlanService returns a Concerto storage plan service
func (*StoragePlanService) GetStoragePlan ¶
func (sps *StoragePlanService) GetStoragePlan(storagePlanID string) (storagePlan *types.StoragePlan, err error)
GetStoragePlan returns a storage plan by its ID
type VolumeService ¶
type VolumeService struct {
// contains filtered or unexported fields
}
VolumeService manages volume operations
func NewVolumeService ¶
func NewVolumeService(concertoService utils.ConcertoService) (*VolumeService, error)
NewVolumeService returns a Concerto Volume service
func (*VolumeService) AttachVolume ¶
func (vs *VolumeService) AttachVolume( volumeID string, volumeParams *map[string]interface{}, ) (server *types.Server, err error)
AttachVolume attaches a Volume by its ID
func (*VolumeService) CreateVolume ¶
func (vs *VolumeService) CreateVolume(volumeParams *map[string]interface{}) (volume *types.Volume, err error)
CreateVolume creates a Volume
func (*VolumeService) DeleteVolume ¶
func (vs *VolumeService) DeleteVolume(volumeID string) (err error)
DeleteVolume deletes a Volume by its ID
func (*VolumeService) DetachVolume ¶
func (vs *VolumeService) DetachVolume(volumeID string) (err error)
DetachVolume detaches a Volume by its ID
func (*VolumeService) DiscardVolume ¶
func (vs *VolumeService) DiscardVolume(volumeID string) (err error)
DiscardVolume discards a Volume by its ID
func (*VolumeService) GetVolume ¶
func (vs *VolumeService) GetVolume(volumeID string) (volume *types.Volume, err error)
GetVolume returns a Volume by its ID
func (*VolumeService) ListVolumes ¶ added in v0.12.0
func (vs *VolumeService) ListVolumes(serverID string) (volumes []*types.Volume, err error)
ListVolumes returns the list of Volumes as an array of Volume
func (*VolumeService) UpdateVolume ¶
func (vs *VolumeService) UpdateVolume( volumeID string, volumeParams *map[string]interface{}, ) (volume *types.Volume, err error)
UpdateVolume updates a Volume by its ID