Skip to content

Commit

Permalink
refactor(neptune-snapshot): standardization
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen committed Jan 2, 2025
1 parent 323856a commit 78cb22c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions resources/neptune-snapshots.go → resources/neptune-snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package resources

import (
"context"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/neptune"
"github.com/ekristen/libnuke/pkg/types"

"github.com/ekristen/libnuke/pkg/registry"
"github.com/ekristen/libnuke/pkg/resource"
Expand Down Expand Up @@ -66,14 +66,18 @@ type NeptuneSnapshot struct {
ID *string
}

func (f *NeptuneSnapshot) Remove(_ context.Context) error {
_, err := f.svc.DeleteDBClusterSnapshot(&neptune.DeleteDBClusterSnapshotInput{
DBClusterSnapshotIdentifier: f.ID,
func (r *NeptuneSnapshot) Remove(_ context.Context) error {
_, err := r.svc.DeleteDBClusterSnapshot(&neptune.DeleteDBClusterSnapshotInput{
DBClusterSnapshotIdentifier: r.ID,
})

return err
}

func (f *NeptuneSnapshot) String() string {
return *f.ID
func (r *NeptuneSnapshot) String() string {
return *r.ID
}

func (r *NeptuneSnapshot) Properties() types.Properties {
return types.NewPropertiesFromStruct(r)
}

0 comments on commit 78cb22c

Please # to comment.