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

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  package dataexchangemocks
     4  
     5  import (
     6  	context "context"
     7  
     8  	config "github.com/kaleido-io/firefly/internal/config"
     9  
    10  	dataexchange "github.com/kaleido-io/firefly/pkg/dataexchange"
    11  
    12  	fftypes "github.com/kaleido-io/firefly/pkg/fftypes"
    13  
    14  	io "io"
    15  
    16  	mock "github.com/stretchr/testify/mock"
    17  )
    18  
    19  // Plugin is an autogenerated mock type for the Plugin type
    20  type Plugin struct {
    21  	mock.Mock
    22  }
    23  
    24  // AddPeer provides a mock function with given fields: ctx, node
    25  func (_m *Plugin) AddPeer(ctx context.Context, node *fftypes.Node) error {
    26  	ret := _m.Called(ctx, node)
    27  
    28  	var r0 error
    29  	if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Node) error); ok {
    30  		r0 = rf(ctx, node)
    31  	} else {
    32  		r0 = ret.Error(0)
    33  	}
    34  
    35  	return r0
    36  }
    37  
    38  // Capabilities provides a mock function with given fields:
    39  func (_m *Plugin) Capabilities() *dataexchange.Capabilities {
    40  	ret := _m.Called()
    41  
    42  	var r0 *dataexchange.Capabilities
    43  	if rf, ok := ret.Get(0).(func() *dataexchange.Capabilities); ok {
    44  		r0 = rf()
    45  	} else {
    46  		if ret.Get(0) != nil {
    47  			r0 = ret.Get(0).(*dataexchange.Capabilities)
    48  		}
    49  	}
    50  
    51  	return r0
    52  }
    53  
    54  // DownloadBLOB provides a mock function with given fields: ctx, ns, id
    55  func (_m *Plugin) DownloadBLOB(ctx context.Context, ns string, id fftypes.UUID) (io.ReadCloser, error) {
    56  	ret := _m.Called(ctx, ns, id)
    57  
    58  	var r0 io.ReadCloser
    59  	if rf, ok := ret.Get(0).(func(context.Context, string, fftypes.UUID) io.ReadCloser); ok {
    60  		r0 = rf(ctx, ns, id)
    61  	} else {
    62  		if ret.Get(0) != nil {
    63  			r0 = ret.Get(0).(io.ReadCloser)
    64  		}
    65  	}
    66  
    67  	var r1 error
    68  	if rf, ok := ret.Get(1).(func(context.Context, string, fftypes.UUID) error); ok {
    69  		r1 = rf(ctx, ns, id)
    70  	} else {
    71  		r1 = ret.Error(1)
    72  	}
    73  
    74  	return r0, r1
    75  }
    76  
    77  // GetEndpointInfo provides a mock function with given fields: ctx
    78  func (_m *Plugin) GetEndpointInfo(ctx context.Context) (string, fftypes.JSONObject, error) {
    79  	ret := _m.Called(ctx)
    80  
    81  	var r0 string
    82  	if rf, ok := ret.Get(0).(func(context.Context) string); ok {
    83  		r0 = rf(ctx)
    84  	} else {
    85  		r0 = ret.Get(0).(string)
    86  	}
    87  
    88  	var r1 fftypes.JSONObject
    89  	if rf, ok := ret.Get(1).(func(context.Context) fftypes.JSONObject); ok {
    90  		r1 = rf(ctx)
    91  	} else {
    92  		if ret.Get(1) != nil {
    93  			r1 = ret.Get(1).(fftypes.JSONObject)
    94  		}
    95  	}
    96  
    97  	var r2 error
    98  	if rf, ok := ret.Get(2).(func(context.Context) error); ok {
    99  		r2 = rf(ctx)
   100  	} else {
   101  		r2 = ret.Error(2)
   102  	}
   103  
   104  	return r0, r1, r2
   105  }
   106  
   107  // Init provides a mock function with given fields: ctx, prefix, callbacks
   108  func (_m *Plugin) Init(ctx context.Context, prefix config.Prefix, callbacks dataexchange.Callbacks) error {
   109  	ret := _m.Called(ctx, prefix, callbacks)
   110  
   111  	var r0 error
   112  	if rf, ok := ret.Get(0).(func(context.Context, config.Prefix, dataexchange.Callbacks) error); ok {
   113  		r0 = rf(ctx, prefix, callbacks)
   114  	} else {
   115  		r0 = ret.Error(0)
   116  	}
   117  
   118  	return r0
   119  }
   120  
   121  // InitPrefix provides a mock function with given fields: prefix
   122  func (_m *Plugin) InitPrefix(prefix config.Prefix) {
   123  	_m.Called(prefix)
   124  }
   125  
   126  // Name provides a mock function with given fields:
   127  func (_m *Plugin) Name() string {
   128  	ret := _m.Called()
   129  
   130  	var r0 string
   131  	if rf, ok := ret.Get(0).(func() string); ok {
   132  		r0 = rf()
   133  	} else {
   134  		r0 = ret.Get(0).(string)
   135  	}
   136  
   137  	return r0
   138  }
   139  
   140  // SendMessage provides a mock function with given fields: ctx, node, data
   141  func (_m *Plugin) SendMessage(ctx context.Context, node *fftypes.Node, data []byte) (string, error) {
   142  	ret := _m.Called(ctx, node, data)
   143  
   144  	var r0 string
   145  	if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Node, []byte) string); ok {
   146  		r0 = rf(ctx, node, data)
   147  	} else {
   148  		r0 = ret.Get(0).(string)
   149  	}
   150  
   151  	var r1 error
   152  	if rf, ok := ret.Get(1).(func(context.Context, *fftypes.Node, []byte) error); ok {
   153  		r1 = rf(ctx, node, data)
   154  	} else {
   155  		r1 = ret.Error(1)
   156  	}
   157  
   158  	return r0, r1
   159  }
   160  
   161  // Start provides a mock function with given fields:
   162  func (_m *Plugin) Start() error {
   163  	ret := _m.Called()
   164  
   165  	var r0 error
   166  	if rf, ok := ret.Get(0).(func() error); ok {
   167  		r0 = rf()
   168  	} else {
   169  		r0 = ret.Error(0)
   170  	}
   171  
   172  	return r0
   173  }
   174  
   175  // TransferBLOB provides a mock function with given fields: ctx, node, ns, id
   176  func (_m *Plugin) TransferBLOB(ctx context.Context, node *fftypes.Node, ns string, id fftypes.UUID) (string, error) {
   177  	ret := _m.Called(ctx, node, ns, id)
   178  
   179  	var r0 string
   180  	if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Node, string, fftypes.UUID) string); ok {
   181  		r0 = rf(ctx, node, ns, id)
   182  	} else {
   183  		r0 = ret.Get(0).(string)
   184  	}
   185  
   186  	var r1 error
   187  	if rf, ok := ret.Get(1).(func(context.Context, *fftypes.Node, string, fftypes.UUID) error); ok {
   188  		r1 = rf(ctx, node, ns, id)
   189  	} else {
   190  		r1 = ret.Error(1)
   191  	}
   192  
   193  	return r0, r1
   194  }
   195  
   196  // UploadBLOB provides a mock function with given fields: ctx, ns, id, content
   197  func (_m *Plugin) UploadBLOB(ctx context.Context, ns string, id fftypes.UUID, content io.Reader) error {
   198  	ret := _m.Called(ctx, ns, id, content)
   199  
   200  	var r0 error
   201  	if rf, ok := ret.Get(0).(func(context.Context, string, fftypes.UUID, io.Reader) error); ok {
   202  		r0 = rf(ctx, ns, id, content)
   203  	} else {
   204  		r0 = ret.Error(0)
   205  	}
   206  
   207  	return r0
   208  }