Versions in this module Expand all Collapse all v1 v1.0.0 May 31, 2023 Changes in this version + const CommandExecuteTimeout + const ImportWorkflows + const Language + const VersionRegexpStr + const WorkflowCreated + const WorkflowDeleted + const WorkflowGitTag + const WorkflowGitToken + const WorkflowGitURL + const WorkflowSourceFile + const WorkflowSourceGit + const WorkflowVersionAdded + const WorkflowVersionFailedStatus + const WorkflowVersionPendingStatus + const WorkflowVersionSuccessStatus + type Factory struct + func NewFactory(_ context.Context) *Factory + func (f *Factory) NewWorkflow(workspaceID string, param *WorkflowOption) (*Workflow, error) + type FileParam struct + Content string + Path string + type ImportWorkflowsEvent struct + ImportFileBaseDir string + Schemas []schema.WorkflowTypedSchema + WorkspaceID string + func NewImportWorkflowsEvent(workspaceID, baseDir string, schemas []schema.WorkflowTypedSchema) *ImportWorkflowsEvent + func NewImportWorkflowsEventFromPayload(data []byte) (*ImportWorkflowsEvent, error) + func (e *ImportWorkflowsEvent) Delay() time.Duration + func (e *ImportWorkflowsEvent) EventType() string + func (e *ImportWorkflowsEvent) Payload() []byte + type ImportWorkflowsHandler struct + func NewImportWorkflowsHandler(repo Repository, readModel workflow.ReadModel, bus eventbus.EventBus, ...) *ImportWorkflowsHandler + func (h *ImportWorkflowsHandler) Handle(ctx context.Context, event *ImportWorkflowsEvent) error + type Param struct + CreateTime time.Time + DeletedAt time.Time + Description string + ID string + LatestVersion string + Name string + UpdateTime time.Time + WorkspaceID string + type Repository interface + Delete func(context.Context, *Workflow) error + Get func(context.Context, string, string) (*Workflow, error) + List func(ctx context.Context, workspaceID string) ([]string, error) + Save func(context.Context, *Workflow) error + type Service interface + AddVersion func(ctx context.Context, workspaceID string, workflowOption *WorkflowOption, ...) (string, *WorkflowVersion, error) + Create func(ctx context.Context, workspaceID string, workflowOption *WorkflowOption) (string, error) + Delete func(ctx context.Context, workspaceID string, workflowID string) error + Update func(ctx context.Context, workspaceID string, workflowID string, ...) error + UpdateVersion func(ctx context.Context, workspaceID string, workflowOption *WorkflowOption, ...) error + func NewService(repo Repository, readModel workflow.ReadModel, bus eventbus.EventBus, ...) Service + type VersionOption struct + Language string + MainWorkflowPath string + Source string + Tag string + Token string + Url string + type VersionUpdateOption struct + Language *string + MainWorkflowPath *string + Source *string + Tag *string + Token *string + URL *string + type Workflow struct + CreatedAt time.Time + Description string + ID string + LatestVersion string + Name string + UpdatedAt time.Time + Versions map[string]*WorkflowVersion + WorkspaceID string + func (w *Workflow) AddVersion(param *VersionOption) (*WorkflowVersion, error) + func (w *Workflow) UpdateDescription(description string) + func (w *Workflow) UpdateName(name string) + type WorkflowEvent struct + Event string + WorkflowID string + WorkspaceID string + func NewWorkflowCreatedEvent(workspaceID, workflowID string) *WorkflowEvent + func NewWorkflowDeletedEvent(workspaceID, workflowID string) *WorkflowEvent + func NewWorkflowEventFromPayload(data []byte) (*WorkflowEvent, error) + func (e *WorkflowEvent) Delay() time.Duration + func (e *WorkflowEvent) EventType() string + func (e *WorkflowEvent) Payload() []byte + type WorkflowFile struct + Content string + CreatedAt time.Time + ID string + Path string + UpdatedAt time.Time + type WorkflowOption struct + Description *string + ID string + Name string + func (p *WorkflowOption) Validate() error + type WorkflowParam struct + Default string + Name string + Optional bool + Type string + type WorkflowVersion struct + CreatedAt time.Time + Files map[string]*WorkflowFile + Graph string + ID string + Inputs []WorkflowParam + Language string + LanguageVersion string + MainWorkflowPath string + Message string + Metadata map[string]string + Outputs []WorkflowParam + Source string + Status string + UpdatedAt time.Time + func (v *WorkflowVersion) AddFile(param *FileParam) (*WorkflowFile, error) + type WorkflowVersionAddedEvent struct + FilesBaseDir string + GitRepo string + GitTag string + GitToken string + WorkflowID string + WorkflowVersionID string + WorkspaceID string + func NewWorkflowVersionAddedEvent(workspaceID, workflowID, versionID, repo, tag, token, filesBaseDir string) *WorkflowVersionAddedEvent + func NewWorkflowVersionAddedEventFromPayload(data []byte) (*WorkflowVersionAddedEvent, error) + func (e *WorkflowVersionAddedEvent) Delay() time.Duration + func (e *WorkflowVersionAddedEvent) EventType() string + func (e *WorkflowVersionAddedEvent) Payload() []byte + type WorkflowVersionAddedHandler struct + func NewWorkflowVersionAddedHandler(repo Repository, womtoolPath string) *WorkflowVersionAddedHandler + func (h *WorkflowVersionAddedHandler) Handle(ctx context.Context, event *WorkflowVersionAddedEvent) (err error) + type WorkspaceDeletedHandler struct + func NewWorkspaceDeletedHandler(repo Repository) *WorkspaceDeletedHandler + func (h *WorkspaceDeletedHandler) Handle(ctx context.Context, event *workspace.WorkspaceEvent) (err error)