Last active
August 26, 2020 21:08
-
-
Save azakordonets/e4b934640c0c6b3f3f7ac59ab94fa9ba to your computer and use it in GitHub Desktop.
Testing part of cloudwatch client for blog post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package aws | |
import ( | |
"github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs" | |
"github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/cloudwatchlogsiface" | |
) | |
// CloudWatchLogsClientMock is a mock for cloudwatch logs client | |
type CloudWatchLogsClientMock struct { | |
cloudwatchlogsiface.CloudWatchLogsAPI | |
Psfr func(input *cloudwatchlogs.PutSubscriptionFilterInput) cloudwatchlogs.PutSubscriptionFilterRequest | |
Dlgr func(input *cloudwatchlogs.DescribeLogGroupsInput) cloudwatchlogs.DescribeLogGroupsRequest | |
Dsfr func(input *cloudwatchlogs.DescribeSubscriptionFiltersInput) cloudwatchlogs.DescribeSubscriptionFiltersRequest | |
Delsfr func(input *cloudwatchlogs.DeleteSubscriptionFilterInput) cloudwatchlogs.DeleteSubscriptionFilterRequest | |
} | |
// PutSubscriptionFilterRequest mocks cloudwatch logs client method | |
func (c CloudWatchLogsClientMock) PutSubscriptionFilterRequest(input *cloudwatchlogs.PutSubscriptionFilterInput) cloudwatchlogs.PutSubscriptionFilterRequest { | |
return c.Psfr(input) | |
} | |
// DescribeLogGroupsRequest mocks cloudwatch logs client method | |
func (c CloudWatchLogsClientMock) DescribeLogGroupsRequest(input *cloudwatchlogs.DescribeLogGroupsInput) cloudwatchlogs.DescribeLogGroupsRequest { | |
return c.Dlgr(input) | |
} | |
// DescribeSubscriptionFiltersRequest mocks cloudwatch logs client method | |
func (c CloudWatchLogsClientMock) DescribeSubscriptionFiltersRequest(input *cloudwatchlogs.DescribeSubscriptionFiltersInput) cloudwatchlogs.DescribeSubscriptionFiltersRequest { | |
return c.Dsfr(input) | |
} | |
// DeleteSubscriptionFilterRequest mocks cloudwatch logs client method | |
func (c CloudWatchLogsClientMock) DeleteSubscriptionFilterRequest(input *cloudwatchlogs.DeleteSubscriptionFilterInput) cloudwatchlogs.DeleteSubscriptionFilterRequest { | |
return c.Delsfr(input) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment