Documentation ¶
Index ¶
- Constants
- type GetFileHandler
- type GetFileQuery
- type GetHandler
- type GetQuery
- type GetVersionHandler
- type GetVersionQuery
- type ListFilesHandler
- type ListFilesQuery
- type ListHandler
- type ListQuery
- type ListVersionsHandler
- type ListVersionsQuery
- type ListWorkflowFilesFilter
- type ListWorkflowVersionsFilter
- type ListWorkflowsFilter
- type Queries
- type ReadModel
- type Workflow
- type WorkflowFile
- type WorkflowFileInfo
- type WorkflowParam
- type WorkflowVersion
Constants ¶
View Source
const ( OrderByName = "name" OrderByCreateTime = "createdAt" )
View Source
const ( FileOrderByVersion = "version" FileOrderByPath = "path" )
View Source
const ( VersionOrderByStatus = "status" VersionOrderByLanguage = "language" VersionOrderBySource = "source" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetFileHandler ¶
type GetFileHandler interface {
Handle(context.Context, *GetFileQuery) (*WorkflowFile, error)
}
func NewGetFileHandler ¶
func NewGetFileHandler(readModel ReadModel, workspaceReadModel workspace.WorkspaceReadModel) GetFileHandler
type GetFileQuery ¶
type GetHandler ¶
func NewGetHandler ¶
func NewGetHandler(readModel ReadModel, workspaceReadModel workspace.WorkspaceReadModel) GetHandler
type GetVersionHandler ¶
type GetVersionHandler interface {
Handle(context.Context, *GetVersionQuery) (*WorkflowVersion, error)
}
func NewGetVersionHandler ¶
func NewGetVersionHandler(readModel ReadModel, workspaceReadModel workspace.WorkspaceReadModel) GetVersionHandler
type GetVersionQuery ¶
type ListFilesHandler ¶
type ListFilesHandler interface {
Handle(context.Context, *ListFilesQuery) ([]*WorkflowFile, int, error)
}
func NewListFilesHandler ¶
func NewListFilesHandler(readModel ReadModel, workspaceReadModel workspace.WorkspaceReadModel) ListFilesHandler
type ListFilesQuery ¶
type ListFilesQuery struct { Pg *utils.Pagination `json:"pg"` Filter *ListWorkflowFilesFilter `json:"filter"` WorkspaceID string `json:"workspaceID"` WorkflowID string `json:"workflowID"` WorkflowVersionID string `json:"workflowVersionID,omitempty"` }
type ListHandler ¶
func NewListHandler ¶
func NewListHandler(readModel ReadModel, workspaceReadModel workspace.WorkspaceReadModel) ListHandler
type ListQuery ¶
type ListQuery struct { Pg *utils.Pagination Filter *ListWorkflowsFilter WorkspaceID string }
type ListVersionsHandler ¶
type ListVersionsHandler interface {
Handle(context.Context, *ListVersionsQuery) ([]*WorkflowVersion, int, error)
}
func NewListVersionsHandler ¶
func NewListVersionsHandler(readModel ReadModel, workspaceReadModel workspace.WorkspaceReadModel) ListVersionsHandler
NewListVersionsHandler new a ListVersionsHandler
type ListVersionsQuery ¶
type ListVersionsQuery struct { Pg *utils.Pagination `json:"pg"` WorkflowID string `json:"workflowID"` WorkspaceID string `json:"workspaceID"` Filter *ListWorkflowVersionsFilter `json:"filter"` }
type ListWorkflowFilesFilter ¶
type ListWorkflowFilesFilter struct {
IDs []string
}
type ListWorkflowVersionsFilter ¶
type ListWorkflowVersionsFilter struct {
IDs []string
}
type ListWorkflowsFilter ¶
type Queries ¶
type Queries struct { GetByID GetHandler GetFile GetFileHandler GetVersion GetVersionHandler ListWorkflows ListHandler ListFiles ListFilesHandler ListVersions ListVersionsHandler }
func NewQueries ¶
func NewQueries(readModel ReadModel, workspaceReadModel workspace.WorkspaceReadModel) *Queries
type ReadModel ¶
type ReadModel interface { GetById(ctx context.Context, workspaceID, id string) (*Workflow, error) GetByName(ctx context.Context, workspaceID, name string) (*Workflow, error) List(ctx context.Context, workspaceID string, pg *utils.Pagination, filter *ListWorkflowsFilter) ([]*Workflow, int, error) GetVersion(ctx context.Context, id string) (*WorkflowVersion, error) ListVersions(ctx context.Context, workflowID string, pg *utils.Pagination, filter *ListWorkflowVersionsFilter) ([]*WorkflowVersion, int, error) GetFile(ctx context.Context, id string) (*WorkflowFile, error) ListFiles(ctx context.Context, workflowVersionID string, pg *utils.Pagination, filter *ListWorkflowFilesFilter) ([]*WorkflowFile, int, error) }
ReadModel workflow read model
type WorkflowFile ¶
type WorkflowFile struct { ID string `json:"id"` WorkflowVersionID string `json:"workflowVersionID"` Path string `json:"path"` Content string `json:"content"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
func (*WorkflowFile) ToWorkflowFileInfo ¶
func (f *WorkflowFile) ToWorkflowFileInfo() *WorkflowFileInfo
type WorkflowFileInfo ¶
type WorkflowParam ¶
type WorkflowVersion ¶
type WorkflowVersion struct { ID string `json:"id"` Status string `json:"status"` Message string `json:"message"` Language string `json:"language"` LanguageVersion string `json:"languageVersion"` MainWorkflowPath string `json:"mainWorkflowPath"` Inputs []WorkflowParam `json:"inputs,omitempty"` Outputs []WorkflowParam `json:"outputs,omitempty"` Graph string `json:"graph,omitempty"` Source string `json:"source"` Files []*WorkflowFileInfo `json:"files"` Metadata map[string]string `json:"metadata,omitempty"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
Click to show internal directories.
Click to hide internal directories.