mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-21 19:56:33 +00:00
fix: add compile time interface checks
This commit is contained in:
@@ -17,6 +17,9 @@ import (
|
||||
"github.com/mulgadc/viperblock/viperblock"
|
||||
)
|
||||
|
||||
// Ensure ImageServiceImpl implements ImageService
|
||||
var _ ImageService = (*ImageServiceImpl)(nil)
|
||||
|
||||
// ImageServiceImpl handles AMI image operations with S3 storage
|
||||
type ImageServiceImpl struct {
|
||||
config *config.Config
|
||||
|
||||
@@ -27,6 +27,9 @@ import (
|
||||
"github.com/mulgadc/hive/hive/utils"
|
||||
)
|
||||
|
||||
// Ensure KeyServiceImpl implements KeyService
|
||||
var _ KeyService = (*KeyServiceImpl)(nil)
|
||||
|
||||
// KeyServiceImpl handles key pair operations with ssh-keygen and S3 storage
|
||||
type KeyServiceImpl struct {
|
||||
config *config.Config
|
||||
|
||||
@@ -16,6 +16,7 @@ import (
|
||||
"github.com/mulgadc/hive/hive/awserrors"
|
||||
"github.com/mulgadc/hive/hive/config"
|
||||
"github.com/mulgadc/hive/hive/objectstore"
|
||||
"github.com/mulgadc/hive/hive/utils"
|
||||
"github.com/mulgadc/viperblock/viperblock"
|
||||
)
|
||||
|
||||
@@ -179,7 +180,7 @@ func (s *SnapshotServiceImpl) CreateSnapshot(input *ec2.CreateSnapshotInput) (*e
|
||||
snapshotCfg := &SnapshotConfig{
|
||||
SnapshotID: snapshotID,
|
||||
VolumeID: volumeID,
|
||||
VolumeSize: int64(volumeConfig.VolumeMetadata.SizeGiB),
|
||||
VolumeSize: utils.SafeUint64ToInt64(volumeConfig.VolumeMetadata.SizeGiB),
|
||||
State: "completed",
|
||||
Progress: "100%",
|
||||
StartTime: now,
|
||||
|
||||
@@ -27,6 +27,9 @@ import (
|
||||
|
||||
const defaultGP3IOPS = 3000
|
||||
|
||||
// Ensure VolumeServiceImpl implements VolumeService
|
||||
var _ VolumeService = (*VolumeServiceImpl)(nil)
|
||||
|
||||
// VolumeServiceImpl handles EBS volume operations with S3 storage
|
||||
type VolumeServiceImpl struct {
|
||||
config *config.Config
|
||||
|
||||
Reference in New Issue
Block a user