go.temporal.io/server@v1.23.0/common/archiver/gcloud/connector/client_mock.go (about)

     1  // The MIT License
     2  //
     3  // Copyright (c) 2020 Temporal Technologies Inc.  All rights reserved.
     4  //
     5  // Copyright (c) 2020 Uber Technologies, Inc.
     6  //
     7  // Permission is hereby granted, free of charge, to any person obtaining a copy
     8  // of this software and associated documentation files (the "Software"), to deal
     9  // in the Software without restriction, including without limitation the rights
    10  // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    11  // copies of the Software, and to permit persons to whom the Software is
    12  // furnished to do so, subject to the following conditions:
    13  //
    14  // The above copyright notice and this permission notice shall be included in
    15  // all copies or substantial portions of the Software.
    16  //
    17  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    18  // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    19  // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    20  // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    21  // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    22  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    23  // THE SOFTWARE.
    24  
    25  // Code generated by MockGen. DO NOT EDIT.
    26  // Source: client.go
    27  
    28  // Package connector is a generated GoMock package.
    29  package connector
    30  
    31  import (
    32  	context "context"
    33  	reflect "reflect"
    34  
    35  	gomock "github.com/golang/mock/gomock"
    36  	archiver "go.temporal.io/server/common/archiver"
    37  )
    38  
    39  // MockClient is a mock of Client interface.
    40  type MockClient struct {
    41  	ctrl     *gomock.Controller
    42  	recorder *MockClientMockRecorder
    43  }
    44  
    45  // MockClientMockRecorder is the mock recorder for MockClient.
    46  type MockClientMockRecorder struct {
    47  	mock *MockClient
    48  }
    49  
    50  // NewMockClient creates a new mock instance.
    51  func NewMockClient(ctrl *gomock.Controller) *MockClient {
    52  	mock := &MockClient{ctrl: ctrl}
    53  	mock.recorder = &MockClientMockRecorder{mock}
    54  	return mock
    55  }
    56  
    57  // EXPECT returns an object that allows the caller to indicate expected use.
    58  func (m *MockClient) EXPECT() *MockClientMockRecorder {
    59  	return m.recorder
    60  }
    61  
    62  // Exist mocks base method.
    63  func (m *MockClient) Exist(ctx context.Context, URI archiver.URI, fileName string) (bool, error) {
    64  	m.ctrl.T.Helper()
    65  	ret := m.ctrl.Call(m, "Exist", ctx, URI, fileName)
    66  	ret0, _ := ret[0].(bool)
    67  	ret1, _ := ret[1].(error)
    68  	return ret0, ret1
    69  }
    70  
    71  // Exist indicates an expected call of Exist.
    72  func (mr *MockClientMockRecorder) Exist(ctx, URI, fileName interface{}) *gomock.Call {
    73  	mr.mock.ctrl.T.Helper()
    74  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exist", reflect.TypeOf((*MockClient)(nil).Exist), ctx, URI, fileName)
    75  }
    76  
    77  // Get mocks base method.
    78  func (m *MockClient) Get(ctx context.Context, URI archiver.URI, file string) ([]byte, error) {
    79  	m.ctrl.T.Helper()
    80  	ret := m.ctrl.Call(m, "Get", ctx, URI, file)
    81  	ret0, _ := ret[0].([]byte)
    82  	ret1, _ := ret[1].(error)
    83  	return ret0, ret1
    84  }
    85  
    86  // Get indicates an expected call of Get.
    87  func (mr *MockClientMockRecorder) Get(ctx, URI, file interface{}) *gomock.Call {
    88  	mr.mock.ctrl.T.Helper()
    89  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockClient)(nil).Get), ctx, URI, file)
    90  }
    91  
    92  // Query mocks base method.
    93  func (m *MockClient) Query(ctx context.Context, URI archiver.URI, fileNamePrefix string) ([]string, error) {
    94  	m.ctrl.T.Helper()
    95  	ret := m.ctrl.Call(m, "Query", ctx, URI, fileNamePrefix)
    96  	ret0, _ := ret[0].([]string)
    97  	ret1, _ := ret[1].(error)
    98  	return ret0, ret1
    99  }
   100  
   101  // Query indicates an expected call of Query.
   102  func (mr *MockClientMockRecorder) Query(ctx, URI, fileNamePrefix interface{}) *gomock.Call {
   103  	mr.mock.ctrl.T.Helper()
   104  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Query", reflect.TypeOf((*MockClient)(nil).Query), ctx, URI, fileNamePrefix)
   105  }
   106  
   107  // QueryWithFilters mocks base method.
   108  func (m *MockClient) QueryWithFilters(ctx context.Context, URI archiver.URI, fileNamePrefix string, pageSize, offset int, filters []Precondition) ([]string, bool, int, error) {
   109  	m.ctrl.T.Helper()
   110  	ret := m.ctrl.Call(m, "QueryWithFilters", ctx, URI, fileNamePrefix, pageSize, offset, filters)
   111  	ret0, _ := ret[0].([]string)
   112  	ret1, _ := ret[1].(bool)
   113  	ret2, _ := ret[2].(int)
   114  	ret3, _ := ret[3].(error)
   115  	return ret0, ret1, ret2, ret3
   116  }
   117  
   118  // QueryWithFilters indicates an expected call of QueryWithFilters.
   119  func (mr *MockClientMockRecorder) QueryWithFilters(ctx, URI, fileNamePrefix, pageSize, offset, filters interface{}) *gomock.Call {
   120  	mr.mock.ctrl.T.Helper()
   121  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryWithFilters", reflect.TypeOf((*MockClient)(nil).QueryWithFilters), ctx, URI, fileNamePrefix, pageSize, offset, filters)
   122  }
   123  
   124  // Upload mocks base method.
   125  func (m *MockClient) Upload(ctx context.Context, URI archiver.URI, fileName string, file []byte) error {
   126  	m.ctrl.T.Helper()
   127  	ret := m.ctrl.Call(m, "Upload", ctx, URI, fileName, file)
   128  	ret0, _ := ret[0].(error)
   129  	return ret0
   130  }
   131  
   132  // Upload indicates an expected call of Upload.
   133  func (mr *MockClientMockRecorder) Upload(ctx, URI, fileName, file interface{}) *gomock.Call {
   134  	mr.mock.ctrl.T.Helper()
   135  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upload", reflect.TypeOf((*MockClient)(nil).Upload), ctx, URI, fileName, file)
   136  }