teamsync

package
v0.0.0-...-96f7096 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	SetReconcilerFactories(factories ReconcilerFactories)
	Schedule(input Input) error
	ScheduleAllTeams(ctx context.Context, correlationID uuid.UUID) ([]*db.Team, error)
	InitReconcilers(ctx context.Context) error
	UseReconciler(reconciler db.Reconciler) error
	RemoveReconciler(reconcilerName sqlc.ReconcilerName)
	SyncTeams(ctx context.Context)
	UpdateMetrics(ctx context.Context)
	DeleteTeam(teamSlug slug.Slug, correlationID uuid.UUID) error
	Close()
}

func NewHandler

func NewHandler(ctx context.Context, database db.Database, cfg *config.Config, log logger.Logger) Handler

type Input

type Input struct {
	CorrelationID uuid.UUID
	TeamSlug      slug.Slug
}

type MockHandler

type MockHandler struct {
	mock.Mock
}

MockHandler is an autogenerated mock type for the Handler type

func NewMockHandler

func NewMockHandler(t interface {
	mock.TestingT
	Cleanup(func())
},
) *MockHandler

NewMockHandler creates a new instance of MockHandler. 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 (*MockHandler) Close

func (_m *MockHandler) Close()

Close provides a mock function with given fields:

func (*MockHandler) DeleteTeam

func (_m *MockHandler) DeleteTeam(teamSlug slug.Slug, correlationID uuid.UUID) error

DeleteTeam provides a mock function with given fields: teamSlug, correlationID

func (*MockHandler) EXPECT

func (_m *MockHandler) EXPECT() *MockHandler_Expecter

func (*MockHandler) InitReconcilers

func (_m *MockHandler) InitReconcilers(ctx context.Context) error

InitReconcilers provides a mock function with given fields: ctx

func (*MockHandler) RemoveReconciler

func (_m *MockHandler) RemoveReconciler(reconcilerName sqlc.ReconcilerName)

RemoveReconciler provides a mock function with given fields: reconcilerName

func (*MockHandler) Schedule

func (_m *MockHandler) Schedule(input Input) error

Schedule provides a mock function with given fields: input

func (*MockHandler) ScheduleAllTeams

func (_m *MockHandler) ScheduleAllTeams(ctx context.Context, correlationID uuid.UUID) ([]*db.Team, error)

ScheduleAllTeams provides a mock function with given fields: ctx, correlationID

func (*MockHandler) SetReconcilerFactories

func (_m *MockHandler) SetReconcilerFactories(factories ReconcilerFactories)

SetReconcilerFactories provides a mock function with given fields: factories

func (*MockHandler) SyncTeams

func (_m *MockHandler) SyncTeams(ctx context.Context)

SyncTeams provides a mock function with given fields: ctx

func (*MockHandler) UpdateMetrics

func (_m *MockHandler) UpdateMetrics(ctx context.Context)

UpdateMetrics provides a mock function with given fields: ctx

func (*MockHandler) UseReconciler

func (_m *MockHandler) UseReconciler(reconciler db.Reconciler) error

UseReconciler provides a mock function with given fields: reconciler

type MockHandler_Close_Call

type MockHandler_Close_Call struct {
	*mock.Call
}

MockHandler_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'

func (*MockHandler_Close_Call) Return

func (*MockHandler_Close_Call) Run

func (_c *MockHandler_Close_Call) Run(run func()) *MockHandler_Close_Call

func (*MockHandler_Close_Call) RunAndReturn

func (_c *MockHandler_Close_Call) RunAndReturn(run func()) *MockHandler_Close_Call

type MockHandler_DeleteTeam_Call

type MockHandler_DeleteTeam_Call struct {
	*mock.Call
}

MockHandler_DeleteTeam_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteTeam'

func (*MockHandler_DeleteTeam_Call) Return

func (*MockHandler_DeleteTeam_Call) Run

func (_c *MockHandler_DeleteTeam_Call) Run(run func(teamSlug slug.Slug, correlationID uuid.UUID)) *MockHandler_DeleteTeam_Call

func (*MockHandler_DeleteTeam_Call) RunAndReturn

type MockHandler_Expecter

type MockHandler_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockHandler_Expecter) Close

Close is a helper method to define mock.On call

func (*MockHandler_Expecter) DeleteTeam

func (_e *MockHandler_Expecter) DeleteTeam(teamSlug interface{}, correlationID interface{}) *MockHandler_DeleteTeam_Call

DeleteTeam is a helper method to define mock.On call

  • teamSlug slug.Slug
  • correlationID uuid.UUID

func (*MockHandler_Expecter) InitReconcilers

func (_e *MockHandler_Expecter) InitReconcilers(ctx interface{}) *MockHandler_InitReconcilers_Call

InitReconcilers is a helper method to define mock.On call

  • ctx context.Context

func (*MockHandler_Expecter) RemoveReconciler

func (_e *MockHandler_Expecter) RemoveReconciler(reconcilerName interface{}) *MockHandler_RemoveReconciler_Call

RemoveReconciler is a helper method to define mock.On call

  • reconcilerName sqlc.ReconcilerName

func (*MockHandler_Expecter) Schedule

func (_e *MockHandler_Expecter) Schedule(input interface{}) *MockHandler_Schedule_Call

Schedule is a helper method to define mock.On call

  • input Input

func (*MockHandler_Expecter) ScheduleAllTeams

func (_e *MockHandler_Expecter) ScheduleAllTeams(ctx interface{}, correlationID interface{}) *MockHandler_ScheduleAllTeams_Call

ScheduleAllTeams is a helper method to define mock.On call

  • ctx context.Context
  • correlationID uuid.UUID

func (*MockHandler_Expecter) SetReconcilerFactories

func (_e *MockHandler_Expecter) SetReconcilerFactories(factories interface{}) *MockHandler_SetReconcilerFactories_Call

SetReconcilerFactories is a helper method to define mock.On call

  • factories ReconcilerFactories

func (*MockHandler_Expecter) SyncTeams

func (_e *MockHandler_Expecter) SyncTeams(ctx interface{}) *MockHandler_SyncTeams_Call

SyncTeams is a helper method to define mock.On call

  • ctx context.Context

func (*MockHandler_Expecter) UpdateMetrics

func (_e *MockHandler_Expecter) UpdateMetrics(ctx interface{}) *MockHandler_UpdateMetrics_Call

UpdateMetrics is a helper method to define mock.On call

  • ctx context.Context

func (*MockHandler_Expecter) UseReconciler

func (_e *MockHandler_Expecter) UseReconciler(reconciler interface{}) *MockHandler_UseReconciler_Call

UseReconciler is a helper method to define mock.On call

  • reconciler db.Reconciler

type MockHandler_InitReconcilers_Call

type MockHandler_InitReconcilers_Call struct {
	*mock.Call
}

MockHandler_InitReconcilers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InitReconcilers'

func (*MockHandler_InitReconcilers_Call) Return

func (*MockHandler_InitReconcilers_Call) Run

func (*MockHandler_InitReconcilers_Call) RunAndReturn

type MockHandler_RemoveReconciler_Call

type MockHandler_RemoveReconciler_Call struct {
	*mock.Call
}

MockHandler_RemoveReconciler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveReconciler'

func (*MockHandler_RemoveReconciler_Call) Return

func (*MockHandler_RemoveReconciler_Call) Run

func (*MockHandler_RemoveReconciler_Call) RunAndReturn

type MockHandler_ScheduleAllTeams_Call

type MockHandler_ScheduleAllTeams_Call struct {
	*mock.Call
}

MockHandler_ScheduleAllTeams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ScheduleAllTeams'

func (*MockHandler_ScheduleAllTeams_Call) Return

func (*MockHandler_ScheduleAllTeams_Call) Run

func (*MockHandler_ScheduleAllTeams_Call) RunAndReturn

type MockHandler_Schedule_Call

type MockHandler_Schedule_Call struct {
	*mock.Call
}

MockHandler_Schedule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Schedule'

func (*MockHandler_Schedule_Call) Return

func (*MockHandler_Schedule_Call) Run

func (_c *MockHandler_Schedule_Call) Run(run func(input Input)) *MockHandler_Schedule_Call

func (*MockHandler_Schedule_Call) RunAndReturn

func (_c *MockHandler_Schedule_Call) RunAndReturn(run func(Input) error) *MockHandler_Schedule_Call

type MockHandler_SetReconcilerFactories_Call

type MockHandler_SetReconcilerFactories_Call struct {
	*mock.Call
}

MockHandler_SetReconcilerFactories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetReconcilerFactories'

func (*MockHandler_SetReconcilerFactories_Call) Return

func (*MockHandler_SetReconcilerFactories_Call) Run

func (*MockHandler_SetReconcilerFactories_Call) RunAndReturn

type MockHandler_SyncTeams_Call

type MockHandler_SyncTeams_Call struct {
	*mock.Call
}

MockHandler_SyncTeams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncTeams'

func (*MockHandler_SyncTeams_Call) Return

func (*MockHandler_SyncTeams_Call) Run

func (*MockHandler_SyncTeams_Call) RunAndReturn

type MockHandler_UpdateMetrics_Call

type MockHandler_UpdateMetrics_Call struct {
	*mock.Call
}

MockHandler_UpdateMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateMetrics'

func (*MockHandler_UpdateMetrics_Call) Return

func (*MockHandler_UpdateMetrics_Call) Run

func (*MockHandler_UpdateMetrics_Call) RunAndReturn

type MockHandler_UseReconciler_Call

type MockHandler_UseReconciler_Call struct {
	*mock.Call
}

MockHandler_UseReconciler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UseReconciler'

func (*MockHandler_UseReconciler_Call) Return

func (*MockHandler_UseReconciler_Call) Run

func (*MockHandler_UseReconciler_Call) RunAndReturn

type MockQueue

type MockQueue struct {
	mock.Mock
}

MockQueue is an autogenerated mock type for the Queue type

func NewMockQueue

func NewMockQueue(t interface {
	mock.TestingT
	Cleanup(func())
},
) *MockQueue

NewMockQueue creates a new instance of MockQueue. 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 (*MockQueue) Add

func (_m *MockQueue) Add(_a0 Input) error

Add provides a mock function with given fields: _a0

func (*MockQueue) Close

func (_m *MockQueue) Close()

Close provides a mock function with given fields:

func (*MockQueue) EXPECT

func (_m *MockQueue) EXPECT() *MockQueue_Expecter

type MockQueue_Add_Call

type MockQueue_Add_Call struct {
	*mock.Call
}

MockQueue_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'

func (*MockQueue_Add_Call) Return

func (_c *MockQueue_Add_Call) Return(_a0 error) *MockQueue_Add_Call

func (*MockQueue_Add_Call) Run

func (_c *MockQueue_Add_Call) Run(run func(_a0 Input)) *MockQueue_Add_Call

func (*MockQueue_Add_Call) RunAndReturn

func (_c *MockQueue_Add_Call) RunAndReturn(run func(Input) error) *MockQueue_Add_Call

type MockQueue_Close_Call

type MockQueue_Close_Call struct {
	*mock.Call
}

MockQueue_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'

func (*MockQueue_Close_Call) Return

func (*MockQueue_Close_Call) Run

func (_c *MockQueue_Close_Call) Run(run func()) *MockQueue_Close_Call

func (*MockQueue_Close_Call) RunAndReturn

func (_c *MockQueue_Close_Call) RunAndReturn(run func()) *MockQueue_Close_Call

type MockQueue_Expecter

type MockQueue_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockQueue_Expecter) Add

func (_e *MockQueue_Expecter) Add(_a0 interface{}) *MockQueue_Add_Call

Add is a helper method to define mock.On call

  • _a0 Input

func (*MockQueue_Expecter) Close

Close is a helper method to define mock.On call

type Queue

type Queue interface {
	Add(Input) error
	Close()
}

func NewQueue

func NewQueue() (Queue, <-chan Input)

type ReconcilerWithRunOrder

type ReconcilerWithRunOrder struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL