Documentation ¶
Index ¶
- type MockProviderAPI
- type MockProviderAPI_Expecter
- type MockProviderAPI_ListServicePrincipals_Call
- func (_c *MockProviderAPI_ListServicePrincipals_Call) Return(_a0 []*models.ServicePrincipal, _a1 error) *MockProviderAPI_ListServicePrincipals_Call
- func (_c *MockProviderAPI_ListServicePrincipals_Call) Run(run func(_a0 context.Context)) *MockProviderAPI_ListServicePrincipals_Call
- func (_c *MockProviderAPI_ListServicePrincipals_Call) RunAndReturn(run func(context.Context) ([]*models.ServicePrincipal, error)) *MockProviderAPI_ListServicePrincipals_Call
- type ProviderAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockProviderAPI ¶
MockProviderAPI is an autogenerated mock type for the ProviderAPI type
func NewMockProviderAPI ¶
func NewMockProviderAPI(t interface { mock.TestingT Cleanup(func()) }) *MockProviderAPI
NewMockProviderAPI creates a new instance of MockProviderAPI. 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 (*MockProviderAPI) EXPECT ¶
func (_m *MockProviderAPI) EXPECT() *MockProviderAPI_Expecter
func (*MockProviderAPI) ListServicePrincipals ¶
func (_m *MockProviderAPI) ListServicePrincipals(_a0 context.Context) ([]*models.ServicePrincipal, error)
ListServicePrincipals provides a mock function with given fields: _a0
type MockProviderAPI_Expecter ¶
type MockProviderAPI_Expecter struct {
// contains filtered or unexported fields
}
func (*MockProviderAPI_Expecter) ListServicePrincipals ¶
func (_e *MockProviderAPI_Expecter) ListServicePrincipals(_a0 interface{}) *MockProviderAPI_ListServicePrincipals_Call
ListServicePrincipals is a helper method to define mock.On call
- _a0 context.Context
type MockProviderAPI_ListServicePrincipals_Call ¶
MockProviderAPI_ListServicePrincipals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListServicePrincipals'
func (*MockProviderAPI_ListServicePrincipals_Call) Return ¶
func (_c *MockProviderAPI_ListServicePrincipals_Call) Return(_a0 []*models.ServicePrincipal, _a1 error) *MockProviderAPI_ListServicePrincipals_Call
func (*MockProviderAPI_ListServicePrincipals_Call) Run ¶
func (_c *MockProviderAPI_ListServicePrincipals_Call) Run(run func(_a0 context.Context)) *MockProviderAPI_ListServicePrincipals_Call
func (*MockProviderAPI_ListServicePrincipals_Call) RunAndReturn ¶
func (_c *MockProviderAPI_ListServicePrincipals_Call) RunAndReturn(run func(context.Context) ([]*models.ServicePrincipal, error)) *MockProviderAPI_ListServicePrincipals_Call
type ProviderAPI ¶
type ProviderAPI interface {
ListServicePrincipals(context.Context) ([]*models.ServicePrincipal, error)
}
func NewProvider ¶
func NewProvider(log *logp.Logger, azureConfig auth.AzureFactoryConfig) (ProviderAPI, error)
Second argument is scopes. Leave nil, then it selects default; Adjust if in trouble Docs: https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go