Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseImage ¶
type BaseImage struct { UUID uuid.UUID `db:"uuid"` Name string `db:"name"` Description string `db:"description"` CacheVolumeID string `db:"volume_id"` // if CacheVolumeID is blank, not have cache image CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
BaseImage is os Image
type Europa ¶
type Europa interface { CreateVolume(ctx context.Context, name uuid.UUID, capacityGB int) (*Volume, error) CreateVolumeFromImage(ctx context.Context, name uuid.UUID, capacityGB int, imageID uuid.UUID) (*Volume, error) DeleteVolume(ctx context.Context, id string) error ListVolume(ctx context.Context) ([]Volume, error) GetVolume(ctx context.Context, id string) (*Volume, error) AttachVolumeTeleskop(ctx context.Context, id string, hostname string) (int, string, error) AttachVolumeSatelit(ctx context.Context, id string, hostname string) (int, string, error) DetachVolume(ctx context.Context, id string) error GetImage(imageID uuid.UUID) (*BaseImage, error) ListImage() ([]BaseImage, error) UploadImage(ctx context.Context, image []byte, name, description string, imageSizeGB int) (*BaseImage, error) DeleteImage(ctx context.Context, id uuid.UUID) error }
Europa is interface of volume operation.
type Volume ¶
type Volume struct { ID string `db:"id"` // equal HyperMetroPair ID in dorado Attached bool `db:"attached"` HostName string `db:"hostname"` CapacityGB uint32 `db:"capacity_gb"` BaseImageID uuid.UUID `db:"base_image_id"` HostLUNID int `db:"host_lun_id"` // set when attached BackendName string `db:"backend_name"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
A Volume is volume information
Click to show internal directories.
Click to hide internal directories.