ports

package
v0.0.0-...-e080771 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IncomingEventHandlers

IncomingEventHandlers represents the handlers for all event operations this service supports, this is implemented by object in `domain` package

type IncomingEventPort

type IncomingEventPort interface {
	Start(ctx context.Context, wg *sync.WaitGroup) error
	SetHandlers(handlers IncomingEventHandlers)
}

IncomingEventPort is an interface for an event port.

type IncomingQueryHandlers

IncomingQueryHandlers represents the handlers for all query operation this service supports, this is implemented by object in `domain` package

type IncomingQueryPort

type IncomingQueryPort interface {
	Start(ctx context.Context, wg *sync.WaitGroup) error
	SetHandlers(handlers IncomingQueryHandlers)
}

IncomingQueryPort is an interface for a query port.

type OutgoingEventPort

type OutgoingEventPort interface {
	WorkspaceCreatedEvent(cacao_common_service.WorkspaceModel)
	WorkspaceCreateFailedEvent(cacao_common_service.WorkspaceModel)
	WorkspaceUpdatedEvent(cacao_common_service.WorkspaceModel)
	WorkspaceUpdateFailedEvent(cacao_common_service.WorkspaceModel)
	WorkspaceDeletedEvent(cacao_common_service.WorkspaceModel)
	WorkspaceDeleteFailedEvent(cacao_common_service.WorkspaceModel)
}

OutgoingEventPort represents all events this service will publish, implementation of IncomingEventPort will construct this and pass to methods of IncomingEventHandlers.

type PersistentStoragePort

type PersistentStoragePort interface {
	Init(config *types.Config) error
	List(ctx context.Context, user string) ([]types.Workspace, error)
	Get(ctx context.Context, user string, workspaceID cacao_common.ID) (types.Workspace, error)
	Create(ctx context.Context, workspace types.Workspace) error
	Update(ctx context.Context, workspace types.Workspace, updateFieldNames []string) error
	Delete(ctx context.Context, user string, workspaceID cacao_common.ID) error
}

PersistentStoragePort is an interface for Persistent Storage.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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