This repository has been archived by the owner on Dec 19, 2023. It is now read-only.
forked from marcinwyszynski/cloudwatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmock_api.go
34 lines (28 loc) · 1.46 KB
/
mock_api.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package cloudwatch
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/cloudwatchlogs"
iface "github.com/aws/aws-sdk-go/service/cloudwatchlogs/cloudwatchlogsiface"
"github.com/stretchr/testify/mock"
)
type mockAPI struct {
mock.Mock
iface.CloudWatchLogsAPI
}
func (m *mockAPI) CreateLogStreamWithContext(ctx aws.Context, input *cloudwatchlogs.CreateLogStreamInput, opts ...request.Option) (*cloudwatchlogs.CreateLogStreamOutput, error) {
args := m.Called(ctx, input, opts)
return args.Get(0).(*cloudwatchlogs.CreateLogStreamOutput), args.Error(1)
}
func (m *mockAPI) DescribeLogStreamsWithContext(ctx aws.Context, input *cloudwatchlogs.DescribeLogStreamsInput, opts ...request.Option) (*cloudwatchlogs.DescribeLogStreamsOutput, error) {
args := m.Called(ctx, input, opts)
return args.Get(0).(*cloudwatchlogs.DescribeLogStreamsOutput), args.Error(1)
}
func (m *mockAPI) GetLogEventsWithContext(ctx aws.Context, input *cloudwatchlogs.GetLogEventsInput, opts ...request.Option) (*cloudwatchlogs.GetLogEventsOutput, error) {
args := m.Called(ctx, input, opts)
return args.Get(0).(*cloudwatchlogs.GetLogEventsOutput), args.Error(1)
}
func (m *mockAPI) PutLogEventsWithContext(ctx aws.Context, input *cloudwatchlogs.PutLogEventsInput, opts ...request.Option) (*cloudwatchlogs.PutLogEventsOutput, error) {
args := m.Called(ctx, input, opts)
return args.Get(0).(*cloudwatchlogs.PutLogEventsOutput), args.Error(1)
}