fix: add compile time interface checks

This commit is contained in:
Julian Sommer
2026-02-10 08:55:23 +10:00
parent 513fd07ced
commit 05a608855c
4 changed files with 11 additions and 1 deletions
+3
View File
@@ -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
+3
View File
@@ -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
+2 -1
View File
@@ -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,
+3
View File
@@ -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