Skip to content

Commit

Permalink
Clean up AWS client
Browse files Browse the repository at this point in the history
Remove not used functions
  • Loading branch information
janboll committed Sep 29, 2022
1 parent 054d1af commit c6cfea0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 84 deletions.
24 changes: 0 additions & 24 deletions pkg/awsclient/awsclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ type Client interface {
DescribeTransitGatewaysWithContext(ctx aws.Context, input *ec2.DescribeTransitGatewaysInput, opts ...request.Option) (*ec2.DescribeTransitGatewaysOutput, error)

// Service Quota
GetServiceQuota(*servicequotas.GetServiceQuotaInput) (*servicequotas.GetServiceQuotaOutput, error)
GetServiceQuotaWithContext(ctx aws.Context, input *servicequotas.GetServiceQuotaInput, opts ...request.Option) (*servicequotas.GetServiceQuotaOutput, error)
RequestServiceQuotaIncrease(*servicequotas.RequestServiceQuotaIncreaseInput) (*servicequotas.RequestServiceQuotaIncreaseOutput, error)
ListRequestedServiceQuotaChangeHistory(*servicequotas.ListRequestedServiceQuotaChangeHistoryInput) (*servicequotas.ListRequestedServiceQuotaChangeHistoryOutput, error)
ListRequestedServiceQuotaChangeHistoryByQuota(*servicequotas.ListRequestedServiceQuotaChangeHistoryByQuotaInput) (*servicequotas.ListRequestedServiceQuotaChangeHistoryByQuotaOutput, error)
}

type awsClient struct {
Expand All @@ -37,30 +33,10 @@ func (c *awsClient) DescribeTransitGatewaysWithContext(ctx aws.Context, input *e
return c.ec2Client.DescribeTransitGatewaysWithContext(ctx, input, opts...)
}

func (c *awsClient) DeleteSubnet(input *ec2.DeleteSubnetInput) (*ec2.DeleteSubnetOutput, error) {
return c.ec2Client.DeleteSubnet(input)
}

func (c *awsClient) GetServiceQuota(input *servicequotas.GetServiceQuotaInput) (*servicequotas.GetServiceQuotaOutput, error) {
return c.serviceQuotasClient.GetServiceQuota(input)
}

func (c *awsClient) GetServiceQuotaWithContext(ctx aws.Context, input *servicequotas.GetServiceQuotaInput, opts ...request.Option) (*servicequotas.GetServiceQuotaOutput, error) {
return c.serviceQuotasClient.GetServiceQuotaWithContext(ctx, input, opts...)
}

func (c *awsClient) RequestServiceQuotaIncrease(input *servicequotas.RequestServiceQuotaIncreaseInput) (*servicequotas.RequestServiceQuotaIncreaseOutput, error) {
return c.serviceQuotasClient.RequestServiceQuotaIncrease(input)
}

func (c *awsClient) ListRequestedServiceQuotaChangeHistory(input *servicequotas.ListRequestedServiceQuotaChangeHistoryInput) (*servicequotas.ListRequestedServiceQuotaChangeHistoryOutput, error) {
return c.serviceQuotasClient.ListRequestedServiceQuotaChangeHistory(input)
}

func (c *awsClient) ListRequestedServiceQuotaChangeHistoryByQuota(input *servicequotas.ListRequestedServiceQuotaChangeHistoryByQuotaInput) (*servicequotas.ListRequestedServiceQuotaChangeHistoryByQuotaOutput, error) {
return c.serviceQuotasClient.ListRequestedServiceQuotaChangeHistoryByQuota(input)
}

func NewClientFromSession(sess *session.Session) Client {
return &awsClient{
ec2Client: ec2.New(sess),
Expand Down
60 changes: 0 additions & 60 deletions pkg/awsclient/mock/zz_generated.mock_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c6cfea0

Please sign in to comment.