Documentation ¶
Index ¶
- func AuditLogForTeam(ctx context.Context, apiclient *apiclient.APIClient, reconciler Reconciler, ...)
- func AuditLogForTeamAndUser(ctx context.Context, apiclient *apiclient.APIClient, reconciler Reconciler, ...)
- func GetTeamMembers(ctx context.Context, client protoapi.TeamsClient, teamSlug string) ([]*protoapi.TeamMember, error)
- type InFlight
- type Input
- type Manager
- func (m *Manager) AddReconciler(r Reconciler)
- func (m *Manager) Close()
- func (m *Manager) ListenForEvents(ctx context.Context)
- func (m *Manager) RegisterReconcilersWithAPI(ctx context.Context) error
- func (m *Manager) Run(ctx context.Context)
- func (m *Manager) SyncAllTeams(ctx context.Context, fullSyncInterval time.Duration) error
- type MockReconciler
- func (_m *MockReconciler) Configuration() *protoapi.NewReconciler
- func (_m *MockReconciler) Delete(ctx context.Context, client *apiclient.APIClient, naisTeam *protoapi.Team, ...) error
- func (_m *MockReconciler) EXPECT() *MockReconciler_Expecter
- func (_m *MockReconciler) Name() string
- func (_m *MockReconciler) Reconcile(ctx context.Context, client *apiclient.APIClient, naisTeam *protoapi.Team, ...) error
- type MockReconciler_Configuration_Call
- func (_c *MockReconciler_Configuration_Call) Return(_a0 *protoapi.NewReconciler) *MockReconciler_Configuration_Call
- func (_c *MockReconciler_Configuration_Call) Run(run func()) *MockReconciler_Configuration_Call
- func (_c *MockReconciler_Configuration_Call) RunAndReturn(run func() *protoapi.NewReconciler) *MockReconciler_Configuration_Call
- type MockReconciler_Delete_Call
- type MockReconciler_Expecter
- func (_e *MockReconciler_Expecter) Configuration() *MockReconciler_Configuration_Call
- func (_e *MockReconciler_Expecter) Delete(ctx interface{}, client interface{}, naisTeam interface{}, log interface{}) *MockReconciler_Delete_Call
- func (_e *MockReconciler_Expecter) Name() *MockReconciler_Name_Call
- func (_e *MockReconciler_Expecter) Reconcile(ctx interface{}, client interface{}, naisTeam interface{}, log interface{}) *MockReconciler_Reconcile_Call
- type MockReconciler_Name_Call
- type MockReconciler_Reconcile_Call
- type Queue
- type Reconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuditLogForTeam ¶
func AuditLogForTeamAndUser ¶
func GetTeamMembers ¶
func GetTeamMembers(ctx context.Context, client protoapi.TeamsClient, teamSlug string) ([]*protoapi.TeamMember, error)
GetTeamMembers retrieves all members of a team from the NAIS API
Types ¶
type InFlight ¶
func NewInFlight ¶
func NewInFlight() InFlight
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(ctx context.Context, c *apiclient.APIClient, enableDuringRegistration []string, pubsubSubscriptionID, pubsubProjectID string, log logrus.FieldLogger) *Manager
NewManager creates a new Manager instance
func (*Manager) AddReconciler ¶
func (m *Manager) AddReconciler(r Reconciler)
AddReconciler will add a reconciler to the manager.
func (*Manager) Close ¶
func (m *Manager) Close()
Close will close the manager and all its resources.
func (*Manager) ListenForEvents ¶
ListenForEvents will listen for events on the pubsub subscription, if configured. This function will block until the context is canceled.
func (*Manager) RegisterReconcilersWithAPI ¶
RegisterReconcilersWithAPI will register all reconcilers with the NAIS API.
type MockReconciler ¶
MockReconciler is an autogenerated mock type for the Reconciler type
func NewMockReconciler ¶
func NewMockReconciler(t interface { mock.TestingT Cleanup(func()) }, ) *MockReconciler
NewMockReconciler creates a new instance of MockReconciler. 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 (*MockReconciler) Configuration ¶
func (_m *MockReconciler) Configuration() *protoapi.NewReconciler
Configuration provides a mock function with given fields:
func (*MockReconciler) Delete ¶
func (_m *MockReconciler) Delete(ctx context.Context, client *apiclient.APIClient, naisTeam *protoapi.Team, log logrus.FieldLogger) error
Delete provides a mock function with given fields: ctx, client, naisTeam, log
func (*MockReconciler) EXPECT ¶
func (_m *MockReconciler) EXPECT() *MockReconciler_Expecter
func (*MockReconciler) Name ¶
func (_m *MockReconciler) Name() string
Name provides a mock function with given fields:
type MockReconciler_Configuration_Call ¶
MockReconciler_Configuration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Configuration'
func (*MockReconciler_Configuration_Call) Return ¶
func (_c *MockReconciler_Configuration_Call) Return(_a0 *protoapi.NewReconciler) *MockReconciler_Configuration_Call
func (*MockReconciler_Configuration_Call) Run ¶
func (_c *MockReconciler_Configuration_Call) Run(run func()) *MockReconciler_Configuration_Call
func (*MockReconciler_Configuration_Call) RunAndReturn ¶
func (_c *MockReconciler_Configuration_Call) RunAndReturn(run func() *protoapi.NewReconciler) *MockReconciler_Configuration_Call
type MockReconciler_Delete_Call ¶
MockReconciler_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
func (*MockReconciler_Delete_Call) Return ¶
func (_c *MockReconciler_Delete_Call) Return(_a0 error) *MockReconciler_Delete_Call
func (*MockReconciler_Delete_Call) Run ¶
func (_c *MockReconciler_Delete_Call) Run(run func(ctx context.Context, client *apiclient.APIClient, naisTeam *protoapi.Team, log logrus.FieldLogger)) *MockReconciler_Delete_Call
func (*MockReconciler_Delete_Call) RunAndReturn ¶
func (_c *MockReconciler_Delete_Call) RunAndReturn(run func(context.Context, *apiclient.APIClient, *protoapi.Team, logrus.FieldLogger) error) *MockReconciler_Delete_Call
type MockReconciler_Expecter ¶
type MockReconciler_Expecter struct {
// contains filtered or unexported fields
}
func (*MockReconciler_Expecter) Configuration ¶
func (_e *MockReconciler_Expecter) Configuration() *MockReconciler_Configuration_Call
Configuration is a helper method to define mock.On call
func (*MockReconciler_Expecter) Delete ¶
func (_e *MockReconciler_Expecter) Delete(ctx interface{}, client interface{}, naisTeam interface{}, log interface{}) *MockReconciler_Delete_Call
Delete is a helper method to define mock.On call
- ctx context.Context
- client *apiclient.APIClient
- naisTeam *protoapi.Team
- log logrus.FieldLogger
func (*MockReconciler_Expecter) Name ¶
func (_e *MockReconciler_Expecter) Name() *MockReconciler_Name_Call
Name is a helper method to define mock.On call
func (*MockReconciler_Expecter) Reconcile ¶
func (_e *MockReconciler_Expecter) Reconcile(ctx interface{}, client interface{}, naisTeam interface{}, log interface{}) *MockReconciler_Reconcile_Call
Reconcile is a helper method to define mock.On call
- ctx context.Context
- client *apiclient.APIClient
- naisTeam *protoapi.Team
- log logrus.FieldLogger
type MockReconciler_Name_Call ¶
MockReconciler_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name'
func (*MockReconciler_Name_Call) Return ¶
func (_c *MockReconciler_Name_Call) Return(_a0 string) *MockReconciler_Name_Call
func (*MockReconciler_Name_Call) Run ¶
func (_c *MockReconciler_Name_Call) Run(run func()) *MockReconciler_Name_Call
func (*MockReconciler_Name_Call) RunAndReturn ¶
func (_c *MockReconciler_Name_Call) RunAndReturn(run func() string) *MockReconciler_Name_Call
type MockReconciler_Reconcile_Call ¶
MockReconciler_Reconcile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reconcile'
func (*MockReconciler_Reconcile_Call) Return ¶
func (_c *MockReconciler_Reconcile_Call) Return(_a0 error) *MockReconciler_Reconcile_Call
func (*MockReconciler_Reconcile_Call) Run ¶
func (_c *MockReconciler_Reconcile_Call) Run(run func(ctx context.Context, client *apiclient.APIClient, naisTeam *protoapi.Team, log logrus.FieldLogger)) *MockReconciler_Reconcile_Call
func (*MockReconciler_Reconcile_Call) RunAndReturn ¶
func (_c *MockReconciler_Reconcile_Call) RunAndReturn(run func(context.Context, *apiclient.APIClient, *protoapi.Team, logrus.FieldLogger) error) *MockReconciler_Reconcile_Call
type Reconciler ¶
type Reconciler interface { Configuration() *protoapi.NewReconciler Name() string Reconcile(ctx context.Context, client *apiclient.APIClient, naisTeam *protoapi.Team, log logrus.FieldLogger) error Delete(ctx context.Context, client *apiclient.APIClient, naisTeam *protoapi.Team, log logrus.FieldLogger) error }