clientmanager

package
v0.4.77 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AuthCertificates      []tls.Certificate
	DefaultTemporalConfig *DefaultTemporalConfig
}

type DB

type DB interface {
	GetTemporalConfigByAccount(ctx context.Context, db db_queries.DBTX, accountId pgtype.UUID) (*pg_models.TemporalConfig, error)
}

type DefaultTemporalConfig

type DefaultTemporalConfig struct {
	Url              string
	Namespace        string
	SyncJobQueueName string
}

type MockDB

type MockDB struct {
	mock.Mock
}

MockDB is an autogenerated mock type for the DB type

func NewMockDB

func NewMockDB(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockDB

NewMockDB creates a new instance of MockDB. 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 (*MockDB) EXPECT

func (_m *MockDB) EXPECT() *MockDB_Expecter

func (*MockDB) GetTemporalConfigByAccount

func (_m *MockDB) GetTemporalConfigByAccount(ctx context.Context, db db_queries.DBTX, accountId pgtype.UUID) (*pg_models.TemporalConfig, error)

GetTemporalConfigByAccount provides a mock function with given fields: ctx, db, accountId

type MockDB_Expecter

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

func (*MockDB_Expecter) GetTemporalConfigByAccount

func (_e *MockDB_Expecter) GetTemporalConfigByAccount(ctx interface{}, db interface{}, accountId interface{}) *MockDB_GetTemporalConfigByAccount_Call

GetTemporalConfigByAccount is a helper method to define mock.On call

  • ctx context.Context
  • db db_queries.DBTX
  • accountId pgtype.UUID

type MockDB_GetTemporalConfigByAccount_Call

type MockDB_GetTemporalConfigByAccount_Call struct {
	*mock.Call
}

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

func (*MockDB_GetTemporalConfigByAccount_Call) Return

func (*MockDB_GetTemporalConfigByAccount_Call) Run

type MockTemporalClientManagerClient

type MockTemporalClientManagerClient struct {
	mock.Mock
}

MockTemporalClientManagerClient is an autogenerated mock type for the TemporalClientManagerClient type

func NewMockTemporalClientManagerClient

func NewMockTemporalClientManagerClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTemporalClientManagerClient

NewMockTemporalClientManagerClient creates a new instance of MockTemporalClientManagerClient. 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 (*MockTemporalClientManagerClient) ClearNamespaceClientByAccount

func (_m *MockTemporalClientManagerClient) ClearNamespaceClientByAccount(ctx context.Context, accountId string)

ClearNamespaceClientByAccount provides a mock function with given fields: ctx, accountId

func (*MockTemporalClientManagerClient) ClearWorkflowClientByAccount

func (_m *MockTemporalClientManagerClient) ClearWorkflowClientByAccount(ctx context.Context, accountId string)

ClearWorkflowClientByAccount provides a mock function with given fields: ctx, accountId

func (*MockTemporalClientManagerClient) DoesAccountHaveTemporalWorkspace

func (_m *MockTemporalClientManagerClient) DoesAccountHaveTemporalWorkspace(ctx context.Context, accountId string, logger *slog.Logger) (bool, error)

DoesAccountHaveTemporalWorkspace provides a mock function with given fields: ctx, accountId, logger

func (*MockTemporalClientManagerClient) EXPECT

func (*MockTemporalClientManagerClient) GetNamespaceClientByAccount

func (_m *MockTemporalClientManagerClient) GetNamespaceClientByAccount(ctx context.Context, accountId string, logger *slog.Logger) (client.NamespaceClient, error)

GetNamespaceClientByAccount provides a mock function with given fields: ctx, accountId, logger

func (*MockTemporalClientManagerClient) GetScheduleClientByAccount

func (_m *MockTemporalClientManagerClient) GetScheduleClientByAccount(ctx context.Context, accountId string, logger *slog.Logger) (client.ScheduleClient, error)

GetScheduleClientByAccount provides a mock function with given fields: ctx, accountId, logger

func (*MockTemporalClientManagerClient) GetScheduleHandleClientByAccount

func (_m *MockTemporalClientManagerClient) GetScheduleHandleClientByAccount(ctx context.Context, accountId string, scheduleId string, logger *slog.Logger) (client.ScheduleHandle, error)

GetScheduleHandleClientByAccount provides a mock function with given fields: ctx, accountId, scheduleId, logger

func (*MockTemporalClientManagerClient) GetTemporalConfigByAccount

func (_m *MockTemporalClientManagerClient) GetTemporalConfigByAccount(ctx context.Context, accountId string) (*pg_models.TemporalConfig, error)

GetTemporalConfigByAccount provides a mock function with given fields: ctx, accountId

func (*MockTemporalClientManagerClient) GetWorkflowClientByAccount

func (_m *MockTemporalClientManagerClient) GetWorkflowClientByAccount(ctx context.Context, accountId string, logger *slog.Logger) (client.Client, error)

GetWorkflowClientByAccount provides a mock function with given fields: ctx, accountId, logger

type MockTemporalClientManagerClient_ClearNamespaceClientByAccount_Call

type MockTemporalClientManagerClient_ClearNamespaceClientByAccount_Call struct {
	*mock.Call
}

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

func (*MockTemporalClientManagerClient_ClearNamespaceClientByAccount_Call) Return

func (*MockTemporalClientManagerClient_ClearNamespaceClientByAccount_Call) Run

func (*MockTemporalClientManagerClient_ClearNamespaceClientByAccount_Call) RunAndReturn

type MockTemporalClientManagerClient_ClearWorkflowClientByAccount_Call

type MockTemporalClientManagerClient_ClearWorkflowClientByAccount_Call struct {
	*mock.Call
}

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

func (*MockTemporalClientManagerClient_ClearWorkflowClientByAccount_Call) Return

func (*MockTemporalClientManagerClient_ClearWorkflowClientByAccount_Call) Run

func (*MockTemporalClientManagerClient_ClearWorkflowClientByAccount_Call) RunAndReturn

type MockTemporalClientManagerClient_DoesAccountHaveTemporalWorkspace_Call

type MockTemporalClientManagerClient_DoesAccountHaveTemporalWorkspace_Call struct {
	*mock.Call
}

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

func (*MockTemporalClientManagerClient_DoesAccountHaveTemporalWorkspace_Call) Return

func (*MockTemporalClientManagerClient_DoesAccountHaveTemporalWorkspace_Call) Run

func (*MockTemporalClientManagerClient_DoesAccountHaveTemporalWorkspace_Call) RunAndReturn

type MockTemporalClientManagerClient_Expecter

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

func (*MockTemporalClientManagerClient_Expecter) ClearNamespaceClientByAccount

func (_e *MockTemporalClientManagerClient_Expecter) ClearNamespaceClientByAccount(ctx interface{}, accountId interface{}) *MockTemporalClientManagerClient_ClearNamespaceClientByAccount_Call

ClearNamespaceClientByAccount is a helper method to define mock.On call

  • ctx context.Context
  • accountId string

func (*MockTemporalClientManagerClient_Expecter) ClearWorkflowClientByAccount

func (_e *MockTemporalClientManagerClient_Expecter) ClearWorkflowClientByAccount(ctx interface{}, accountId interface{}) *MockTemporalClientManagerClient_ClearWorkflowClientByAccount_Call

ClearWorkflowClientByAccount is a helper method to define mock.On call

  • ctx context.Context
  • accountId string

func (*MockTemporalClientManagerClient_Expecter) DoesAccountHaveTemporalWorkspace

func (_e *MockTemporalClientManagerClient_Expecter) DoesAccountHaveTemporalWorkspace(ctx interface{}, accountId interface{}, logger interface{}) *MockTemporalClientManagerClient_DoesAccountHaveTemporalWorkspace_Call

DoesAccountHaveTemporalWorkspace is a helper method to define mock.On call

  • ctx context.Context
  • accountId string
  • logger *slog.Logger

func (*MockTemporalClientManagerClient_Expecter) GetNamespaceClientByAccount

func (_e *MockTemporalClientManagerClient_Expecter) GetNamespaceClientByAccount(ctx interface{}, accountId interface{}, logger interface{}) *MockTemporalClientManagerClient_GetNamespaceClientByAccount_Call

GetNamespaceClientByAccount is a helper method to define mock.On call

  • ctx context.Context
  • accountId string
  • logger *slog.Logger

func (*MockTemporalClientManagerClient_Expecter) GetScheduleClientByAccount

func (_e *MockTemporalClientManagerClient_Expecter) GetScheduleClientByAccount(ctx interface{}, accountId interface{}, logger interface{}) *MockTemporalClientManagerClient_GetScheduleClientByAccount_Call

GetScheduleClientByAccount is a helper method to define mock.On call

  • ctx context.Context
  • accountId string
  • logger *slog.Logger

func (*MockTemporalClientManagerClient_Expecter) GetScheduleHandleClientByAccount

func (_e *MockTemporalClientManagerClient_Expecter) GetScheduleHandleClientByAccount(ctx interface{}, accountId interface{}, scheduleId interface{}, logger interface{}) *MockTemporalClientManagerClient_GetScheduleHandleClientByAccount_Call

GetScheduleHandleClientByAccount is a helper method to define mock.On call

  • ctx context.Context
  • accountId string
  • scheduleId string
  • logger *slog.Logger

func (*MockTemporalClientManagerClient_Expecter) GetTemporalConfigByAccount

func (_e *MockTemporalClientManagerClient_Expecter) GetTemporalConfigByAccount(ctx interface{}, accountId interface{}) *MockTemporalClientManagerClient_GetTemporalConfigByAccount_Call

GetTemporalConfigByAccount is a helper method to define mock.On call

  • ctx context.Context
  • accountId string

func (*MockTemporalClientManagerClient_Expecter) GetWorkflowClientByAccount

func (_e *MockTemporalClientManagerClient_Expecter) GetWorkflowClientByAccount(ctx interface{}, accountId interface{}, logger interface{}) *MockTemporalClientManagerClient_GetWorkflowClientByAccount_Call

GetWorkflowClientByAccount is a helper method to define mock.On call

  • ctx context.Context
  • accountId string
  • logger *slog.Logger

type MockTemporalClientManagerClient_GetNamespaceClientByAccount_Call

type MockTemporalClientManagerClient_GetNamespaceClientByAccount_Call struct {
	*mock.Call
}

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

func (*MockTemporalClientManagerClient_GetNamespaceClientByAccount_Call) Return

func (*MockTemporalClientManagerClient_GetNamespaceClientByAccount_Call) Run

type MockTemporalClientManagerClient_GetScheduleClientByAccount_Call

type MockTemporalClientManagerClient_GetScheduleClientByAccount_Call struct {
	*mock.Call
}

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

func (*MockTemporalClientManagerClient_GetScheduleClientByAccount_Call) Return

func (*MockTemporalClientManagerClient_GetScheduleClientByAccount_Call) Run

type MockTemporalClientManagerClient_GetScheduleHandleClientByAccount_Call

type MockTemporalClientManagerClient_GetScheduleHandleClientByAccount_Call struct {
	*mock.Call
}

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

func (*MockTemporalClientManagerClient_GetScheduleHandleClientByAccount_Call) Return

func (*MockTemporalClientManagerClient_GetScheduleHandleClientByAccount_Call) Run

type MockTemporalClientManagerClient_GetTemporalConfigByAccount_Call

type MockTemporalClientManagerClient_GetTemporalConfigByAccount_Call struct {
	*mock.Call
}

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

func (*MockTemporalClientManagerClient_GetTemporalConfigByAccount_Call) Return

func (*MockTemporalClientManagerClient_GetTemporalConfigByAccount_Call) Run

type MockTemporalClientManagerClient_GetWorkflowClientByAccount_Call

type MockTemporalClientManagerClient_GetWorkflowClientByAccount_Call struct {
	*mock.Call
}

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

func (*MockTemporalClientManagerClient_GetWorkflowClientByAccount_Call) Return

func (*MockTemporalClientManagerClient_GetWorkflowClientByAccount_Call) Run

func (*MockTemporalClientManagerClient_GetWorkflowClientByAccount_Call) RunAndReturn

type TemporalClientManager

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

func New

func New(
	config *Config,
	db DB,
	dbtx db_queries.DBTX,
) *TemporalClientManager

func (*TemporalClientManager) ClearNamespaceClientByAccount

func (t *TemporalClientManager) ClearNamespaceClientByAccount(
	ctx context.Context,
	accountId string,
)

func (*TemporalClientManager) ClearWorkflowClientByAccount

func (t *TemporalClientManager) ClearWorkflowClientByAccount(
	ctx context.Context,
	accountId string,
)

func (*TemporalClientManager) DoesAccountHaveTemporalWorkspace

func (t *TemporalClientManager) DoesAccountHaveTemporalWorkspace(
	ctx context.Context,
	accountId string,
	logger *slog.Logger,
) (bool, error)

func (*TemporalClientManager) GetNamespaceClientByAccount

func (t *TemporalClientManager) GetNamespaceClientByAccount(
	ctx context.Context,
	accountId string,
	logger *slog.Logger,
) (temporalclient.NamespaceClient, error)

func (*TemporalClientManager) GetScheduleClientByAccount

func (t *TemporalClientManager) GetScheduleClientByAccount(
	ctx context.Context,
	accountId string,
	logger *slog.Logger,
) (temporalclient.ScheduleClient, error)

func (*TemporalClientManager) GetScheduleHandleClientByAccount

func (t *TemporalClientManager) GetScheduleHandleClientByAccount(
	ctx context.Context,
	accountId string,
	scheduleId string,
	logger *slog.Logger,
) (temporalclient.ScheduleHandle, error)

func (*TemporalClientManager) GetTemporalConfigByAccount

func (t *TemporalClientManager) GetTemporalConfigByAccount(
	ctx context.Context,
	accountId string,
) (*pg_models.TemporalConfig, error)

func (*TemporalClientManager) GetWorkflowClientByAccount

func (t *TemporalClientManager) GetWorkflowClientByAccount(
	ctx context.Context,
	accountId string,
	logger *slog.Logger,
) (temporalclient.Client, error)

type TemporalClientManagerClient

type TemporalClientManagerClient interface {
	ClearNamespaceClientByAccount(ctx context.Context, accountId string)
	ClearWorkflowClientByAccount(ctx context.Context, accountId string)
	GetNamespaceClientByAccount(ctx context.Context, accountId string, logger *slog.Logger) (temporalclient.NamespaceClient, error)
	GetWorkflowClientByAccount(ctx context.Context, accountId string, logger *slog.Logger) (temporalclient.Client, error)
	GetScheduleClientByAccount(ctx context.Context, accountId string, logger *slog.Logger) (temporalclient.ScheduleClient, error)
	GetScheduleHandleClientByAccount(ctx context.Context, accountId string, scheduleId string, logger *slog.Logger) (temporalclient.ScheduleHandle, error)
	GetTemporalConfigByAccount(ctx context.Context, accountId string) (*pg_models.TemporalConfig, error)
	DoesAccountHaveTemporalWorkspace(
		ctx context.Context,
		accountId string,
		logger *slog.Logger,
	) (bool, error)
}

Jump to

Keyboard shortcuts

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