Files
tasks/common/persistence/sql/sqlplugin/auth/auth_plugin_mock.go
Alexander MaysandGitHub b8f3f89555 Add RDS IAM auth plugin for SQL drivers (#2830)
Signed-off-by: Alexander Mays <[email protected]>
Added:
A new environment variable to the CLI: SQL_AUTH_PLUGIN=rds-iam-auth
A new flag arg to the CLI: --sql-auth-plugin rds-iam-auth
2 new docker template variables: authPlugin: {{ default .Env.SQL_AUTH_PLUGIN "" }} and authPlugin: {{ default .Env.SQL_VIS_AUTH_PLUGIN "" }}
A new SQL configuration attribute authPlugin
2022-05-12 16:28:26 -07:00

76 lines
2.7 KiB
Go

// The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// Code generated by MockGen. DO NOT EDIT.
// Source: auth_plugin.go
// Package auth is a generated GoMock package.
package auth
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
config "go.temporal.io/server/common/config"
)
// MockAuthPlugin is a mock of AuthPlugin interface.
type MockAuthPlugin struct {
ctrl *gomock.Controller
recorder *MockAuthPluginMockRecorder
}
// MockAuthPluginMockRecorder is the mock recorder for MockAuthPlugin.
type MockAuthPluginMockRecorder struct {
mock *MockAuthPlugin
}
// NewMockAuthPlugin creates a new mock instance.
func NewMockAuthPlugin(ctrl *gomock.Controller) *MockAuthPlugin {
mock := &MockAuthPlugin{ctrl: ctrl}
mock.recorder = &MockAuthPluginMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockAuthPlugin) EXPECT() *MockAuthPluginMockRecorder {
return m.recorder
}
// GetConfig mocks base method.
func (m *MockAuthPlugin) GetConfig(arg0 context.Context, arg1 *config.SQL) (*config.SQL, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetConfig", arg0, arg1)
ret0, _ := ret[0].(*config.SQL)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetConfig indicates an expected call of GetConfig.
func (mr *MockAuthPluginMockRecorder) GetConfig(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConfig", reflect.TypeOf((*MockAuthPlugin)(nil).GetConfig), arg0, arg1)
}