go.temporal.io/server@v1.23.0/common/searchattribute/search_attribute_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: search_attirbute.go
    27  
    28  // Package searchattribute is a generated GoMock package.
    29  package searchattribute
    30  
    31  import (
    32  	context "context"
    33  	reflect "reflect"
    34  
    35  	gomock "github.com/golang/mock/gomock"
    36  	v1 "go.temporal.io/api/enums/v1"
    37  )
    38  
    39  // MockProvider is a mock of Provider interface.
    40  type MockProvider struct {
    41  	ctrl     *gomock.Controller
    42  	recorder *MockProviderMockRecorder
    43  }
    44  
    45  // MockProviderMockRecorder is the mock recorder for MockProvider.
    46  type MockProviderMockRecorder struct {
    47  	mock *MockProvider
    48  }
    49  
    50  // NewMockProvider creates a new mock instance.
    51  func NewMockProvider(ctrl *gomock.Controller) *MockProvider {
    52  	mock := &MockProvider{ctrl: ctrl}
    53  	mock.recorder = &MockProviderMockRecorder{mock}
    54  	return mock
    55  }
    56  
    57  // EXPECT returns an object that allows the caller to indicate expected use.
    58  func (m *MockProvider) EXPECT() *MockProviderMockRecorder {
    59  	return m.recorder
    60  }
    61  
    62  // GetSearchAttributes mocks base method.
    63  func (m *MockProvider) GetSearchAttributes(indexName string, forceRefreshCache bool) (NameTypeMap, error) {
    64  	m.ctrl.T.Helper()
    65  	ret := m.ctrl.Call(m, "GetSearchAttributes", indexName, forceRefreshCache)
    66  	ret0, _ := ret[0].(NameTypeMap)
    67  	ret1, _ := ret[1].(error)
    68  	return ret0, ret1
    69  }
    70  
    71  // GetSearchAttributes indicates an expected call of GetSearchAttributes.
    72  func (mr *MockProviderMockRecorder) GetSearchAttributes(indexName, forceRefreshCache interface{}) *gomock.Call {
    73  	mr.mock.ctrl.T.Helper()
    74  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSearchAttributes", reflect.TypeOf((*MockProvider)(nil).GetSearchAttributes), indexName, forceRefreshCache)
    75  }
    76  
    77  // MockManager is a mock of Manager interface.
    78  type MockManager struct {
    79  	ctrl     *gomock.Controller
    80  	recorder *MockManagerMockRecorder
    81  }
    82  
    83  // MockManagerMockRecorder is the mock recorder for MockManager.
    84  type MockManagerMockRecorder struct {
    85  	mock *MockManager
    86  }
    87  
    88  // NewMockManager creates a new mock instance.
    89  func NewMockManager(ctrl *gomock.Controller) *MockManager {
    90  	mock := &MockManager{ctrl: ctrl}
    91  	mock.recorder = &MockManagerMockRecorder{mock}
    92  	return mock
    93  }
    94  
    95  // EXPECT returns an object that allows the caller to indicate expected use.
    96  func (m *MockManager) EXPECT() *MockManagerMockRecorder {
    97  	return m.recorder
    98  }
    99  
   100  // GetSearchAttributes mocks base method.
   101  func (m *MockManager) GetSearchAttributes(indexName string, forceRefreshCache bool) (NameTypeMap, error) {
   102  	m.ctrl.T.Helper()
   103  	ret := m.ctrl.Call(m, "GetSearchAttributes", indexName, forceRefreshCache)
   104  	ret0, _ := ret[0].(NameTypeMap)
   105  	ret1, _ := ret[1].(error)
   106  	return ret0, ret1
   107  }
   108  
   109  // GetSearchAttributes indicates an expected call of GetSearchAttributes.
   110  func (mr *MockManagerMockRecorder) GetSearchAttributes(indexName, forceRefreshCache interface{}) *gomock.Call {
   111  	mr.mock.ctrl.T.Helper()
   112  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSearchAttributes", reflect.TypeOf((*MockManager)(nil).GetSearchAttributes), indexName, forceRefreshCache)
   113  }
   114  
   115  // SaveSearchAttributes mocks base method.
   116  func (m *MockManager) SaveSearchAttributes(ctx context.Context, indexName string, newCustomSearchAttributes map[string]v1.IndexedValueType) error {
   117  	m.ctrl.T.Helper()
   118  	ret := m.ctrl.Call(m, "SaveSearchAttributes", ctx, indexName, newCustomSearchAttributes)
   119  	ret0, _ := ret[0].(error)
   120  	return ret0
   121  }
   122  
   123  // SaveSearchAttributes indicates an expected call of SaveSearchAttributes.
   124  func (mr *MockManagerMockRecorder) SaveSearchAttributes(ctx, indexName, newCustomSearchAttributes interface{}) *gomock.Call {
   125  	mr.mock.ctrl.T.Helper()
   126  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveSearchAttributes", reflect.TypeOf((*MockManager)(nil).SaveSearchAttributes), ctx, indexName, newCustomSearchAttributes)
   127  }