Documentation
¶
Index ¶
- type MockProviderAPI
- func (_m *MockProviderAPI) EXPECT() *MockProviderAPI_Expecter
- func (_mock *MockProviderAPI) ListDirectoryRoles(context1 context.Context) ([]*models.DirectoryRole, error)
- func (_mock *MockProviderAPI) ListGroups(context1 context.Context) ([]*models.Group, error)
- func (_mock *MockProviderAPI) ListServicePrincipals(context1 context.Context) ([]*models.ServicePrincipal, error)
- func (_mock *MockProviderAPI) ListUsers(context1 context.Context) ([]*models.User, error)
- type MockProviderAPI_Expecter
- func (_e *MockProviderAPI_Expecter) ListDirectoryRoles(context1 interface{}) *MockProviderAPI_ListDirectoryRoles_Call
- func (_e *MockProviderAPI_Expecter) ListGroups(context1 interface{}) *MockProviderAPI_ListGroups_Call
- func (_e *MockProviderAPI_Expecter) ListServicePrincipals(context1 interface{}) *MockProviderAPI_ListServicePrincipals_Call
- func (_e *MockProviderAPI_Expecter) ListUsers(context1 interface{}) *MockProviderAPI_ListUsers_Call
- type MockProviderAPI_ListDirectoryRoles_Call
- func (_c *MockProviderAPI_ListDirectoryRoles_Call) Return(directoryRoles []*models.DirectoryRole, err error) *MockProviderAPI_ListDirectoryRoles_Call
- func (_c *MockProviderAPI_ListDirectoryRoles_Call) Run(run func(context1 context.Context)) *MockProviderAPI_ListDirectoryRoles_Call
- func (_c *MockProviderAPI_ListDirectoryRoles_Call) RunAndReturn(run func(context1 context.Context) ([]*models.DirectoryRole, error)) *MockProviderAPI_ListDirectoryRoles_Call
- type MockProviderAPI_ListGroups_Call
- func (_c *MockProviderAPI_ListGroups_Call) Return(groups []*models.Group, err error) *MockProviderAPI_ListGroups_Call
- func (_c *MockProviderAPI_ListGroups_Call) Run(run func(context1 context.Context)) *MockProviderAPI_ListGroups_Call
- func (_c *MockProviderAPI_ListGroups_Call) RunAndReturn(run func(context1 context.Context) ([]*models.Group, error)) *MockProviderAPI_ListGroups_Call
- type MockProviderAPI_ListServicePrincipals_Call
- func (_c *MockProviderAPI_ListServicePrincipals_Call) Return(servicePrincipals []*models.ServicePrincipal, err error) *MockProviderAPI_ListServicePrincipals_Call
- func (_c *MockProviderAPI_ListServicePrincipals_Call) Run(run func(context1 context.Context)) *MockProviderAPI_ListServicePrincipals_Call
- func (_c *MockProviderAPI_ListServicePrincipals_Call) RunAndReturn(run func(context1 context.Context) ([]*models.ServicePrincipal, error)) *MockProviderAPI_ListServicePrincipals_Call
- type MockProviderAPI_ListUsers_Call
- func (_c *MockProviderAPI_ListUsers_Call) Return(users []*models.User, err error) *MockProviderAPI_ListUsers_Call
- func (_c *MockProviderAPI_ListUsers_Call) Run(run func(context1 context.Context)) *MockProviderAPI_ListUsers_Call
- func (_c *MockProviderAPI_ListUsers_Call) RunAndReturn(run func(context1 context.Context) ([]*models.User, error)) *MockProviderAPI_ListUsers_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) ListDirectoryRoles ¶
func (_mock *MockProviderAPI) ListDirectoryRoles(context1 context.Context) ([]*models.DirectoryRole, error)
ListDirectoryRoles provides a mock function for the type MockProviderAPI
func (*MockProviderAPI) ListGroups ¶
ListGroups provides a mock function for the type MockProviderAPI
func (*MockProviderAPI) ListServicePrincipals ¶
func (_mock *MockProviderAPI) ListServicePrincipals(context1 context.Context) ([]*models.ServicePrincipal, error)
ListServicePrincipals provides a mock function for the type MockProviderAPI
type MockProviderAPI_Expecter ¶
type MockProviderAPI_Expecter struct {
// contains filtered or unexported fields
}
func (*MockProviderAPI_Expecter) ListDirectoryRoles ¶
func (_e *MockProviderAPI_Expecter) ListDirectoryRoles(context1 interface{}) *MockProviderAPI_ListDirectoryRoles_Call
ListDirectoryRoles is a helper method to define mock.On call
- context1 context.Context
func (*MockProviderAPI_Expecter) ListGroups ¶
func (_e *MockProviderAPI_Expecter) ListGroups(context1 interface{}) *MockProviderAPI_ListGroups_Call
ListGroups is a helper method to define mock.On call
- context1 context.Context
func (*MockProviderAPI_Expecter) ListServicePrincipals ¶
func (_e *MockProviderAPI_Expecter) ListServicePrincipals(context1 interface{}) *MockProviderAPI_ListServicePrincipals_Call
ListServicePrincipals is a helper method to define mock.On call
- context1 context.Context
func (*MockProviderAPI_Expecter) ListUsers ¶
func (_e *MockProviderAPI_Expecter) ListUsers(context1 interface{}) *MockProviderAPI_ListUsers_Call
ListUsers is a helper method to define mock.On call
- context1 context.Context
type MockProviderAPI_ListDirectoryRoles_Call ¶
MockProviderAPI_ListDirectoryRoles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListDirectoryRoles'
func (*MockProviderAPI_ListDirectoryRoles_Call) Return ¶
func (_c *MockProviderAPI_ListDirectoryRoles_Call) Return(directoryRoles []*models.DirectoryRole, err error) *MockProviderAPI_ListDirectoryRoles_Call
func (*MockProviderAPI_ListDirectoryRoles_Call) Run ¶
func (_c *MockProviderAPI_ListDirectoryRoles_Call) Run(run func(context1 context.Context)) *MockProviderAPI_ListDirectoryRoles_Call
func (*MockProviderAPI_ListDirectoryRoles_Call) RunAndReturn ¶
func (_c *MockProviderAPI_ListDirectoryRoles_Call) RunAndReturn(run func(context1 context.Context) ([]*models.DirectoryRole, error)) *MockProviderAPI_ListDirectoryRoles_Call
type MockProviderAPI_ListGroups_Call ¶
MockProviderAPI_ListGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListGroups'
func (*MockProviderAPI_ListGroups_Call) Return ¶
func (_c *MockProviderAPI_ListGroups_Call) Return(groups []*models.Group, err error) *MockProviderAPI_ListGroups_Call
func (*MockProviderAPI_ListGroups_Call) Run ¶
func (_c *MockProviderAPI_ListGroups_Call) Run(run func(context1 context.Context)) *MockProviderAPI_ListGroups_Call
func (*MockProviderAPI_ListGroups_Call) RunAndReturn ¶
func (_c *MockProviderAPI_ListGroups_Call) RunAndReturn(run func(context1 context.Context) ([]*models.Group, error)) *MockProviderAPI_ListGroups_Call
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(servicePrincipals []*models.ServicePrincipal, err error) *MockProviderAPI_ListServicePrincipals_Call
func (*MockProviderAPI_ListServicePrincipals_Call) Run ¶
func (_c *MockProviderAPI_ListServicePrincipals_Call) Run(run func(context1 context.Context)) *MockProviderAPI_ListServicePrincipals_Call
func (*MockProviderAPI_ListServicePrincipals_Call) RunAndReturn ¶
func (_c *MockProviderAPI_ListServicePrincipals_Call) RunAndReturn(run func(context1 context.Context) ([]*models.ServicePrincipal, error)) *MockProviderAPI_ListServicePrincipals_Call
type MockProviderAPI_ListUsers_Call ¶
MockProviderAPI_ListUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListUsers'
func (*MockProviderAPI_ListUsers_Call) Return ¶
func (_c *MockProviderAPI_ListUsers_Call) Return(users []*models.User, err error) *MockProviderAPI_ListUsers_Call
func (*MockProviderAPI_ListUsers_Call) Run ¶
func (_c *MockProviderAPI_ListUsers_Call) Run(run func(context1 context.Context)) *MockProviderAPI_ListUsers_Call
func (*MockProviderAPI_ListUsers_Call) RunAndReturn ¶
func (_c *MockProviderAPI_ListUsers_Call) RunAndReturn(run func(context1 context.Context) ([]*models.User, error)) *MockProviderAPI_ListUsers_Call
type ProviderAPI ¶
type ProviderAPI interface {
ListServicePrincipals(context.Context) ([]*models.ServicePrincipal, error)
ListDirectoryRoles(context.Context) ([]*models.DirectoryRole, error)
ListGroups(context.Context) ([]*models.Group, error)
ListUsers(context.Context) ([]*models.User, error)
}
func NewProvider ¶
func NewProvider(log *clog.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