domain

package
v0.0.0-...-d3e8332 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Domain

type Domain struct {
	Storage      ports.PersistentStoragePort
	QueryIn      ports.IncomingQueryPort
	EventIn      ports.IncomingEventPort
	SessionSetup ports.SessionSetupPort
	// contains filtered or unexported fields
}

Domain is the base struct for the domain service

func (*Domain) Init

func (d *Domain) Init(config *types.Config)

Init initializes all the specified adapters

func (*Domain) Start

func (d *Domain) Start(ctx context.Context) error

Start will start the domain object, and in turn start all the async adapters

type EventHandlers

type EventHandlers struct {
	Storage      ports.PersistentStoragePort
	SessionSetup ports.SessionSetupPort
	TimeSrc      func() time.Time
	IDGenerator  func() cacao_common.ID
}

EventHandlers implements IncomingEventHandlers

func (*EventHandlers) Create

Create creates an interactive session

func (*EventHandlers) Deactivate

Deactivate deactivates an interactive session

type QueryHandlers

type QueryHandlers struct {
	Storage      ports.PersistentStoragePort
	SessionSetup ports.SessionSetupPort
}

QueryHandlers implements IncomingQueryPort

func (*QueryHandlers) CheckPrerequisites

func (h *QueryHandlers) CheckPrerequisites(protocol cacao_common_service.InteractiveSessionProtocol, instanceAddress string, instanceAdminUsername string) (bool, error)

CheckPrerequisites checks if prerequisites for the interactive session are met

func (*QueryHandlers) Get

func (h *QueryHandlers) Get(actor string, emulator string, interactiveSessionID cacao_common.ID) (types.InteractiveSession, error)

Get retrieves the interactive session

func (*QueryHandlers) GetByInstanceAddress

func (h *QueryHandlers) GetByInstanceAddress(actor string, emulator string, instanceAddress string) (types.InteractiveSession, error)

GetByInstanceAddress retrieves the interactive session by Instance Address

func (*QueryHandlers) GetByInstanceID

func (h *QueryHandlers) GetByInstanceID(actor string, emulator string, instanceID string) (types.InteractiveSession, error)

GetByInstanceID retrieves the interactive session by InstanceID

func (*QueryHandlers) List

func (h *QueryHandlers) List(actor string, emulator string) ([]types.InteractiveSession, error)

List retrieves active/creating interactive sessions of the user

Jump to

Keyboard shortcuts

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