github.com/buildpacks/pack@v0.33.3-0.20240516162812-884dd1837311/pkg/testmocks/mock_index_factory.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/buildpacks/pack/pkg/client (interfaces: IndexFactory) 3 4 // Package testmocks is a generated GoMock package. 5 package testmocks 6 7 import ( 8 reflect "reflect" 9 10 imgutil "github.com/buildpacks/imgutil" 11 gomock "github.com/golang/mock/gomock" 12 ) 13 14 // MockIndexFactory is a mock of IndexFactory interface. 15 type MockIndexFactory struct { 16 ctrl *gomock.Controller 17 recorder *MockIndexFactoryMockRecorder 18 } 19 20 // MockIndexFactoryMockRecorder is the mock recorder for MockIndexFactory. 21 type MockIndexFactoryMockRecorder struct { 22 mock *MockIndexFactory 23 } 24 25 // NewMockIndexFactory creates a new mock instance. 26 func NewMockIndexFactory(ctrl *gomock.Controller) *MockIndexFactory { 27 mock := &MockIndexFactory{ctrl: ctrl} 28 mock.recorder = &MockIndexFactoryMockRecorder{mock} 29 return mock 30 } 31 32 // EXPECT returns an object that allows the caller to indicate expected use. 33 func (m *MockIndexFactory) EXPECT() *MockIndexFactoryMockRecorder { 34 return m.recorder 35 } 36 37 // CreateIndex mocks base method. 38 func (m *MockIndexFactory) CreateIndex(arg0 string, arg1 ...imgutil.IndexOption) (imgutil.ImageIndex, error) { 39 m.ctrl.T.Helper() 40 varargs := []interface{}{arg0} 41 for _, a := range arg1 { 42 varargs = append(varargs, a) 43 } 44 ret := m.ctrl.Call(m, "CreateIndex", varargs...) 45 ret0, _ := ret[0].(imgutil.ImageIndex) 46 ret1, _ := ret[1].(error) 47 return ret0, ret1 48 } 49 50 // CreateIndex indicates an expected call of CreateIndex. 51 func (mr *MockIndexFactoryMockRecorder) CreateIndex(arg0 interface{}, arg1 ...interface{}) *gomock.Call { 52 mr.mock.ctrl.T.Helper() 53 varargs := append([]interface{}{arg0}, arg1...) 54 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateIndex", reflect.TypeOf((*MockIndexFactory)(nil).CreateIndex), varargs...) 55 } 56 57 // Exists mocks base method. 58 func (m *MockIndexFactory) Exists(arg0 string) bool { 59 m.ctrl.T.Helper() 60 ret := m.ctrl.Call(m, "Exists", arg0) 61 ret0, _ := ret[0].(bool) 62 return ret0 63 } 64 65 // Exists indicates an expected call of Exists. 66 func (mr *MockIndexFactoryMockRecorder) Exists(arg0 interface{}) *gomock.Call { 67 mr.mock.ctrl.T.Helper() 68 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exists", reflect.TypeOf((*MockIndexFactory)(nil).Exists), arg0) 69 } 70 71 // FetchIndex mocks base method. 72 func (m *MockIndexFactory) FetchIndex(arg0 string, arg1 ...imgutil.IndexOption) (imgutil.ImageIndex, error) { 73 m.ctrl.T.Helper() 74 varargs := []interface{}{arg0} 75 for _, a := range arg1 { 76 varargs = append(varargs, a) 77 } 78 ret := m.ctrl.Call(m, "FetchIndex", varargs...) 79 ret0, _ := ret[0].(imgutil.ImageIndex) 80 ret1, _ := ret[1].(error) 81 return ret0, ret1 82 } 83 84 // FetchIndex indicates an expected call of FetchIndex. 85 func (mr *MockIndexFactoryMockRecorder) FetchIndex(arg0 interface{}, arg1 ...interface{}) *gomock.Call { 86 mr.mock.ctrl.T.Helper() 87 varargs := append([]interface{}{arg0}, arg1...) 88 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FetchIndex", reflect.TypeOf((*MockIndexFactory)(nil).FetchIndex), varargs...) 89 } 90 91 // FindIndex mocks base method. 92 func (m *MockIndexFactory) FindIndex(arg0 string, arg1 ...imgutil.IndexOption) (imgutil.ImageIndex, error) { 93 m.ctrl.T.Helper() 94 varargs := []interface{}{arg0} 95 for _, a := range arg1 { 96 varargs = append(varargs, a) 97 } 98 ret := m.ctrl.Call(m, "FindIndex", varargs...) 99 ret0, _ := ret[0].(imgutil.ImageIndex) 100 ret1, _ := ret[1].(error) 101 return ret0, ret1 102 } 103 104 // FindIndex indicates an expected call of FindIndex. 105 func (mr *MockIndexFactoryMockRecorder) FindIndex(arg0 interface{}, arg1 ...interface{}) *gomock.Call { 106 mr.mock.ctrl.T.Helper() 107 varargs := append([]interface{}{arg0}, arg1...) 108 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindIndex", reflect.TypeOf((*MockIndexFactory)(nil).FindIndex), varargs...) 109 } 110 111 // LoadIndex mocks base method. 112 func (m *MockIndexFactory) LoadIndex(arg0 string, arg1 ...imgutil.IndexOption) (imgutil.ImageIndex, error) { 113 m.ctrl.T.Helper() 114 varargs := []interface{}{arg0} 115 for _, a := range arg1 { 116 varargs = append(varargs, a) 117 } 118 ret := m.ctrl.Call(m, "LoadIndex", varargs...) 119 ret0, _ := ret[0].(imgutil.ImageIndex) 120 ret1, _ := ret[1].(error) 121 return ret0, ret1 122 } 123 124 // LoadIndex indicates an expected call of LoadIndex. 125 func (mr *MockIndexFactoryMockRecorder) LoadIndex(arg0 interface{}, arg1 ...interface{}) *gomock.Call { 126 mr.mock.ctrl.T.Helper() 127 varargs := append([]interface{}{arg0}, arg1...) 128 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadIndex", reflect.TypeOf((*MockIndexFactory)(nil).LoadIndex), varargs...) 129 }