This repository has been archived by the owner on Nov 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
/
transport.go
54 lines (43 loc) · 1.57 KB
/
transport.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Code generated by mockery v1.0.0. DO NOT EDIT.
package mocks
import context "context"
import events "github.com/vmware/dispatch/pkg/events"
import mock "github.com/stretchr/testify/mock"
// Transport is an autogenerated mock type for the Transport type
type Transport struct {
mock.Mock
}
// Close provides a mock function with given fields:
func (_m *Transport) Close() {
_m.Called()
}
// Publish provides a mock function with given fields: ctx, event, topic, organization
func (_m *Transport) Publish(ctx context.Context, event *events.CloudEvent, topic string, organization string) error {
ret := _m.Called(ctx, event, topic, organization)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *events.CloudEvent, string, string) error); ok {
r0 = rf(ctx, event, topic, organization)
} else {
r0 = ret.Error(0)
}
return r0
}
// Subscribe provides a mock function with given fields: ctx, topic, organization, handler
func (_m *Transport) Subscribe(ctx context.Context, topic string, organization string, handler events.Handler) (events.Subscription, error) {
ret := _m.Called(ctx, topic, organization, handler)
var r0 events.Subscription
if rf, ok := ret.Get(0).(func(context.Context, string, string, events.Handler) events.Subscription); ok {
r0 = rf(ctx, topic, organization, handler)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(events.Subscription)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string, events.Handler) error); ok {
r1 = rf(ctx, topic, organization, handler)
} else {
r1 = ret.Error(1)
}
return r0, r1
}