Documentation ¶
Index ¶
- type EventAdapter
- func (adapter *EventAdapter) CreateFailed(actor string, emulator string, workspace types.Workspace, creationError error, ...) error
- func (adapter *EventAdapter) Created(actor string, emulator string, workspace types.Workspace, ...) error
- func (adapter *EventAdapter) DeleteFailed(actor string, emulator string, workspace types.Workspace, deletionError error, ...) error
- func (adapter *EventAdapter) Deleted(actor string, emulator string, workspace types.Workspace, ...) error
- func (adapter *EventAdapter) SetHandlers(handlers ports.IncomingEventHandlers)
- func (adapter *EventAdapter) Start(ctx context.Context, wg *sync.WaitGroup) error
- func (adapter *EventAdapter) UpdateFailed(actor string, emulator string, workspace types.Workspace, updateError error, ...) error
- func (adapter *EventAdapter) Updated(actor string, emulator string, workspace types.Workspace, ...) error
- type MongoAdapter
- func (adapter *MongoAdapter) Close() error
- func (adapter *MongoAdapter) Create(ctx context.Context, workspace types.Workspace) error
- func (adapter *MongoAdapter) Delete(ctx context.Context, user string, workspaceID cacao_common.ID) error
- func (adapter *MongoAdapter) Get(ctx context.Context, user string, workspaceID cacao_common.ID) (types.Workspace, error)
- func (adapter *MongoAdapter) GetMock() *mock.Mock
- func (adapter *MongoAdapter) Init(config *types.Config) error
- func (adapter *MongoAdapter) List(ctx context.Context, user string) ([]types.Workspace, error)
- func (adapter *MongoAdapter) MockCreate(workspace types.Workspace, expectedError error) error
- func (adapter *MongoAdapter) MockDelete(user string, workspaceID cacao_common.ID, existingWorkspace types.Workspace, ...) error
- func (adapter *MongoAdapter) MockGet(user string, workspaceID cacao_common.ID, expectedWorkspace types.Workspace, ...) error
- func (adapter *MongoAdapter) MockList(user string, expectedWorkspaces []types.Workspace, expectedError error) error
- func (adapter *MongoAdapter) MockUpdate(existingWorkspace types.Workspace, newWorkspace types.Workspace, ...) error
- func (adapter *MongoAdapter) Update(ctx context.Context, workspace types.Workspace, updateFieldNames []string) error
- type QueryAdapter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventAdapter ¶
type EventAdapter struct {
// contains filtered or unexported fields
}
EventAdapter communicates to IncomingEventPort and implements OutgoingEventPort
func NewEventAdapter ¶
func NewEventAdapter(conn messaging2.EventConnection) *EventAdapter
NewEventAdapter creates a new EventAdapter from EventConnection
func (*EventAdapter) CreateFailed ¶
func (adapter *EventAdapter) CreateFailed(actor string, emulator string, workspace types.Workspace, creationError error, transactionID cacao_common.TransactionID) error
CreateFailed publishes cacao_common_service.WorkspaceCreateFailedEvent
func (*EventAdapter) Created ¶
func (adapter *EventAdapter) Created(actor string, emulator string, workspace types.Workspace, transactionID cacao_common.TransactionID) error
Created publishes cacao_common_service.WorkspaceCreatedEvent
func (*EventAdapter) DeleteFailed ¶
func (adapter *EventAdapter) DeleteFailed(actor string, emulator string, workspace types.Workspace, deletionError error, transactionID cacao_common.TransactionID) error
DeleteFailed publishes cacao_common_service.WorkspaceDeleteFailedEvent
func (*EventAdapter) Deleted ¶
func (adapter *EventAdapter) Deleted(actor string, emulator string, workspace types.Workspace, transactionID cacao_common.TransactionID) error
Deleted publishes cacao_common_service.WorkspaceDeletedEvent
func (*EventAdapter) SetHandlers ¶
func (adapter *EventAdapter) SetHandlers(handlers ports.IncomingEventHandlers)
SetHandlers ...
func (*EventAdapter) UpdateFailed ¶
func (adapter *EventAdapter) UpdateFailed(actor string, emulator string, workspace types.Workspace, updateError error, transactionID cacao_common.TransactionID) error
UpdateFailed publishes cacao_common_service.WorkspaceUpdateFailedEvent
func (*EventAdapter) Updated ¶
func (adapter *EventAdapter) Updated(actor string, emulator string, workspace types.Workspace, transactionID cacao_common.TransactionID) error
Updated publishes cacao_common_service.WorkspaceUpdatedEvent.
type MongoAdapter ¶
type MongoAdapter struct {
// contains filtered or unexported fields
}
MongoAdapter implements PersistentStoragePort
func (*MongoAdapter) Close ¶
func (adapter *MongoAdapter) Close() error
Close closes Mongo DB connection
func (*MongoAdapter) Delete ¶
func (adapter *MongoAdapter) Delete(ctx context.Context, user string, workspaceID cacao_common.ID) error
Delete deletes a workspace
func (*MongoAdapter) Get ¶
func (adapter *MongoAdapter) Get(ctx context.Context, user string, workspaceID cacao_common.ID) (types.Workspace, error)
Get returns the workspace with the ID
func (*MongoAdapter) GetMock ¶
func (adapter *MongoAdapter) GetMock() *mock.Mock
GetMock returns Mock
func (*MongoAdapter) Init ¶
func (adapter *MongoAdapter) Init(config *types.Config) error
Init initialize mongodb adapter
func (*MongoAdapter) MockCreate ¶
func (adapter *MongoAdapter) MockCreate(workspace types.Workspace, expectedError error) error
MockCreate sets expected results for Create
func (*MongoAdapter) MockDelete ¶
func (adapter *MongoAdapter) MockDelete(user string, workspaceID cacao_common.ID, existingWorkspace types.Workspace, expectedError error) error
MockDelete sets expected results for Delete
func (*MongoAdapter) MockGet ¶
func (adapter *MongoAdapter) MockGet(user string, workspaceID cacao_common.ID, expectedWorkspace types.Workspace, expectedError error) error
MockGet sets expected results for Get
func (*MongoAdapter) MockList ¶
func (adapter *MongoAdapter) MockList(user string, expectedWorkspaces []types.Workspace, expectedError error) error
MockList sets expected results for List
func (*MongoAdapter) MockUpdate ¶
func (adapter *MongoAdapter) MockUpdate(existingWorkspace types.Workspace, newWorkspace types.Workspace, expectedError error) error
MockUpdate sets expected results for Update
type QueryAdapter ¶
type QueryAdapter struct {
// contains filtered or unexported fields
}
QueryAdapter communicates to IncomingQueryPort
func NewQueryAdapter ¶
func NewQueryAdapter(queryConn messaging2.QueryConnection) *QueryAdapter
NewQueryAdapter ...
func (*QueryAdapter) SetHandlers ¶
func (adapter *QueryAdapter) SetHandlers(handlers ports.IncomingQueryHandlers)
SetHandlers ...