github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/mempool/mock/dns_cache.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mempool
     4  
     5  import (
     6  	mempool "github.com/onflow/flow-go/module/mempool"
     7  	mock "github.com/stretchr/testify/mock"
     8  
     9  	net "net"
    10  )
    11  
    12  // DNSCache is an autogenerated mock type for the DNSCache type
    13  type DNSCache struct {
    14  	mock.Mock
    15  }
    16  
    17  // GetDomainIp provides a mock function with given fields: _a0
    18  func (_m *DNSCache) GetDomainIp(_a0 string) (*mempool.IpRecord, bool) {
    19  	ret := _m.Called(_a0)
    20  
    21  	var r0 *mempool.IpRecord
    22  	var r1 bool
    23  	if rf, ok := ret.Get(0).(func(string) (*mempool.IpRecord, bool)); ok {
    24  		return rf(_a0)
    25  	}
    26  	if rf, ok := ret.Get(0).(func(string) *mempool.IpRecord); ok {
    27  		r0 = rf(_a0)
    28  	} else {
    29  		if ret.Get(0) != nil {
    30  			r0 = ret.Get(0).(*mempool.IpRecord)
    31  		}
    32  	}
    33  
    34  	if rf, ok := ret.Get(1).(func(string) bool); ok {
    35  		r1 = rf(_a0)
    36  	} else {
    37  		r1 = ret.Get(1).(bool)
    38  	}
    39  
    40  	return r0, r1
    41  }
    42  
    43  // GetTxtRecord provides a mock function with given fields: _a0
    44  func (_m *DNSCache) GetTxtRecord(_a0 string) (*mempool.TxtRecord, bool) {
    45  	ret := _m.Called(_a0)
    46  
    47  	var r0 *mempool.TxtRecord
    48  	var r1 bool
    49  	if rf, ok := ret.Get(0).(func(string) (*mempool.TxtRecord, bool)); ok {
    50  		return rf(_a0)
    51  	}
    52  	if rf, ok := ret.Get(0).(func(string) *mempool.TxtRecord); ok {
    53  		r0 = rf(_a0)
    54  	} else {
    55  		if ret.Get(0) != nil {
    56  			r0 = ret.Get(0).(*mempool.TxtRecord)
    57  		}
    58  	}
    59  
    60  	if rf, ok := ret.Get(1).(func(string) bool); ok {
    61  		r1 = rf(_a0)
    62  	} else {
    63  		r1 = ret.Get(1).(bool)
    64  	}
    65  
    66  	return r0, r1
    67  }
    68  
    69  // LockIPDomain provides a mock function with given fields: _a0
    70  func (_m *DNSCache) LockIPDomain(_a0 string) (bool, error) {
    71  	ret := _m.Called(_a0)
    72  
    73  	var r0 bool
    74  	var r1 error
    75  	if rf, ok := ret.Get(0).(func(string) (bool, error)); ok {
    76  		return rf(_a0)
    77  	}
    78  	if rf, ok := ret.Get(0).(func(string) bool); ok {
    79  		r0 = rf(_a0)
    80  	} else {
    81  		r0 = ret.Get(0).(bool)
    82  	}
    83  
    84  	if rf, ok := ret.Get(1).(func(string) error); ok {
    85  		r1 = rf(_a0)
    86  	} else {
    87  		r1 = ret.Error(1)
    88  	}
    89  
    90  	return r0, r1
    91  }
    92  
    93  // LockTxtRecord provides a mock function with given fields: _a0
    94  func (_m *DNSCache) LockTxtRecord(_a0 string) (bool, error) {
    95  	ret := _m.Called(_a0)
    96  
    97  	var r0 bool
    98  	var r1 error
    99  	if rf, ok := ret.Get(0).(func(string) (bool, error)); ok {
   100  		return rf(_a0)
   101  	}
   102  	if rf, ok := ret.Get(0).(func(string) bool); ok {
   103  		r0 = rf(_a0)
   104  	} else {
   105  		r0 = ret.Get(0).(bool)
   106  	}
   107  
   108  	if rf, ok := ret.Get(1).(func(string) error); ok {
   109  		r1 = rf(_a0)
   110  	} else {
   111  		r1 = ret.Error(1)
   112  	}
   113  
   114  	return r0, r1
   115  }
   116  
   117  // PutIpDomain provides a mock function with given fields: _a0, _a1, _a2
   118  func (_m *DNSCache) PutIpDomain(_a0 string, _a1 []net.IPAddr, _a2 int64) bool {
   119  	ret := _m.Called(_a0, _a1, _a2)
   120  
   121  	var r0 bool
   122  	if rf, ok := ret.Get(0).(func(string, []net.IPAddr, int64) bool); ok {
   123  		r0 = rf(_a0, _a1, _a2)
   124  	} else {
   125  		r0 = ret.Get(0).(bool)
   126  	}
   127  
   128  	return r0
   129  }
   130  
   131  // PutTxtRecord provides a mock function with given fields: _a0, _a1, _a2
   132  func (_m *DNSCache) PutTxtRecord(_a0 string, _a1 []string, _a2 int64) bool {
   133  	ret := _m.Called(_a0, _a1, _a2)
   134  
   135  	var r0 bool
   136  	if rf, ok := ret.Get(0).(func(string, []string, int64) bool); ok {
   137  		r0 = rf(_a0, _a1, _a2)
   138  	} else {
   139  		r0 = ret.Get(0).(bool)
   140  	}
   141  
   142  	return r0
   143  }
   144  
   145  // RemoveIp provides a mock function with given fields: _a0
   146  func (_m *DNSCache) RemoveIp(_a0 string) bool {
   147  	ret := _m.Called(_a0)
   148  
   149  	var r0 bool
   150  	if rf, ok := ret.Get(0).(func(string) bool); ok {
   151  		r0 = rf(_a0)
   152  	} else {
   153  		r0 = ret.Get(0).(bool)
   154  	}
   155  
   156  	return r0
   157  }
   158  
   159  // RemoveTxt provides a mock function with given fields: _a0
   160  func (_m *DNSCache) RemoveTxt(_a0 string) bool {
   161  	ret := _m.Called(_a0)
   162  
   163  	var r0 bool
   164  	if rf, ok := ret.Get(0).(func(string) bool); ok {
   165  		r0 = rf(_a0)
   166  	} else {
   167  		r0 = ret.Get(0).(bool)
   168  	}
   169  
   170  	return r0
   171  }
   172  
   173  // Size provides a mock function with given fields:
   174  func (_m *DNSCache) Size() (uint, uint) {
   175  	ret := _m.Called()
   176  
   177  	var r0 uint
   178  	var r1 uint
   179  	if rf, ok := ret.Get(0).(func() (uint, uint)); ok {
   180  		return rf()
   181  	}
   182  	if rf, ok := ret.Get(0).(func() uint); ok {
   183  		r0 = rf()
   184  	} else {
   185  		r0 = ret.Get(0).(uint)
   186  	}
   187  
   188  	if rf, ok := ret.Get(1).(func() uint); ok {
   189  		r1 = rf()
   190  	} else {
   191  		r1 = ret.Get(1).(uint)
   192  	}
   193  
   194  	return r0, r1
   195  }
   196  
   197  // UpdateIPDomain provides a mock function with given fields: _a0, _a1, _a2
   198  func (_m *DNSCache) UpdateIPDomain(_a0 string, _a1 []net.IPAddr, _a2 int64) error {
   199  	ret := _m.Called(_a0, _a1, _a2)
   200  
   201  	var r0 error
   202  	if rf, ok := ret.Get(0).(func(string, []net.IPAddr, int64) error); ok {
   203  		r0 = rf(_a0, _a1, _a2)
   204  	} else {
   205  		r0 = ret.Error(0)
   206  	}
   207  
   208  	return r0
   209  }
   210  
   211  // UpdateTxtRecord provides a mock function with given fields: _a0, _a1, _a2
   212  func (_m *DNSCache) UpdateTxtRecord(_a0 string, _a1 []string, _a2 int64) error {
   213  	ret := _m.Called(_a0, _a1, _a2)
   214  
   215  	var r0 error
   216  	if rf, ok := ret.Get(0).(func(string, []string, int64) error); ok {
   217  		r0 = rf(_a0, _a1, _a2)
   218  	} else {
   219  		r0 = ret.Error(0)
   220  	}
   221  
   222  	return r0
   223  }
   224  
   225  type mockConstructorTestingTNewDNSCache interface {
   226  	mock.TestingT
   227  	Cleanup(func())
   228  }
   229  
   230  // NewDNSCache creates a new instance of DNSCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   231  func NewDNSCache(t mockConstructorTestingTNewDNSCache) *DNSCache {
   232  	mock := &DNSCache{}
   233  	mock.Mock.Test(t)
   234  
   235  	t.Cleanup(func() { mock.AssertExpectations(t) })
   236  
   237  	return mock
   238  }