go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/config_service/internal/clients/gs.mock.go (about) 1 // Copyright 2023 The LUCI Authors. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // Code generated by MockGen. DO NOT EDIT. 16 // Source: gs.go 17 18 package clients 19 20 import ( 21 context "context" 22 reflect "reflect" 23 24 storage "cloud.google.com/go/storage" 25 gomock "github.com/golang/mock/gomock" 26 ) 27 28 // MockGsClient is a mock of GsClient interface. 29 type MockGsClient struct { 30 ctrl *gomock.Controller 31 recorder *MockGsClientMockRecorder 32 } 33 34 // MockGsClientMockRecorder is the mock recorder for MockGsClient. 35 type MockGsClientMockRecorder struct { 36 mock *MockGsClient 37 } 38 39 // NewMockGsClient creates a new mock instance. 40 func NewMockGsClient(ctrl *gomock.Controller) *MockGsClient { 41 mock := &MockGsClient{ctrl: ctrl} 42 mock.recorder = &MockGsClientMockRecorder{mock} 43 return mock 44 } 45 46 // EXPECT returns an object that allows the caller to indicate expected use. 47 func (m *MockGsClient) EXPECT() *MockGsClientMockRecorder { 48 return m.recorder 49 } 50 51 // Delete mocks base method. 52 func (m *MockGsClient) Delete(ctx context.Context, bucket, object string) error { 53 m.ctrl.T.Helper() 54 ret := m.ctrl.Call(m, "Delete", ctx, bucket, object) 55 ret0, _ := ret[0].(error) 56 return ret0 57 } 58 59 // Delete indicates an expected call of Delete. 60 func (mr *MockGsClientMockRecorder) Delete(ctx, bucket, object interface{}) *gomock.Call { 61 mr.mock.ctrl.T.Helper() 62 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockGsClient)(nil).Delete), ctx, bucket, object) 63 } 64 65 // Read mocks base method. 66 func (m *MockGsClient) Read(ctx context.Context, bucket, object string, decompressive bool) ([]byte, error) { 67 m.ctrl.T.Helper() 68 ret := m.ctrl.Call(m, "Read", ctx, bucket, object, decompressive) 69 ret0, _ := ret[0].([]byte) 70 ret1, _ := ret[1].(error) 71 return ret0, ret1 72 } 73 74 // Read indicates an expected call of Read. 75 func (mr *MockGsClientMockRecorder) Read(ctx, bucket, object, decompressive interface{}) *gomock.Call { 76 mr.mock.ctrl.T.Helper() 77 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockGsClient)(nil).Read), ctx, bucket, object, decompressive) 78 } 79 80 // SignedURL mocks base method. 81 func (m *MockGsClient) SignedURL(bucket, object string, opts *storage.SignedURLOptions) (string, error) { 82 m.ctrl.T.Helper() 83 ret := m.ctrl.Call(m, "SignedURL", bucket, object, opts) 84 ret0, _ := ret[0].(string) 85 ret1, _ := ret[1].(error) 86 return ret0, ret1 87 } 88 89 // SignedURL indicates an expected call of SignedURL. 90 func (mr *MockGsClientMockRecorder) SignedURL(bucket, object, opts interface{}) *gomock.Call { 91 mr.mock.ctrl.T.Helper() 92 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SignedURL", reflect.TypeOf((*MockGsClient)(nil).SignedURL), bucket, object, opts) 93 } 94 95 // Touch mocks base method. 96 func (m *MockGsClient) Touch(ctx context.Context, bucket, object string) error { 97 m.ctrl.T.Helper() 98 ret := m.ctrl.Call(m, "Touch", ctx, bucket, object) 99 ret0, _ := ret[0].(error) 100 return ret0 101 } 102 103 // Touch indicates an expected call of Touch. 104 func (mr *MockGsClientMockRecorder) Touch(ctx, bucket, object interface{}) *gomock.Call { 105 mr.mock.ctrl.T.Helper() 106 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Touch", reflect.TypeOf((*MockGsClient)(nil).Touch), ctx, bucket, object) 107 } 108 109 // UploadIfMissing mocks base method. 110 func (m *MockGsClient) UploadIfMissing(ctx context.Context, bucket, object string, data []byte, attrsModifyFn func(*storage.ObjectAttrs)) (bool, error) { 111 m.ctrl.T.Helper() 112 ret := m.ctrl.Call(m, "UploadIfMissing", ctx, bucket, object, data, attrsModifyFn) 113 ret0, _ := ret[0].(bool) 114 ret1, _ := ret[1].(error) 115 return ret0, ret1 116 } 117 118 // UploadIfMissing indicates an expected call of UploadIfMissing. 119 func (mr *MockGsClientMockRecorder) UploadIfMissing(ctx, bucket, object, data, attrsModifyFn interface{}) *gomock.Call { 120 mr.mock.ctrl.T.Helper() 121 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadIfMissing", reflect.TypeOf((*MockGsClient)(nil).UploadIfMissing), ctx, bucket, object, data, attrsModifyFn) 122 }