github.com/kaleido-io/firefly@v0.0.0-20210622132723-8b4b6aacb971/mocks/broadcastmocks/manager.go (about)

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  package broadcastmocks
     4  
     5  import (
     6  	context "context"
     7  
     8  	fftypes "github.com/kaleido-io/firefly/pkg/fftypes"
     9  	mock "github.com/stretchr/testify/mock"
    10  )
    11  
    12  // Manager is an autogenerated mock type for the Manager type
    13  type Manager struct {
    14  	mock.Mock
    15  }
    16  
    17  // BroadcastDatatype provides a mock function with given fields: ctx, ns, datatype
    18  func (_m *Manager) BroadcastDatatype(ctx context.Context, ns string, datatype *fftypes.Datatype) (*fftypes.Message, error) {
    19  	ret := _m.Called(ctx, ns, datatype)
    20  
    21  	var r0 *fftypes.Message
    22  	if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.Datatype) *fftypes.Message); ok {
    23  		r0 = rf(ctx, ns, datatype)
    24  	} else {
    25  		if ret.Get(0) != nil {
    26  			r0 = ret.Get(0).(*fftypes.Message)
    27  		}
    28  	}
    29  
    30  	var r1 error
    31  	if rf, ok := ret.Get(1).(func(context.Context, string, *fftypes.Datatype) error); ok {
    32  		r1 = rf(ctx, ns, datatype)
    33  	} else {
    34  		r1 = ret.Error(1)
    35  	}
    36  
    37  	return r0, r1
    38  }
    39  
    40  // BroadcastDefinition provides a mock function with given fields: ctx, def, signingIdentity, tag
    41  func (_m *Manager) BroadcastDefinition(ctx context.Context, def fftypes.Definition, signingIdentity *fftypes.Identity, tag fftypes.SystemTag) (*fftypes.Message, error) {
    42  	ret := _m.Called(ctx, def, signingIdentity, tag)
    43  
    44  	var r0 *fftypes.Message
    45  	if rf, ok := ret.Get(0).(func(context.Context, fftypes.Definition, *fftypes.Identity, fftypes.SystemTag) *fftypes.Message); ok {
    46  		r0 = rf(ctx, def, signingIdentity, tag)
    47  	} else {
    48  		if ret.Get(0) != nil {
    49  			r0 = ret.Get(0).(*fftypes.Message)
    50  		}
    51  	}
    52  
    53  	var r1 error
    54  	if rf, ok := ret.Get(1).(func(context.Context, fftypes.Definition, *fftypes.Identity, fftypes.SystemTag) error); ok {
    55  		r1 = rf(ctx, def, signingIdentity, tag)
    56  	} else {
    57  		r1 = ret.Error(1)
    58  	}
    59  
    60  	return r0, r1
    61  }
    62  
    63  // BroadcastMessage provides a mock function with given fields: ctx, ns, in
    64  func (_m *Manager) BroadcastMessage(ctx context.Context, ns string, in *fftypes.MessageInput) (*fftypes.Message, error) {
    65  	ret := _m.Called(ctx, ns, in)
    66  
    67  	var r0 *fftypes.Message
    68  	if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.MessageInput) *fftypes.Message); ok {
    69  		r0 = rf(ctx, ns, in)
    70  	} else {
    71  		if ret.Get(0) != nil {
    72  			r0 = ret.Get(0).(*fftypes.Message)
    73  		}
    74  	}
    75  
    76  	var r1 error
    77  	if rf, ok := ret.Get(1).(func(context.Context, string, *fftypes.MessageInput) error); ok {
    78  		r1 = rf(ctx, ns, in)
    79  	} else {
    80  		r1 = ret.Error(1)
    81  	}
    82  
    83  	return r0, r1
    84  }
    85  
    86  // BroadcastNamespace provides a mock function with given fields: ctx, ns
    87  func (_m *Manager) BroadcastNamespace(ctx context.Context, ns *fftypes.Namespace) (*fftypes.Message, error) {
    88  	ret := _m.Called(ctx, ns)
    89  
    90  	var r0 *fftypes.Message
    91  	if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Namespace) *fftypes.Message); ok {
    92  		r0 = rf(ctx, ns)
    93  	} else {
    94  		if ret.Get(0) != nil {
    95  			r0 = ret.Get(0).(*fftypes.Message)
    96  		}
    97  	}
    98  
    99  	var r1 error
   100  	if rf, ok := ret.Get(1).(func(context.Context, *fftypes.Namespace) error); ok {
   101  		r1 = rf(ctx, ns)
   102  	} else {
   103  		r1 = ret.Error(1)
   104  	}
   105  
   106  	return r0, r1
   107  }
   108  
   109  // GetNodeSigningIdentity provides a mock function with given fields: ctx
   110  func (_m *Manager) GetNodeSigningIdentity(ctx context.Context) (*fftypes.Identity, error) {
   111  	ret := _m.Called(ctx)
   112  
   113  	var r0 *fftypes.Identity
   114  	if rf, ok := ret.Get(0).(func(context.Context) *fftypes.Identity); ok {
   115  		r0 = rf(ctx)
   116  	} else {
   117  		if ret.Get(0) != nil {
   118  			r0 = ret.Get(0).(*fftypes.Identity)
   119  		}
   120  	}
   121  
   122  	var r1 error
   123  	if rf, ok := ret.Get(1).(func(context.Context) error); ok {
   124  		r1 = rf(ctx)
   125  	} else {
   126  		r1 = ret.Error(1)
   127  	}
   128  
   129  	return r0, r1
   130  }
   131  
   132  // HandleSystemBroadcast provides a mock function with given fields: ctx, msg, data
   133  func (_m *Manager) HandleSystemBroadcast(ctx context.Context, msg *fftypes.Message, data []*fftypes.Data) (bool, error) {
   134  	ret := _m.Called(ctx, msg, data)
   135  
   136  	var r0 bool
   137  	if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Message, []*fftypes.Data) bool); ok {
   138  		r0 = rf(ctx, msg, data)
   139  	} else {
   140  		r0 = ret.Get(0).(bool)
   141  	}
   142  
   143  	var r1 error
   144  	if rf, ok := ret.Get(1).(func(context.Context, *fftypes.Message, []*fftypes.Data) error); ok {
   145  		r1 = rf(ctx, msg, data)
   146  	} else {
   147  		r1 = ret.Error(1)
   148  	}
   149  
   150  	return r0, r1
   151  }
   152  
   153  // Start provides a mock function with given fields:
   154  func (_m *Manager) Start() error {
   155  	ret := _m.Called()
   156  
   157  	var r0 error
   158  	if rf, ok := ret.Get(0).(func() error); ok {
   159  		r0 = rf()
   160  	} else {
   161  		r0 = ret.Error(0)
   162  	}
   163  
   164  	return r0
   165  }
   166  
   167  // WaitStop provides a mock function with given fields:
   168  func (_m *Manager) WaitStop() {
   169  	_m.Called()
   170  }