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

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  package networkmapmocks
     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  // GetNodeByID provides a mock function with given fields: ctx, id
    20  func (_m *Manager) GetNodeByID(ctx context.Context, id string) (*fftypes.Node, error) {
    21  	ret := _m.Called(ctx, id)
    22  
    23  	var r0 *fftypes.Node
    24  	if rf, ok := ret.Get(0).(func(context.Context, string) *fftypes.Node); ok {
    25  		r0 = rf(ctx, id)
    26  	} else {
    27  		if ret.Get(0) != nil {
    28  			r0 = ret.Get(0).(*fftypes.Node)
    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  // GetNodes provides a mock function with given fields: ctx, filter
    43  func (_m *Manager) GetNodes(ctx context.Context, filter database.AndFilter) ([]*fftypes.Node, error) {
    44  	ret := _m.Called(ctx, filter)
    45  
    46  	var r0 []*fftypes.Node
    47  	if rf, ok := ret.Get(0).(func(context.Context, database.AndFilter) []*fftypes.Node); ok {
    48  		r0 = rf(ctx, filter)
    49  	} else {
    50  		if ret.Get(0) != nil {
    51  			r0 = ret.Get(0).([]*fftypes.Node)
    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  // GetOrganizationByID provides a mock function with given fields: ctx, id
    66  func (_m *Manager) GetOrganizationByID(ctx context.Context, id string) (*fftypes.Organization, error) {
    67  	ret := _m.Called(ctx, id)
    68  
    69  	var r0 *fftypes.Organization
    70  	if rf, ok := ret.Get(0).(func(context.Context, string) *fftypes.Organization); ok {
    71  		r0 = rf(ctx, id)
    72  	} else {
    73  		if ret.Get(0) != nil {
    74  			r0 = ret.Get(0).(*fftypes.Organization)
    75  		}
    76  	}
    77  
    78  	var r1 error
    79  	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
    80  		r1 = rf(ctx, id)
    81  	} else {
    82  		r1 = ret.Error(1)
    83  	}
    84  
    85  	return r0, r1
    86  }
    87  
    88  // GetOrganizations provides a mock function with given fields: ctx, filter
    89  func (_m *Manager) GetOrganizations(ctx context.Context, filter database.AndFilter) ([]*fftypes.Organization, error) {
    90  	ret := _m.Called(ctx, filter)
    91  
    92  	var r0 []*fftypes.Organization
    93  	if rf, ok := ret.Get(0).(func(context.Context, database.AndFilter) []*fftypes.Organization); ok {
    94  		r0 = rf(ctx, filter)
    95  	} else {
    96  		if ret.Get(0) != nil {
    97  			r0 = ret.Get(0).([]*fftypes.Organization)
    98  		}
    99  	}
   100  
   101  	var r1 error
   102  	if rf, ok := ret.Get(1).(func(context.Context, database.AndFilter) error); ok {
   103  		r1 = rf(ctx, filter)
   104  	} else {
   105  		r1 = ret.Error(1)
   106  	}
   107  
   108  	return r0, r1
   109  }
   110  
   111  // RegisterNode provides a mock function with given fields: ctx
   112  func (_m *Manager) RegisterNode(ctx context.Context) (*fftypes.Message, error) {
   113  	ret := _m.Called(ctx)
   114  
   115  	var r0 *fftypes.Message
   116  	if rf, ok := ret.Get(0).(func(context.Context) *fftypes.Message); ok {
   117  		r0 = rf(ctx)
   118  	} else {
   119  		if ret.Get(0) != nil {
   120  			r0 = ret.Get(0).(*fftypes.Message)
   121  		}
   122  	}
   123  
   124  	var r1 error
   125  	if rf, ok := ret.Get(1).(func(context.Context) error); ok {
   126  		r1 = rf(ctx)
   127  	} else {
   128  		r1 = ret.Error(1)
   129  	}
   130  
   131  	return r0, r1
   132  }
   133  
   134  // RegisterNodeOrganization provides a mock function with given fields: ctx
   135  func (_m *Manager) RegisterNodeOrganization(ctx context.Context) (*fftypes.Message, error) {
   136  	ret := _m.Called(ctx)
   137  
   138  	var r0 *fftypes.Message
   139  	if rf, ok := ret.Get(0).(func(context.Context) *fftypes.Message); ok {
   140  		r0 = rf(ctx)
   141  	} else {
   142  		if ret.Get(0) != nil {
   143  			r0 = ret.Get(0).(*fftypes.Message)
   144  		}
   145  	}
   146  
   147  	var r1 error
   148  	if rf, ok := ret.Get(1).(func(context.Context) error); ok {
   149  		r1 = rf(ctx)
   150  	} else {
   151  		r1 = ret.Error(1)
   152  	}
   153  
   154  	return r0, r1
   155  }
   156  
   157  // RegisterOrganization provides a mock function with given fields: ctx, org
   158  func (_m *Manager) RegisterOrganization(ctx context.Context, org *fftypes.Organization) (*fftypes.Message, error) {
   159  	ret := _m.Called(ctx, org)
   160  
   161  	var r0 *fftypes.Message
   162  	if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Organization) *fftypes.Message); ok {
   163  		r0 = rf(ctx, org)
   164  	} else {
   165  		if ret.Get(0) != nil {
   166  			r0 = ret.Get(0).(*fftypes.Message)
   167  		}
   168  	}
   169  
   170  	var r1 error
   171  	if rf, ok := ret.Get(1).(func(context.Context, *fftypes.Organization) error); ok {
   172  		r1 = rf(ctx, org)
   173  	} else {
   174  		r1 = ret.Error(1)
   175  	}
   176  
   177  	return r0, r1
   178  }