Documentation ¶
Index ¶
- Constants
- type CancelHandler
- type CascadeDeleteHandler
- type CascadeDeleteSubmissionEvent
- type CreateEvent
- type CreateHandler
- type CreateSubmissionParam
- type DeleteHandler
- type EventCreateRuns
- type EventRun
- type EventSubmission
- func NewCancelSubmissionEvent(submissionID string, duration time.Duration) *EventSubmission
- func NewDeleteSubmissionEvent(submissionID string, duration time.Duration) *EventSubmission
- func NewEventFromPayload(data []byte) (*EventSubmission, error)
- func NewSyncSubmissionEvent(submissionID string) *EventSubmission
- type EventSubmitRun
- type ExposedOptions
- type Factory
- type Repository
- type RunConfig
- type Service
- type Submission
- type SyncHandler
Constants ¶
View Source
const ( CreateSubmission = "CreateSubmission" CancelSubmission = "CancelSubmission" DeleteSubmission = "DeleteSubmission" CascadeDeleteSubmission = "CascadeDeleteSubmission" SyncSubmission = "SyncSubmission" CreateRuns = "CreateRuns" SubmitRun = "SubmitRun" SyncRun = "SyncRun" CancelRun = "CancelRun" DeleteRun = "DeleteRun" )
View Source
const WESTag = "wes"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelHandler ¶
type CancelHandler struct {
// contains filtered or unexported fields
}
func NewCancelHandler ¶
func NewCancelHandler(repository Repository, eventbus eventbus.EventBus, runReadModel run.ReadModel) *CancelHandler
func (*CancelHandler) Handle ¶
func (h *CancelHandler) Handle(ctx context.Context, event *EventSubmission) (err error)
type CascadeDeleteHandler ¶
type CascadeDeleteHandler struct {
// contains filtered or unexported fields
}
func NewCascadeDeleteHandler ¶
func NewCascadeDeleteHandler(repository Repository, eventbus eventbus.EventBus, submissionReadModel submissionquery.ReadModel) *CascadeDeleteHandler
func (*CascadeDeleteHandler) Handle ¶
func (h *CascadeDeleteHandler) Handle(ctx context.Context, event *CascadeDeleteSubmissionEvent) (err error)
type CascadeDeleteSubmissionEvent ¶
func NewEventCascadeDeleteSubmission ¶
func NewEventCascadeDeleteSubmission(workspaceID string, workflow *string) *CascadeDeleteSubmissionEvent
func NewEventCascadeDeleteSubmissionFromPayload ¶
func NewEventCascadeDeleteSubmissionFromPayload(data []byte) (*CascadeDeleteSubmissionEvent, error)
func (*CascadeDeleteSubmissionEvent) Delay ¶
func (e *CascadeDeleteSubmissionEvent) Delay() time.Duration
func (*CascadeDeleteSubmissionEvent) EventType ¶
func (e *CascadeDeleteSubmissionEvent) EventType() string
func (*CascadeDeleteSubmissionEvent) Payload ¶
func (e *CascadeDeleteSubmissionEvent) Payload() []byte
type CreateEvent ¶
type CreateEvent struct { WorkspaceID string SubmissionID string SourceWorkflowID string SourceWorkflowVersionID string SourceDataModelID *string SourceDataModelRowIDs []string }
func NewCreateEvent ¶
func NewCreateEvent(workspaceID, submissionID, workflowID, workflowVersionID string, sourceDataModelID *string, sourceDataModelRowIDs []string) *CreateEvent
func NewCreateEventFromPayload ¶
func NewCreateEventFromPayload(data []byte) (*CreateEvent, error)
func (*CreateEvent) Delay ¶
func (e *CreateEvent) Delay() time.Duration
func (*CreateEvent) EventType ¶
func (e *CreateEvent) EventType() string
func (*CreateEvent) Payload ¶
func (e *CreateEvent) Payload() []byte
type CreateHandler ¶
type CreateHandler struct {
// contains filtered or unexported fields
}
func NewCreateHandler ¶
func NewCreateHandler(repository Repository, eventbus eventbus.EventBus, workflowClient grpc.WorkflowClient) *CreateHandler
func (*CreateHandler) Handle ¶
func (h *CreateHandler) Handle(ctx context.Context, event *CreateEvent) (err error)
type CreateSubmissionParam ¶
type CreateSubmissionParam struct { Name string Description *string WorkflowID string WorkflowVersionID string WorkspaceID string DataModelID *string DataModelRowIDs []string Type string Inputs map[string]interface{} Outputs map[string]interface{} ExposedOptions ExposedOptions }
CreateSubmissionParam use to create Submission
type DeleteHandler ¶
type DeleteHandler struct {
// contains filtered or unexported fields
}
func NewDeleteHandler ¶
func NewDeleteHandler(repository Repository, eventbus eventbus.EventBus, runReadModel run.ReadModel) *DeleteHandler
func (*DeleteHandler) Handle ¶
func (h *DeleteHandler) Handle(ctx context.Context, event *EventSubmission) (err error)
type EventCreateRuns ¶
type EventCreateRuns struct { WorkspaceID string SubmissionID string InputsTemplate map[string]interface{} OutputsTemplate map[string]interface{} SubmisstionType string // filePath or dataModel DataModelID *string DataModelRowIDs []string RunConfig *RunConfig }
func NewEventCreateRunFromPayload ¶
func NewEventCreateRunFromPayload(data []byte) (*EventCreateRuns, error)
func NewEventCreateRuns ¶
func (*EventCreateRuns) Delay ¶
func (e *EventCreateRuns) Delay() time.Duration
func (*EventCreateRuns) EventType ¶
func (e *EventCreateRuns) EventType() string
func (*EventCreateRuns) Payload ¶
func (e *EventCreateRuns) Payload() []byte
type EventSubmission ¶
func NewCancelSubmissionEvent ¶
func NewCancelSubmissionEvent(submissionID string, duration time.Duration) *EventSubmission
func NewDeleteSubmissionEvent ¶
func NewDeleteSubmissionEvent(submissionID string, duration time.Duration) *EventSubmission
func NewEventFromPayload ¶
func NewEventFromPayload(data []byte) (*EventSubmission, error)
func NewSyncSubmissionEvent ¶
func NewSyncSubmissionEvent(submissionID string) *EventSubmission
func (*EventSubmission) Delay ¶
func (e *EventSubmission) Delay() time.Duration
func (*EventSubmission) EventType ¶
func (e *EventSubmission) EventType() string
func (*EventSubmission) Payload ¶
func (e *EventSubmission) Payload() []byte
type EventSubmitRun ¶
func NewEventSubmitRun ¶
func NewEventSubmitRun(runID string, runConfig *RunConfig) *EventSubmitRun
func NewEventSubmitRunFromPayload ¶
func NewEventSubmitRunFromPayload(data []byte) (*EventSubmitRun, error)
func (*EventSubmitRun) Delay ¶
func (e *EventSubmitRun) Delay() time.Duration
func (*EventSubmitRun) EventType ¶
func (e *EventSubmitRun) EventType() string
func (*EventSubmitRun) Payload ¶
func (e *EventSubmitRun) Payload() []byte
type ExposedOptions ¶
type ExposedOptions struct {
ReadFromCache bool `wes:"read_from_cache"`
}
type Factory ¶
type Factory struct{}
Factory workspace factory.
func NewSubmissionFactory ¶
NewSubmissionFactory return a workspace factory.
func (*Factory) CreateWithSubmissionParam ¶
func (fac *Factory) CreateWithSubmissionParam(param CreateSubmissionParam) (*Submission, error)
CreateWithSubmissionParam ...
type Repository ¶
type Repository interface { Save(ctx context.Context, s *Submission) error Get(ctx context.Context, id string) (*Submission, error) Delete(ctx context.Context, s *Submission) error SoftDelete(ctx context.Context, s *Submission) error }
Repository allows to get/save events from/to event store.
type Service ¶
type Service interface { Get(context.Context, string) (*Submission, error) Upsert(context.Context, *Submission) error Create(context.Context, *Submission) error Update(context.Context, *Submission) error Delete(ctx context.Context, id string) error SoftDelete(ctx context.Context, id string) error Cancel(ctx context.Context, id string) error CheckWorkspaceExist(ctx context.Context, workspaceID string) error CheckSubmissionExist(ctx context.Context, workspaceID, submissionName string) error }
func NewService ¶
func NewService(grpcFactory grpc.Factory, repo Repository, eventbus eventbus.EventBus, submissionReadModel submissionquery.ReadModel, runReadModel run.ReadModel) Service
type Submission ¶
type Submission struct { ID string Name string Description *string WorkflowID string WorkflowVersionID string WorkspaceID string DataModelID *string DataModelRowIDs []string Type string Inputs map[string]interface{} Outputs map[string]interface{} ExposedOptions ExposedOptions Status string StartTime time.Time FinishTime *time.Time }
Submission ...
type SyncHandler ¶
type SyncHandler struct {
// contains filtered or unexported fields
}
func NewSyncHandler ¶
func NewSyncHandler(repository Repository, runReadModel run.ReadModel, dataModelClient grpc.DataModelClient) *SyncHandler
func (*SyncHandler) Handle ¶
func (h *SyncHandler) Handle(ctx context.Context, event *EventSubmission) (err error)
Click to show internal directories.
Click to hide internal directories.