Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refact: move interface #875

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion providers/aws/ec2/autoscaling_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ import (

const AWS_SERVICE_NAME_ASG = "AutoScalingGroup"

type AutoScalingGroupClient interface {
DescribeAutoScalingGroups(
ctx context.Context,
params *autoscaling.DescribeAutoScalingGroupsInput,
optFns ...func(*autoscaling.Options),
) (*autoscaling.DescribeAutoScalingGroupsOutput, error)
}

func AutoScalingGroups(ctx context.Context, clientProvider ProviderClient) ([]Resource, error) {
client := autoscaling.NewFromConfig(*clientProvider.AWSClient)

Expand All @@ -36,7 +44,6 @@ type ASGDiscoverer struct {
}

func (d ASGDiscoverer) Discover() ([]Resource, error) {

resources := make([]Resource, 0)
var queryInput autoscaling.DescribeAutoScalingGroupsInput

Expand Down
15 changes: 0 additions & 15 deletions providers/aws/ec2/autoscaling_groups_client.go

This file was deleted.