github.com/lyft/flytestdlib@v0.3.12-0.20210213045714-8cdd111ecda1/cache/mocks/AutoRefresh.go (about)

     1  // Code generated by mockery v1.0.1. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	context "context"
     7  
     8  	cache "github.com/lyft/flytestdlib/cache"
     9  
    10  	mock "github.com/stretchr/testify/mock"
    11  )
    12  
    13  // AutoRefresh is an autogenerated mock type for the AutoRefresh type
    14  type AutoRefresh struct {
    15  	mock.Mock
    16  }
    17  
    18  type AutoRefresh_Get struct {
    19  	*mock.Call
    20  }
    21  
    22  func (_m AutoRefresh_Get) Return(_a0 cache.Item, _a1 error) *AutoRefresh_Get {
    23  	return &AutoRefresh_Get{Call: _m.Call.Return(_a0, _a1)}
    24  }
    25  
    26  func (_m *AutoRefresh) OnGet(id string) *AutoRefresh_Get {
    27  	c := _m.On("Get", id)
    28  	return &AutoRefresh_Get{Call: c}
    29  }
    30  
    31  func (_m *AutoRefresh) OnGetMatch(matchers ...interface{}) *AutoRefresh_Get {
    32  	c := _m.On("Get", matchers...)
    33  	return &AutoRefresh_Get{Call: c}
    34  }
    35  
    36  // Get provides a mock function with given fields: id
    37  func (_m *AutoRefresh) Get(id string) (cache.Item, error) {
    38  	ret := _m.Called(id)
    39  
    40  	var r0 cache.Item
    41  	if rf, ok := ret.Get(0).(func(string) cache.Item); ok {
    42  		r0 = rf(id)
    43  	} else {
    44  		if ret.Get(0) != nil {
    45  			r0 = ret.Get(0).(cache.Item)
    46  		}
    47  	}
    48  
    49  	var r1 error
    50  	if rf, ok := ret.Get(1).(func(string) error); ok {
    51  		r1 = rf(id)
    52  	} else {
    53  		r1 = ret.Error(1)
    54  	}
    55  
    56  	return r0, r1
    57  }
    58  
    59  type AutoRefresh_GetOrCreate struct {
    60  	*mock.Call
    61  }
    62  
    63  func (_m AutoRefresh_GetOrCreate) Return(_a0 cache.Item, _a1 error) *AutoRefresh_GetOrCreate {
    64  	return &AutoRefresh_GetOrCreate{Call: _m.Call.Return(_a0, _a1)}
    65  }
    66  
    67  func (_m *AutoRefresh) OnGetOrCreate(id string, item cache.Item) *AutoRefresh_GetOrCreate {
    68  	c := _m.On("GetOrCreate", id, item)
    69  	return &AutoRefresh_GetOrCreate{Call: c}
    70  }
    71  
    72  func (_m *AutoRefresh) OnGetOrCreateMatch(matchers ...interface{}) *AutoRefresh_GetOrCreate {
    73  	c := _m.On("GetOrCreate", matchers...)
    74  	return &AutoRefresh_GetOrCreate{Call: c}
    75  }
    76  
    77  // GetOrCreate provides a mock function with given fields: id, item
    78  func (_m *AutoRefresh) GetOrCreate(id string, item cache.Item) (cache.Item, error) {
    79  	ret := _m.Called(id, item)
    80  
    81  	var r0 cache.Item
    82  	if rf, ok := ret.Get(0).(func(string, cache.Item) cache.Item); ok {
    83  		r0 = rf(id, item)
    84  	} else {
    85  		if ret.Get(0) != nil {
    86  			r0 = ret.Get(0).(cache.Item)
    87  		}
    88  	}
    89  
    90  	var r1 error
    91  	if rf, ok := ret.Get(1).(func(string, cache.Item) error); ok {
    92  		r1 = rf(id, item)
    93  	} else {
    94  		r1 = ret.Error(1)
    95  	}
    96  
    97  	return r0, r1
    98  }
    99  
   100  type AutoRefresh_Start struct {
   101  	*mock.Call
   102  }
   103  
   104  func (_m AutoRefresh_Start) Return(_a0 error) *AutoRefresh_Start {
   105  	return &AutoRefresh_Start{Call: _m.Call.Return(_a0)}
   106  }
   107  
   108  func (_m *AutoRefresh) OnStart(ctx context.Context) *AutoRefresh_Start {
   109  	c := _m.On("Start", ctx)
   110  	return &AutoRefresh_Start{Call: c}
   111  }
   112  
   113  func (_m *AutoRefresh) OnStartMatch(matchers ...interface{}) *AutoRefresh_Start {
   114  	c := _m.On("Start", matchers...)
   115  	return &AutoRefresh_Start{Call: c}
   116  }
   117  
   118  // Start provides a mock function with given fields: ctx
   119  func (_m *AutoRefresh) Start(ctx context.Context) error {
   120  	ret := _m.Called(ctx)
   121  
   122  	var r0 error
   123  	if rf, ok := ret.Get(0).(func(context.Context) error); ok {
   124  		r0 = rf(ctx)
   125  	} else {
   126  		r0 = ret.Error(0)
   127  	}
   128  
   129  	return r0
   130  }