Documentation ¶
Index ¶
- Variables
- type AzureAuthProvider
- func (a *AzureAuthProvider) FindCertificateCredential(tenantID string, clientID string, certPath string, password string, ...) (*azidentity.ClientCertificateCredential, error)
- func (a *AzureAuthProvider) FindClientSecretCredentials(tenantID string, clientID string, clientSecret string, ...) (*azidentity.ClientSecretCredential, error)
- func (a *AzureAuthProvider) FindDefaultCredentials(options *azidentity.DefaultAzureCredentialOptions) (*azidentity.DefaultAzureCredential, error)
- func (a *AzureAuthProvider) FindUsernamePasswordCredentials(tenantID string, clientID string, username string, password string, ...) (*azidentity.UsernamePasswordCredential, error)
- type AzureAuthProviderAPI
- type AzureFactoryConfig
- type ConfigProvider
- type ConfigProviderAPI
- type MockAzureAuthProviderAPI
- func (_m *MockAzureAuthProviderAPI) EXPECT() *MockAzureAuthProviderAPI_Expecter
- func (_m *MockAzureAuthProviderAPI) FindCertificateCredential(tenantID string, clientID string, certPath string, password string, ...) (*azidentity.ClientCertificateCredential, error)
- func (_m *MockAzureAuthProviderAPI) FindClientSecretCredentials(tenantID string, clientID string, clientSecret string, ...) (*azidentity.ClientSecretCredential, error)
- func (_m *MockAzureAuthProviderAPI) FindDefaultCredentials(options *azidentity.DefaultAzureCredentialOptions) (*azidentity.DefaultAzureCredential, error)
- func (_m *MockAzureAuthProviderAPI) FindUsernamePasswordCredentials(tenantID string, clientID string, username string, password string, ...) (*azidentity.UsernamePasswordCredential, error)
- type MockAzureAuthProviderAPI_Expecter
- func (_e *MockAzureAuthProviderAPI_Expecter) FindCertificateCredential(tenantID interface{}, clientID interface{}, certPath interface{}, ...) *MockAzureAuthProviderAPI_FindCertificateCredential_Call
- func (_e *MockAzureAuthProviderAPI_Expecter) FindClientSecretCredentials(tenantID interface{}, clientID interface{}, clientSecret interface{}, ...) *MockAzureAuthProviderAPI_FindClientSecretCredentials_Call
- func (_e *MockAzureAuthProviderAPI_Expecter) FindDefaultCredentials(options interface{}) *MockAzureAuthProviderAPI_FindDefaultCredentials_Call
- func (_e *MockAzureAuthProviderAPI_Expecter) FindUsernamePasswordCredentials(tenantID interface{}, clientID interface{}, username interface{}, ...) *MockAzureAuthProviderAPI_FindUsernamePasswordCredentials_Call
- type MockAzureAuthProviderAPI_FindCertificateCredential_Call
- func (_c *MockAzureAuthProviderAPI_FindCertificateCredential_Call) Return(_a0 *azidentity.ClientCertificateCredential, _a1 error) *MockAzureAuthProviderAPI_FindCertificateCredential_Call
- func (_c *MockAzureAuthProviderAPI_FindCertificateCredential_Call) Run(...) *MockAzureAuthProviderAPI_FindCertificateCredential_Call
- func (_c *MockAzureAuthProviderAPI_FindCertificateCredential_Call) RunAndReturn(...) *MockAzureAuthProviderAPI_FindCertificateCredential_Call
- type MockAzureAuthProviderAPI_FindClientSecretCredentials_Call
- func (_c *MockAzureAuthProviderAPI_FindClientSecretCredentials_Call) Return(_a0 *azidentity.ClientSecretCredential, _a1 error) *MockAzureAuthProviderAPI_FindClientSecretCredentials_Call
- func (_c *MockAzureAuthProviderAPI_FindClientSecretCredentials_Call) Run(run func(tenantID string, clientID string, clientSecret string, ...)) *MockAzureAuthProviderAPI_FindClientSecretCredentials_Call
- func (_c *MockAzureAuthProviderAPI_FindClientSecretCredentials_Call) RunAndReturn(...) *MockAzureAuthProviderAPI_FindClientSecretCredentials_Call
- type MockAzureAuthProviderAPI_FindDefaultCredentials_Call
- func (_c *MockAzureAuthProviderAPI_FindDefaultCredentials_Call) Return(_a0 *azidentity.DefaultAzureCredential, _a1 error) *MockAzureAuthProviderAPI_FindDefaultCredentials_Call
- func (_c *MockAzureAuthProviderAPI_FindDefaultCredentials_Call) Run(run func(options *azidentity.DefaultAzureCredentialOptions)) *MockAzureAuthProviderAPI_FindDefaultCredentials_Call
- func (_c *MockAzureAuthProviderAPI_FindDefaultCredentials_Call) RunAndReturn(...) *MockAzureAuthProviderAPI_FindDefaultCredentials_Call
- type MockAzureAuthProviderAPI_FindUsernamePasswordCredentials_Call
- func (_c *MockAzureAuthProviderAPI_FindUsernamePasswordCredentials_Call) Return(_a0 *azidentity.UsernamePasswordCredential, _a1 error) *MockAzureAuthProviderAPI_FindUsernamePasswordCredentials_Call
- func (_c *MockAzureAuthProviderAPI_FindUsernamePasswordCredentials_Call) Run(...) *MockAzureAuthProviderAPI_FindUsernamePasswordCredentials_Call
- func (_c *MockAzureAuthProviderAPI_FindUsernamePasswordCredentials_Call) RunAndReturn(...) *MockAzureAuthProviderAPI_FindUsernamePasswordCredentials_Call
- type MockConfigProviderAPI
- type MockConfigProviderAPI_Expecter
- type MockConfigProviderAPI_GetAzureClientConfig_Call
- func (_c *MockConfigProviderAPI_GetAzureClientConfig_Call) Return(_a0 *AzureFactoryConfig, _a1 error) *MockConfigProviderAPI_GetAzureClientConfig_Call
- func (_c *MockConfigProviderAPI_GetAzureClientConfig_Call) Run(run func(cfg config.AzureConfig)) *MockConfigProviderAPI_GetAzureClientConfig_Call
- func (_c *MockConfigProviderAPI_GetAzureClientConfig_Call) RunAndReturn(run func(config.AzureConfig) (*AzureFactoryConfig, error)) *MockConfigProviderAPI_GetAzureClientConfig_Call
Constants ¶
This section is empty.
Variables ¶
var ( ErrWrongCredentialsType = errors.New("wrong credentials type") ErrIncompleteUsernamePassword = errors.New("incomplete username and password credentials") )
Functions ¶
This section is empty.
Types ¶
type AzureAuthProvider ¶
type AzureAuthProvider struct{}
func (*AzureAuthProvider) FindCertificateCredential ¶
func (a *AzureAuthProvider) FindCertificateCredential(tenantID string, clientID string, certPath string, password string, options *azidentity.ClientCertificateCredentialOptions) (*azidentity.ClientCertificateCredential, error)
FindCertificateCredential is a wrapper around azidentity.NewClientCertificateCredential and azidentity.ParseCertificates that loads certificates and a private key, in PEM or PKCS12 format.
func (*AzureAuthProvider) FindClientSecretCredentials ¶
func (a *AzureAuthProvider) FindClientSecretCredentials(tenantID string, clientID string, clientSecret string, options *azidentity.ClientSecretCredentialOptions) (*azidentity.ClientSecretCredential, error)
FindClientSecretCredentials is a wrapper around azidentity.NewClientSecretCredential to make it easier to mock
func (*AzureAuthProvider) FindDefaultCredentials ¶
func (a *AzureAuthProvider) FindDefaultCredentials(options *azidentity.DefaultAzureCredentialOptions) (*azidentity.DefaultAzureCredential, error)
FindDefaultCredentials is a wrapper around azidentity.NewDefaultAzureCredential to make it easier to mock
func (*AzureAuthProvider) FindUsernamePasswordCredentials ¶
func (a *AzureAuthProvider) FindUsernamePasswordCredentials(tenantID string, clientID string, username string, password string, options *azidentity.UsernamePasswordCredentialOptions) (*azidentity.UsernamePasswordCredential, error)
FindUsernamePasswordCredentials is a wrapper around azidentity.NewUsernamePasswordCredential to make it easier to mock
type AzureAuthProviderAPI ¶
type AzureAuthProviderAPI interface { FindDefaultCredentials(options *azidentity.DefaultAzureCredentialOptions) (*azidentity.DefaultAzureCredential, error) FindUsernamePasswordCredentials(tenantID string, clientID string, username string, password string, options *azidentity.UsernamePasswordCredentialOptions) (*azidentity.UsernamePasswordCredential, error) FindClientSecretCredentials(tenantID string, clientID string, clientSecret string, options *azidentity.ClientSecretCredentialOptions) (*azidentity.ClientSecretCredential, error) FindCertificateCredential(tenantID string, clientID string, certPath string, password string, options *azidentity.ClientCertificateCredentialOptions) (*azidentity.ClientCertificateCredential, error) }
type AzureFactoryConfig ¶
type AzureFactoryConfig struct {
Credentials azcore.TokenCredential
}
type ConfigProvider ¶
type ConfigProvider struct {
AuthProvider AzureAuthProviderAPI
}
func (*ConfigProvider) GetAzureClientConfig ¶
func (p *ConfigProvider) GetAzureClientConfig(cfg config.AzureConfig) (*AzureFactoryConfig, error)
type ConfigProviderAPI ¶
type ConfigProviderAPI interface {
GetAzureClientConfig(cfg config.AzureConfig) (*AzureFactoryConfig, error)
}
type MockAzureAuthProviderAPI ¶
MockAzureAuthProviderAPI is an autogenerated mock type for the AzureAuthProviderAPI type
func NewMockAzureAuthProviderAPI ¶
func NewMockAzureAuthProviderAPI(t interface { mock.TestingT Cleanup(func()) }) *MockAzureAuthProviderAPI
NewMockAzureAuthProviderAPI creates a new instance of MockAzureAuthProviderAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockAzureAuthProviderAPI) EXPECT ¶
func (_m *MockAzureAuthProviderAPI) EXPECT() *MockAzureAuthProviderAPI_Expecter
func (*MockAzureAuthProviderAPI) FindCertificateCredential ¶
func (_m *MockAzureAuthProviderAPI) FindCertificateCredential(tenantID string, clientID string, certPath string, password string, options *azidentity.ClientCertificateCredentialOptions) (*azidentity.ClientCertificateCredential, error)
FindCertificateCredential provides a mock function with given fields: tenantID, clientID, certPath, password, options
func (*MockAzureAuthProviderAPI) FindClientSecretCredentials ¶
func (_m *MockAzureAuthProviderAPI) FindClientSecretCredentials(tenantID string, clientID string, clientSecret string, options *azidentity.ClientSecretCredentialOptions) (*azidentity.ClientSecretCredential, error)
FindClientSecretCredentials provides a mock function with given fields: tenantID, clientID, clientSecret, options
func (*MockAzureAuthProviderAPI) FindDefaultCredentials ¶
func (_m *MockAzureAuthProviderAPI) FindDefaultCredentials(options *azidentity.DefaultAzureCredentialOptions) (*azidentity.DefaultAzureCredential, error)
FindDefaultCredentials provides a mock function with given fields: options
func (*MockAzureAuthProviderAPI) FindUsernamePasswordCredentials ¶
func (_m *MockAzureAuthProviderAPI) FindUsernamePasswordCredentials(tenantID string, clientID string, username string, password string, options *azidentity.UsernamePasswordCredentialOptions) (*azidentity.UsernamePasswordCredential, error)
FindUsernamePasswordCredentials provides a mock function with given fields: tenantID, clientID, username, password, options
type MockAzureAuthProviderAPI_Expecter ¶
type MockAzureAuthProviderAPI_Expecter struct {
// contains filtered or unexported fields
}
func (*MockAzureAuthProviderAPI_Expecter) FindCertificateCredential ¶
func (_e *MockAzureAuthProviderAPI_Expecter) FindCertificateCredential(tenantID interface{}, clientID interface{}, certPath interface{}, password interface{}, options interface{}) *MockAzureAuthProviderAPI_FindCertificateCredential_Call
FindCertificateCredential is a helper method to define mock.On call
- tenantID string
- clientID string
- certPath string
- password string
- options *azidentity.ClientCertificateCredentialOptions
func (*MockAzureAuthProviderAPI_Expecter) FindClientSecretCredentials ¶
func (_e *MockAzureAuthProviderAPI_Expecter) FindClientSecretCredentials(tenantID interface{}, clientID interface{}, clientSecret interface{}, options interface{}) *MockAzureAuthProviderAPI_FindClientSecretCredentials_Call
FindClientSecretCredentials is a helper method to define mock.On call
- tenantID string
- clientID string
- clientSecret string
- options *azidentity.ClientSecretCredentialOptions
func (*MockAzureAuthProviderAPI_Expecter) FindDefaultCredentials ¶
func (_e *MockAzureAuthProviderAPI_Expecter) FindDefaultCredentials(options interface{}) *MockAzureAuthProviderAPI_FindDefaultCredentials_Call
FindDefaultCredentials is a helper method to define mock.On call
- options *azidentity.DefaultAzureCredentialOptions
func (*MockAzureAuthProviderAPI_Expecter) FindUsernamePasswordCredentials ¶
func (_e *MockAzureAuthProviderAPI_Expecter) FindUsernamePasswordCredentials(tenantID interface{}, clientID interface{}, username interface{}, password interface{}, options interface{}) *MockAzureAuthProviderAPI_FindUsernamePasswordCredentials_Call
FindUsernamePasswordCredentials is a helper method to define mock.On call
- tenantID string
- clientID string
- username string
- password string
- options *azidentity.UsernamePasswordCredentialOptions
type MockAzureAuthProviderAPI_FindCertificateCredential_Call ¶
MockAzureAuthProviderAPI_FindCertificateCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindCertificateCredential'
func (*MockAzureAuthProviderAPI_FindCertificateCredential_Call) Run ¶
func (_c *MockAzureAuthProviderAPI_FindCertificateCredential_Call) Run(run func(tenantID string, clientID string, certPath string, password string, options *azidentity.ClientCertificateCredentialOptions)) *MockAzureAuthProviderAPI_FindCertificateCredential_Call
func (*MockAzureAuthProviderAPI_FindCertificateCredential_Call) RunAndReturn ¶
func (_c *MockAzureAuthProviderAPI_FindCertificateCredential_Call) RunAndReturn(run func(string, string, string, string, *azidentity.ClientCertificateCredentialOptions) (*azidentity.ClientCertificateCredential, error)) *MockAzureAuthProviderAPI_FindCertificateCredential_Call
type MockAzureAuthProviderAPI_FindClientSecretCredentials_Call ¶
MockAzureAuthProviderAPI_FindClientSecretCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindClientSecretCredentials'
func (*MockAzureAuthProviderAPI_FindClientSecretCredentials_Call) Run ¶
func (_c *MockAzureAuthProviderAPI_FindClientSecretCredentials_Call) Run(run func(tenantID string, clientID string, clientSecret string, options *azidentity.ClientSecretCredentialOptions)) *MockAzureAuthProviderAPI_FindClientSecretCredentials_Call
func (*MockAzureAuthProviderAPI_FindClientSecretCredentials_Call) RunAndReturn ¶
func (_c *MockAzureAuthProviderAPI_FindClientSecretCredentials_Call) RunAndReturn(run func(string, string, string, *azidentity.ClientSecretCredentialOptions) (*azidentity.ClientSecretCredential, error)) *MockAzureAuthProviderAPI_FindClientSecretCredentials_Call
type MockAzureAuthProviderAPI_FindDefaultCredentials_Call ¶
MockAzureAuthProviderAPI_FindDefaultCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindDefaultCredentials'
func (*MockAzureAuthProviderAPI_FindDefaultCredentials_Call) Run ¶
func (_c *MockAzureAuthProviderAPI_FindDefaultCredentials_Call) Run(run func(options *azidentity.DefaultAzureCredentialOptions)) *MockAzureAuthProviderAPI_FindDefaultCredentials_Call
func (*MockAzureAuthProviderAPI_FindDefaultCredentials_Call) RunAndReturn ¶
func (_c *MockAzureAuthProviderAPI_FindDefaultCredentials_Call) RunAndReturn(run func(*azidentity.DefaultAzureCredentialOptions) (*azidentity.DefaultAzureCredential, error)) *MockAzureAuthProviderAPI_FindDefaultCredentials_Call
type MockAzureAuthProviderAPI_FindUsernamePasswordCredentials_Call ¶
MockAzureAuthProviderAPI_FindUsernamePasswordCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindUsernamePasswordCredentials'
func (*MockAzureAuthProviderAPI_FindUsernamePasswordCredentials_Call) Run ¶
func (_c *MockAzureAuthProviderAPI_FindUsernamePasswordCredentials_Call) Run(run func(tenantID string, clientID string, username string, password string, options *azidentity.UsernamePasswordCredentialOptions)) *MockAzureAuthProviderAPI_FindUsernamePasswordCredentials_Call
func (*MockAzureAuthProviderAPI_FindUsernamePasswordCredentials_Call) RunAndReturn ¶
type MockConfigProviderAPI ¶
MockConfigProviderAPI is an autogenerated mock type for the ConfigProviderAPI type
func NewMockConfigProviderAPI ¶
func NewMockConfigProviderAPI(t interface { mock.TestingT Cleanup(func()) }) *MockConfigProviderAPI
NewMockConfigProviderAPI creates a new instance of MockConfigProviderAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockConfigProviderAPI) EXPECT ¶
func (_m *MockConfigProviderAPI) EXPECT() *MockConfigProviderAPI_Expecter
func (*MockConfigProviderAPI) GetAzureClientConfig ¶
func (_m *MockConfigProviderAPI) GetAzureClientConfig(cfg config.AzureConfig) (*AzureFactoryConfig, error)
GetAzureClientConfig provides a mock function with given fields: cfg
type MockConfigProviderAPI_Expecter ¶
type MockConfigProviderAPI_Expecter struct {
// contains filtered or unexported fields
}
func (*MockConfigProviderAPI_Expecter) GetAzureClientConfig ¶
func (_e *MockConfigProviderAPI_Expecter) GetAzureClientConfig(cfg interface{}) *MockConfigProviderAPI_GetAzureClientConfig_Call
GetAzureClientConfig is a helper method to define mock.On call
- cfg config.AzureConfig
type MockConfigProviderAPI_GetAzureClientConfig_Call ¶
MockConfigProviderAPI_GetAzureClientConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAzureClientConfig'
func (*MockConfigProviderAPI_GetAzureClientConfig_Call) Return ¶
func (_c *MockConfigProviderAPI_GetAzureClientConfig_Call) Return(_a0 *AzureFactoryConfig, _a1 error) *MockConfigProviderAPI_GetAzureClientConfig_Call
func (*MockConfigProviderAPI_GetAzureClientConfig_Call) Run ¶
func (_c *MockConfigProviderAPI_GetAzureClientConfig_Call) Run(run func(cfg config.AzureConfig)) *MockConfigProviderAPI_GetAzureClientConfig_Call
func (*MockConfigProviderAPI_GetAzureClientConfig_Call) RunAndReturn ¶
func (_c *MockConfigProviderAPI_GetAzureClientConfig_Call) RunAndReturn(run func(config.AzureConfig) (*AzureFactoryConfig, error)) *MockConfigProviderAPI_GetAzureClientConfig_Call