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

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