go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/buildbucket/appengine/internal/clients/backend.mock.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: backend.go 3 4 package clients 5 6 import ( 7 context "context" 8 reflect "reflect" 9 10 gomock "github.com/golang/mock/gomock" 11 buildbucketpb "go.chromium.org/luci/buildbucket/proto" 12 grpc "google.golang.org/grpc" 13 ) 14 15 // MockTaskBackendClient is a mock of TaskBackendClient interface. 16 type MockTaskBackendClient struct { 17 ctrl *gomock.Controller 18 recorder *MockTaskBackendClientMockRecorder 19 } 20 21 // MockTaskBackendClientMockRecorder is the mock recorder for MockTaskBackendClient. 22 type MockTaskBackendClientMockRecorder struct { 23 mock *MockTaskBackendClient 24 } 25 26 // NewMockTaskBackendClient creates a new mock instance. 27 func NewMockTaskBackendClient(ctrl *gomock.Controller) *MockTaskBackendClient { 28 mock := &MockTaskBackendClient{ctrl: ctrl} 29 mock.recorder = &MockTaskBackendClientMockRecorder{mock} 30 return mock 31 } 32 33 // EXPECT returns an object that allows the caller to indicate expected use. 34 func (m *MockTaskBackendClient) EXPECT() *MockTaskBackendClientMockRecorder { 35 return m.recorder 36 } 37 38 // CancelTasks mocks base method. 39 func (m *MockTaskBackendClient) CancelTasks(ctx context.Context, in *buildbucketpb.CancelTasksRequest, opts ...grpc.CallOption) (*buildbucketpb.CancelTasksResponse, error) { 40 m.ctrl.T.Helper() 41 varargs := []interface{}{ctx, in} 42 for _, a := range opts { 43 varargs = append(varargs, a) 44 } 45 ret := m.ctrl.Call(m, "CancelTasks", varargs...) 46 ret0, _ := ret[0].(*buildbucketpb.CancelTasksResponse) 47 ret1, _ := ret[1].(error) 48 return ret0, ret1 49 } 50 51 // CancelTasks indicates an expected call of CancelTasks. 52 func (mr *MockTaskBackendClientMockRecorder) CancelTasks(ctx, in interface{}, opts ...interface{}) *gomock.Call { 53 mr.mock.ctrl.T.Helper() 54 varargs := append([]interface{}{ctx, in}, opts...) 55 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelTasks", reflect.TypeOf((*MockTaskBackendClient)(nil).CancelTasks), varargs...) 56 } 57 58 // FetchTasks mocks base method. 59 func (m *MockTaskBackendClient) FetchTasks(ctx context.Context, in *buildbucketpb.FetchTasksRequest, opts ...grpc.CallOption) (*buildbucketpb.FetchTasksResponse, error) { 60 m.ctrl.T.Helper() 61 varargs := []interface{}{ctx, in} 62 for _, a := range opts { 63 varargs = append(varargs, a) 64 } 65 ret := m.ctrl.Call(m, "FetchTasks", varargs...) 66 ret0, _ := ret[0].(*buildbucketpb.FetchTasksResponse) 67 ret1, _ := ret[1].(error) 68 return ret0, ret1 69 } 70 71 // FetchTasks indicates an expected call of FetchTasks. 72 func (mr *MockTaskBackendClientMockRecorder) FetchTasks(ctx, in interface{}, opts ...interface{}) *gomock.Call { 73 mr.mock.ctrl.T.Helper() 74 varargs := append([]interface{}{ctx, in}, opts...) 75 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FetchTasks", reflect.TypeOf((*MockTaskBackendClient)(nil).FetchTasks), varargs...) 76 } 77 78 // RunTask mocks base method. 79 func (m *MockTaskBackendClient) RunTask(ctx context.Context, in *buildbucketpb.RunTaskRequest, opts ...grpc.CallOption) (*buildbucketpb.RunTaskResponse, error) { 80 m.ctrl.T.Helper() 81 varargs := []interface{}{ctx, in} 82 for _, a := range opts { 83 varargs = append(varargs, a) 84 } 85 ret := m.ctrl.Call(m, "RunTask", varargs...) 86 ret0, _ := ret[0].(*buildbucketpb.RunTaskResponse) 87 ret1, _ := ret[1].(error) 88 return ret0, ret1 89 } 90 91 // RunTask indicates an expected call of RunTask. 92 func (mr *MockTaskBackendClientMockRecorder) RunTask(ctx, in interface{}, opts ...interface{}) *gomock.Call { 93 mr.mock.ctrl.T.Helper() 94 varargs := append([]interface{}{ctx, in}, opts...) 95 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunTask", reflect.TypeOf((*MockTaskBackendClient)(nil).RunTask), varargs...) 96 } 97 98 // ValidateConfigs mocks base method. 99 func (m *MockTaskBackendClient) ValidateConfigs(ctx context.Context, in *buildbucketpb.ValidateConfigsRequest, opts ...grpc.CallOption) (*buildbucketpb.ValidateConfigsResponse, error) { 100 m.ctrl.T.Helper() 101 varargs := []interface{}{ctx, in} 102 for _, a := range opts { 103 varargs = append(varargs, a) 104 } 105 ret := m.ctrl.Call(m, "ValidateConfigs", varargs...) 106 ret0, _ := ret[0].(*buildbucketpb.ValidateConfigsResponse) 107 ret1, _ := ret[1].(error) 108 return ret0, ret1 109 } 110 111 // ValidateConfigs indicates an expected call of ValidateConfigs. 112 func (mr *MockTaskBackendClientMockRecorder) ValidateConfigs(ctx, in interface{}, opts ...interface{}) *gomock.Call { 113 mr.mock.ctrl.T.Helper() 114 varargs := append([]interface{}{ctx, in}, opts...) 115 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateConfigs", reflect.TypeOf((*MockTaskBackendClient)(nil).ValidateConfigs), varargs...) 116 } 117 118 // MockTaskCreator is a mock of TaskCreator interface. 119 type MockTaskCreator struct { 120 ctrl *gomock.Controller 121 recorder *MockTaskCreatorMockRecorder 122 } 123 124 // MockTaskCreatorMockRecorder is the mock recorder for MockTaskCreator. 125 type MockTaskCreatorMockRecorder struct { 126 mock *MockTaskCreator 127 } 128 129 // NewMockTaskCreator creates a new mock instance. 130 func NewMockTaskCreator(ctrl *gomock.Controller) *MockTaskCreator { 131 mock := &MockTaskCreator{ctrl: ctrl} 132 mock.recorder = &MockTaskCreatorMockRecorder{mock} 133 return mock 134 } 135 136 // EXPECT returns an object that allows the caller to indicate expected use. 137 func (m *MockTaskCreator) EXPECT() *MockTaskCreatorMockRecorder { 138 return m.recorder 139 } 140 141 // RunTask mocks base method. 142 func (m *MockTaskCreator) RunTask(ctx context.Context, in *buildbucketpb.RunTaskRequest, opts ...grpc.CallOption) (*buildbucketpb.RunTaskResponse, error) { 143 m.ctrl.T.Helper() 144 varargs := []interface{}{ctx, in} 145 for _, a := range opts { 146 varargs = append(varargs, a) 147 } 148 ret := m.ctrl.Call(m, "RunTask", varargs...) 149 ret0, _ := ret[0].(*buildbucketpb.RunTaskResponse) 150 ret1, _ := ret[1].(error) 151 return ret0, ret1 152 } 153 154 // RunTask indicates an expected call of RunTask. 155 func (mr *MockTaskCreatorMockRecorder) RunTask(ctx, in interface{}, opts ...interface{}) *gomock.Call { 156 mr.mock.ctrl.T.Helper() 157 varargs := append([]interface{}{ctx, in}, opts...) 158 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunTask", reflect.TypeOf((*MockTaskCreator)(nil).RunTask), varargs...) 159 }