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

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  package publicstoragemocks
     4  
     5  import (
     6  	context "context"
     7  
     8  	config "github.com/kaleido-io/firefly/internal/config"
     9  
    10  	fftypes "github.com/kaleido-io/firefly/pkg/fftypes"
    11  
    12  	io "io"
    13  
    14  	mock "github.com/stretchr/testify/mock"
    15  
    16  	publicstorage "github.com/kaleido-io/firefly/pkg/publicstorage"
    17  )
    18  
    19  // Plugin is an autogenerated mock type for the Plugin type
    20  type Plugin struct {
    21  	mock.Mock
    22  }
    23  
    24  // Capabilities provides a mock function with given fields:
    25  func (_m *Plugin) Capabilities() *publicstorage.Capabilities {
    26  	ret := _m.Called()
    27  
    28  	var r0 *publicstorage.Capabilities
    29  	if rf, ok := ret.Get(0).(func() *publicstorage.Capabilities); ok {
    30  		r0 = rf()
    31  	} else {
    32  		if ret.Get(0) != nil {
    33  			r0 = ret.Get(0).(*publicstorage.Capabilities)
    34  		}
    35  	}
    36  
    37  	return r0
    38  }
    39  
    40  // Init provides a mock function with given fields: ctx, prefix, callbacks
    41  func (_m *Plugin) Init(ctx context.Context, prefix config.Prefix, callbacks publicstorage.Callbacks) error {
    42  	ret := _m.Called(ctx, prefix, callbacks)
    43  
    44  	var r0 error
    45  	if rf, ok := ret.Get(0).(func(context.Context, config.Prefix, publicstorage.Callbacks) error); ok {
    46  		r0 = rf(ctx, prefix, callbacks)
    47  	} else {
    48  		r0 = ret.Error(0)
    49  	}
    50  
    51  	return r0
    52  }
    53  
    54  // InitPrefix provides a mock function with given fields: prefix
    55  func (_m *Plugin) InitPrefix(prefix config.Prefix) {
    56  	_m.Called(prefix)
    57  }
    58  
    59  // Name provides a mock function with given fields:
    60  func (_m *Plugin) Name() string {
    61  	ret := _m.Called()
    62  
    63  	var r0 string
    64  	if rf, ok := ret.Get(0).(func() string); ok {
    65  		r0 = rf()
    66  	} else {
    67  		r0 = ret.Get(0).(string)
    68  	}
    69  
    70  	return r0
    71  }
    72  
    73  // PublishData provides a mock function with given fields: ctx, data
    74  func (_m *Plugin) PublishData(ctx context.Context, data io.Reader) (*fftypes.Bytes32, string, error) {
    75  	ret := _m.Called(ctx, data)
    76  
    77  	var r0 *fftypes.Bytes32
    78  	if rf, ok := ret.Get(0).(func(context.Context, io.Reader) *fftypes.Bytes32); ok {
    79  		r0 = rf(ctx, data)
    80  	} else {
    81  		if ret.Get(0) != nil {
    82  			r0 = ret.Get(0).(*fftypes.Bytes32)
    83  		}
    84  	}
    85  
    86  	var r1 string
    87  	if rf, ok := ret.Get(1).(func(context.Context, io.Reader) string); ok {
    88  		r1 = rf(ctx, data)
    89  	} else {
    90  		r1 = ret.Get(1).(string)
    91  	}
    92  
    93  	var r2 error
    94  	if rf, ok := ret.Get(2).(func(context.Context, io.Reader) error); ok {
    95  		r2 = rf(ctx, data)
    96  	} else {
    97  		r2 = ret.Error(2)
    98  	}
    99  
   100  	return r0, r1, r2
   101  }
   102  
   103  // RetrieveData provides a mock function with given fields: ctx, payloadRef
   104  func (_m *Plugin) RetrieveData(ctx context.Context, payloadRef *fftypes.Bytes32) (io.ReadCloser, error) {
   105  	ret := _m.Called(ctx, payloadRef)
   106  
   107  	var r0 io.ReadCloser
   108  	if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Bytes32) io.ReadCloser); ok {
   109  		r0 = rf(ctx, payloadRef)
   110  	} else {
   111  		if ret.Get(0) != nil {
   112  			r0 = ret.Get(0).(io.ReadCloser)
   113  		}
   114  	}
   115  
   116  	var r1 error
   117  	if rf, ok := ret.Get(1).(func(context.Context, *fftypes.Bytes32) error); ok {
   118  		r1 = rf(ctx, payloadRef)
   119  	} else {
   120  		r1 = ret.Error(1)
   121  	}
   122  
   123  	return r0, r1
   124  }