Documentation ¶
Index ¶
- type Domain
- type EventPortImpl
- func (d *EventPortImpl) TemplateCustomFieldTypeCreateRequestedEvent(createRequest cacao_common_service.TemplateCustomFieldTypeModel, ...) error
- func (d *EventPortImpl) TemplateCustomFieldTypeDeleteRequestedEvent(deleteRequest cacao_common_service.TemplateCustomFieldTypeModel, ...) error
- func (d *EventPortImpl) TemplateCustomFieldTypeUpdateRequestedEvent(updateRequest cacao_common_service.TemplateCustomFieldTypeModel, ...) error
- func (d *EventPortImpl) TemplateDeleteRequestedEvent(deleteRequest cacao_common_service.TemplateModel, sink ports.OutgoingEventPort) error
- func (d *EventPortImpl) TemplateDisableVersionEvent(request cacao_common_service.TemplateVersionDisableRequest, ...) error
- func (d *EventPortImpl) TemplateImportRequestedEvent(importRequest cacao_common_service.TemplateModel, sink ports.OutgoingEventPort) error
- func (d *EventPortImpl) TemplateSyncRequestedEvent(syncRequest cacao_common_service.TemplateModel, sink ports.OutgoingEventPort) error
- func (d *EventPortImpl) TemplateTypeCreateRequestedEvent(createRequest cacao_common_service.TemplateTypeModel, ...) error
- func (d *EventPortImpl) TemplateTypeDeleteRequestedEvent(deleteRequest cacao_common_service.TemplateTypeModel, ...) error
- func (d *EventPortImpl) TemplateTypeUpdateRequestedEvent(updateRequest cacao_common_service.TemplateTypeModel, ...) error
- func (d *EventPortImpl) TemplateUpdateRequestedEvent(updateRequest cacao_common_service.TemplateModel, sink ports.OutgoingEventPort) error
- type QueryPortImpl
- func (d *QueryPortImpl) Get(request cacao_common_service.TemplateModel) cacao_common_service.TemplateModel
- func (d *QueryPortImpl) GetCustomFieldType(request cacao_common_service.TemplateCustomFieldTypeModel) cacao_common_service.TemplateCustomFieldTypeModel
- func (d *QueryPortImpl) GetTemplateVersion(request cacao_common_service.TemplateVersionModel) cacao_common_service.TemplateVersionModel
- func (d *QueryPortImpl) GetType(request cacao_common_service.TemplateTypeModel) cacao_common_service.TemplateTypeModel
- func (d *QueryPortImpl) List(request cacao_common_service.TemplateModel) cacao_common_service.TemplateListModel
- func (d *QueryPortImpl) ListCustomFieldTypes(request cacao_common_service.TemplateCustomFieldTypeModel) cacao_common_service.TemplateCustomFieldTypeListModel
- func (d *QueryPortImpl) ListSourceTypes(request cacao_common_service.Session) cacao_common_service.TemplateSourceTypeListModel
- func (d *QueryPortImpl) ListTemplateVersions(request cacao_common_service.TemplateVersionModel) cacao_common_service.TemplateVersionListModel
- func (d *QueryPortImpl) ListTypes(request cacao_common_service.TemplateTypeModel) cacao_common_service.TemplateTypeListModel
- func (d *QueryPortImpl) ListTypesForProviderType(request cacao_common_service.TemplateTypeModel) cacao_common_service.TemplateTypeListModel
- func (d *QueryPortImpl) QueryCustomFieldType(request cacao_common_service.TemplateCustomFieldTypeModel) cacao_common_service.TemplateCustomFieldTypeQueryResultModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Domain ¶
type Domain struct { Storage ports.PersistentStoragePort TemplateSource ports.TemplateSourcePort TemplateCustomFieldTypeQuery ports.TemplateCustomFieldTypeQueryPort Credential ports.CredentialPort QueryIn ports.IncomingQueryPort EventIn ports.IncomingEventPort // contains filtered or unexported fields }
Domain is the base struct for the domain service
func (*Domain) NewEventHandlers ¶
func (d *Domain) NewEventHandlers() ports.IncomingEventHandlers
NewEventHandlers ...
func (*Domain) NewQueryHandlers ¶
func (d *Domain) NewQueryHandlers() ports.IncomingQueryHandlers
NewQueryHandlers ...
type EventPortImpl ¶
type EventPortImpl struct { Storage ports.PersistentStoragePort TemplateSource ports.TemplateSourcePort Credential ports.CredentialPort TimeSrc ports.TimeSrc IDGenerator func() common.ID VersionIDGenerator func() common.ID }
EventPortImpl implements IncomingEventPort
func (*EventPortImpl) TemplateCustomFieldTypeCreateRequestedEvent ¶
func (d *EventPortImpl) TemplateCustomFieldTypeCreateRequestedEvent(createRequest cacao_common_service.TemplateCustomFieldTypeModel, sink ports.OutgoingEventPort) error
TemplateCustomFieldTypeCreateRequestedEvent creates a template custom field type
func (*EventPortImpl) TemplateCustomFieldTypeDeleteRequestedEvent ¶
func (d *EventPortImpl) TemplateCustomFieldTypeDeleteRequestedEvent(deleteRequest cacao_common_service.TemplateCustomFieldTypeModel, sink ports.OutgoingEventPort) error
TemplateCustomFieldTypeDeleteRequestedEvent deletes the template custom field type
func (*EventPortImpl) TemplateCustomFieldTypeUpdateRequestedEvent ¶
func (d *EventPortImpl) TemplateCustomFieldTypeUpdateRequestedEvent(updateRequest cacao_common_service.TemplateCustomFieldTypeModel, sink ports.OutgoingEventPort) error
TemplateCustomFieldTypeUpdateRequestedEvent updates the template custom field type
func (*EventPortImpl) TemplateDeleteRequestedEvent ¶
func (d *EventPortImpl) TemplateDeleteRequestedEvent(deleteRequest cacao_common_service.TemplateModel, sink ports.OutgoingEventPort) error
TemplateDeleteRequestedEvent deletes the template
func (*EventPortImpl) TemplateDisableVersionEvent ¶
func (d *EventPortImpl) TemplateDisableVersionEvent(request cacao_common_service.TemplateVersionDisableRequest, sink ports.OutgoingEventPort) error
TemplateDisableVersionEvent marks a version as disabled.
func (*EventPortImpl) TemplateImportRequestedEvent ¶
func (d *EventPortImpl) TemplateImportRequestedEvent(importRequest cacao_common_service.TemplateModel, sink ports.OutgoingEventPort) error
TemplateImportRequestedEvent imports a template
func (*EventPortImpl) TemplateSyncRequestedEvent ¶
func (d *EventPortImpl) TemplateSyncRequestedEvent(syncRequest cacao_common_service.TemplateModel, sink ports.OutgoingEventPort) error
TemplateSyncRequestedEvent syncs the template
- Check template existence & permission
- Import from source (git)
- Compare with latest version of the template in DB,
- If same version, emit Sync success event
- If not same version, create new version in DB, update LatestVersionID of the template object in DB, then emit sync success event
func (*EventPortImpl) TemplateTypeCreateRequestedEvent ¶
func (d *EventPortImpl) TemplateTypeCreateRequestedEvent(createRequest cacao_common_service.TemplateTypeModel, sink ports.OutgoingEventPort) error
TemplateTypeCreateRequestedEvent creates a template type
func (*EventPortImpl) TemplateTypeDeleteRequestedEvent ¶
func (d *EventPortImpl) TemplateTypeDeleteRequestedEvent(deleteRequest cacao_common_service.TemplateTypeModel, sink ports.OutgoingEventPort) error
TemplateTypeDeleteRequestedEvent deletes the template type
func (*EventPortImpl) TemplateTypeUpdateRequestedEvent ¶
func (d *EventPortImpl) TemplateTypeUpdateRequestedEvent(updateRequest cacao_common_service.TemplateTypeModel, sink ports.OutgoingEventPort) error
TemplateTypeUpdateRequestedEvent updates the template type
func (*EventPortImpl) TemplateUpdateRequestedEvent ¶
func (d *EventPortImpl) TemplateUpdateRequestedEvent(updateRequest cacao_common_service.TemplateModel, sink ports.OutgoingEventPort) error
TemplateUpdateRequestedEvent updates the template
type QueryPortImpl ¶
type QueryPortImpl struct { Storage ports.PersistentStoragePort TemplateCustomFieldTypeQuery ports.TemplateCustomFieldTypeQueryPort }
QueryPortImpl implements IncomingQueryPort
func (*QueryPortImpl) Get ¶
func (d *QueryPortImpl) Get(request cacao_common_service.TemplateModel) cacao_common_service.TemplateModel
Get retrieves the template
func (*QueryPortImpl) GetCustomFieldType ¶
func (d *QueryPortImpl) GetCustomFieldType(request cacao_common_service.TemplateCustomFieldTypeModel) cacao_common_service.TemplateCustomFieldTypeModel
GetCustomFieldType retrieves the template custom field type
func (*QueryPortImpl) GetTemplateVersion ¶
func (d *QueryPortImpl) GetTemplateVersion(request cacao_common_service.TemplateVersionModel) cacao_common_service.TemplateVersionModel
GetTemplateVersion ...
func (*QueryPortImpl) GetType ¶
func (d *QueryPortImpl) GetType(request cacao_common_service.TemplateTypeModel) cacao_common_service.TemplateTypeModel
GetType retrieves the template type
func (*QueryPortImpl) List ¶
func (d *QueryPortImpl) List(request cacao_common_service.TemplateModel) cacao_common_service.TemplateListModel
List retrieves all templates of the user
func (*QueryPortImpl) ListCustomFieldTypes ¶
func (d *QueryPortImpl) ListCustomFieldTypes(request cacao_common_service.TemplateCustomFieldTypeModel) cacao_common_service.TemplateCustomFieldTypeListModel
ListCustomFieldTypes retrieves all template custom field types of the user
func (*QueryPortImpl) ListSourceTypes ¶
func (d *QueryPortImpl) ListSourceTypes(request cacao_common_service.Session) cacao_common_service.TemplateSourceTypeListModel
ListSourceTypes retrieves all template source types
func (*QueryPortImpl) ListTemplateVersions ¶
func (d *QueryPortImpl) ListTemplateVersions(request cacao_common_service.TemplateVersionModel) cacao_common_service.TemplateVersionListModel
ListTemplateVersions lists all versions for a template (specified by template ID). TODO consider pagination/streaming of results.
func (*QueryPortImpl) ListTypes ¶
func (d *QueryPortImpl) ListTypes(request cacao_common_service.TemplateTypeModel) cacao_common_service.TemplateTypeListModel
ListTypes retrieves all template types
func (*QueryPortImpl) ListTypesForProviderType ¶
func (d *QueryPortImpl) ListTypesForProviderType(request cacao_common_service.TemplateTypeModel) cacao_common_service.TemplateTypeListModel
ListTypesForProviderType retrieves all template types for the given provider type
func (*QueryPortImpl) QueryCustomFieldType ¶
func (d *QueryPortImpl) QueryCustomFieldType(request cacao_common_service.TemplateCustomFieldTypeModel) cacao_common_service.TemplateCustomFieldTypeQueryResultModel
QueryCustomFieldType retrieves the template custom field type and query to the target