go.temporal.io/server@v1.23.0/common/authorization/claim_mapper_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: claim_mapper.go 27 28 // Package authorization is a generated GoMock package. 29 package authorization 30 31 import ( 32 reflect "reflect" 33 34 gomock "github.com/golang/mock/gomock" 35 ) 36 37 // MockClaimMapper is a mock of ClaimMapper interface. 38 type MockClaimMapper struct { 39 ctrl *gomock.Controller 40 recorder *MockClaimMapperMockRecorder 41 } 42 43 // MockClaimMapperMockRecorder is the mock recorder for MockClaimMapper. 44 type MockClaimMapperMockRecorder struct { 45 mock *MockClaimMapper 46 } 47 48 // NewMockClaimMapper creates a new mock instance. 49 func NewMockClaimMapper(ctrl *gomock.Controller) *MockClaimMapper { 50 mock := &MockClaimMapper{ctrl: ctrl} 51 mock.recorder = &MockClaimMapperMockRecorder{mock} 52 return mock 53 } 54 55 // EXPECT returns an object that allows the caller to indicate expected use. 56 func (m *MockClaimMapper) EXPECT() *MockClaimMapperMockRecorder { 57 return m.recorder 58 } 59 60 // GetClaims mocks base method. 61 func (m *MockClaimMapper) GetClaims(authInfo *AuthInfo) (*Claims, error) { 62 m.ctrl.T.Helper() 63 ret := m.ctrl.Call(m, "GetClaims", authInfo) 64 ret0, _ := ret[0].(*Claims) 65 ret1, _ := ret[1].(error) 66 return ret0, ret1 67 } 68 69 // GetClaims indicates an expected call of GetClaims. 70 func (mr *MockClaimMapperMockRecorder) GetClaims(authInfo interface{}) *gomock.Call { 71 mr.mock.ctrl.T.Helper() 72 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClaims", reflect.TypeOf((*MockClaimMapper)(nil).GetClaims), authInfo) 73 } 74 75 // MockClaimMapperWithAuthInfoRequired is a mock of ClaimMapperWithAuthInfoRequired interface. 76 type MockClaimMapperWithAuthInfoRequired struct { 77 ctrl *gomock.Controller 78 recorder *MockClaimMapperWithAuthInfoRequiredMockRecorder 79 } 80 81 // MockClaimMapperWithAuthInfoRequiredMockRecorder is the mock recorder for MockClaimMapperWithAuthInfoRequired. 82 type MockClaimMapperWithAuthInfoRequiredMockRecorder struct { 83 mock *MockClaimMapperWithAuthInfoRequired 84 } 85 86 // NewMockClaimMapperWithAuthInfoRequired creates a new mock instance. 87 func NewMockClaimMapperWithAuthInfoRequired(ctrl *gomock.Controller) *MockClaimMapperWithAuthInfoRequired { 88 mock := &MockClaimMapperWithAuthInfoRequired{ctrl: ctrl} 89 mock.recorder = &MockClaimMapperWithAuthInfoRequiredMockRecorder{mock} 90 return mock 91 } 92 93 // EXPECT returns an object that allows the caller to indicate expected use. 94 func (m *MockClaimMapperWithAuthInfoRequired) EXPECT() *MockClaimMapperWithAuthInfoRequiredMockRecorder { 95 return m.recorder 96 } 97 98 // AuthInfoRequired mocks base method. 99 func (m *MockClaimMapperWithAuthInfoRequired) AuthInfoRequired() bool { 100 m.ctrl.T.Helper() 101 ret := m.ctrl.Call(m, "AuthInfoRequired") 102 ret0, _ := ret[0].(bool) 103 return ret0 104 } 105 106 // AuthInfoRequired indicates an expected call of AuthInfoRequired. 107 func (mr *MockClaimMapperWithAuthInfoRequiredMockRecorder) AuthInfoRequired() *gomock.Call { 108 mr.mock.ctrl.T.Helper() 109 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthInfoRequired", reflect.TypeOf((*MockClaimMapperWithAuthInfoRequired)(nil).AuthInfoRequired)) 110 }