github.com/kaleido-io/firefly@v0.0.0-20210622132723-8b4b6aacb971/mocks/privatemessagingmocks/manager.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 package privatemessagingmocks 4 5 import ( 6 context "context" 7 8 database "github.com/kaleido-io/firefly/pkg/database" 9 fftypes "github.com/kaleido-io/firefly/pkg/fftypes" 10 11 mock "github.com/stretchr/testify/mock" 12 ) 13 14 // Manager is an autogenerated mock type for the Manager type 15 type Manager struct { 16 mock.Mock 17 } 18 19 // GetGroupByID provides a mock function with given fields: ctx, id 20 func (_m *Manager) GetGroupByID(ctx context.Context, id string) (*fftypes.Group, error) { 21 ret := _m.Called(ctx, id) 22 23 var r0 *fftypes.Group 24 if rf, ok := ret.Get(0).(func(context.Context, string) *fftypes.Group); ok { 25 r0 = rf(ctx, id) 26 } else { 27 if ret.Get(0) != nil { 28 r0 = ret.Get(0).(*fftypes.Group) 29 } 30 } 31 32 var r1 error 33 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 34 r1 = rf(ctx, id) 35 } else { 36 r1 = ret.Error(1) 37 } 38 39 return r0, r1 40 } 41 42 // GetGroups provides a mock function with given fields: ctx, filter 43 func (_m *Manager) GetGroups(ctx context.Context, filter database.AndFilter) ([]*fftypes.Group, error) { 44 ret := _m.Called(ctx, filter) 45 46 var r0 []*fftypes.Group 47 if rf, ok := ret.Get(0).(func(context.Context, database.AndFilter) []*fftypes.Group); ok { 48 r0 = rf(ctx, filter) 49 } else { 50 if ret.Get(0) != nil { 51 r0 = ret.Get(0).([]*fftypes.Group) 52 } 53 } 54 55 var r1 error 56 if rf, ok := ret.Get(1).(func(context.Context, database.AndFilter) error); ok { 57 r1 = rf(ctx, filter) 58 } else { 59 r1 = ret.Error(1) 60 } 61 62 return r0, r1 63 } 64 65 // ResolveInitGroup provides a mock function with given fields: ctx, msg 66 func (_m *Manager) ResolveInitGroup(ctx context.Context, msg *fftypes.Message) (*fftypes.Group, error) { 67 ret := _m.Called(ctx, msg) 68 69 var r0 *fftypes.Group 70 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Message) *fftypes.Group); ok { 71 r0 = rf(ctx, msg) 72 } else { 73 if ret.Get(0) != nil { 74 r0 = ret.Get(0).(*fftypes.Group) 75 } 76 } 77 78 var r1 error 79 if rf, ok := ret.Get(1).(func(context.Context, *fftypes.Message) error); ok { 80 r1 = rf(ctx, msg) 81 } else { 82 r1 = ret.Error(1) 83 } 84 85 return r0, r1 86 } 87 88 // SendMessage provides a mock function with given fields: ctx, ns, in 89 func (_m *Manager) SendMessage(ctx context.Context, ns string, in *fftypes.MessageInput) (*fftypes.Message, error) { 90 ret := _m.Called(ctx, ns, in) 91 92 var r0 *fftypes.Message 93 if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.MessageInput) *fftypes.Message); ok { 94 r0 = rf(ctx, ns, in) 95 } else { 96 if ret.Get(0) != nil { 97 r0 = ret.Get(0).(*fftypes.Message) 98 } 99 } 100 101 var r1 error 102 if rf, ok := ret.Get(1).(func(context.Context, string, *fftypes.MessageInput) error); ok { 103 r1 = rf(ctx, ns, in) 104 } else { 105 r1 = ret.Error(1) 106 } 107 108 return r0, r1 109 } 110 111 // Start provides a mock function with given fields: 112 func (_m *Manager) Start() error { 113 ret := _m.Called() 114 115 var r0 error 116 if rf, ok := ret.Get(0).(func() error); ok { 117 r0 = rf() 118 } else { 119 r0 = ret.Error(0) 120 } 121 122 return r0 123 }