Documentation
¶
Index ¶
- Constants
- Variables
- func NewExecutorService(cfg models.AppConfig) models.ExecutorService
- func NewOauthIntegrationService(cfg models.AppConfig) models.OauthIntegrationService
- func NewOrchestratorService(cfg models.AppConfig) models.OrchestratorService
- func NewSchedulerService(cfg models.AppConfig) models.SchedulerService
- func NewWorkflowCalendarService(cfg models.AppConfig) models.WorkflowCalendarService
- func NewWorkflowService(cfg models.AppConfig) models.WorkflowService
- type AccountService
- type ExecutorService
- type OrchestratorService
- type SchedulerService
- func (s *SchedulerService) CalculateNextRun(st models.ScheduleType, oldNextRun time.Time, now time.Time) (*time.Time, error)
- func (s *SchedulerService) EnsureInFlightEnqueued()
- func (s *SchedulerService) GetDueWorkflows(ctx context.Context) ([]*models.WorkflowSchedule, error)
- func (s *SchedulerService) RunScheduledWorkflow(ctx context.Context, ws *models.WorkflowSchedule) error
- func (s *SchedulerService) ScheduleWorkflow(ctx context.Context, workflowID int32, scheduleType models.ScheduleType, ...) error
- func (s *SchedulerService) UpdateWorkflowSchedule(ctx context.Context, workflowID int32, scheduleType models.ScheduleType, ...) error
- func (s *SchedulerService) ValidateSchedule(st models.ScheduleType, nextRunAt time.Time, isRunning bool) error
- type WorkflowCalendarService
- func (s *WorkflowCalendarService) CheckEventChanges(ctx context.Context, c *models.WorkflowCalendar) error
- func (s *WorkflowCalendarService) CreateWorkflowCalendar(ctx context.Context, workflowID int32, userID string, ...) (*models.WorkflowCalendar, error)
- func (s *WorkflowCalendarService) EnsureInFlightEnqueued()
- func (s *WorkflowCalendarService) GetActiveCalendars(ctx context.Context) ([]*models.WorkflowCalendar, error)
- func (s *WorkflowCalendarService) GetSyncToken(ctx context.Context, calendarID string, userID string) (*string, error)
- func (s *WorkflowCalendarService) InitCalendarClient(ctx context.Context, userID string) (*google.CalendarClient, error)
- func (s *WorkflowCalendarService) UpdateWorkflowCalendar(ctx context.Context, workflowID int32, config models.WorkflowCalendarConfig, ...) error
- func (s *WorkflowCalendarService) ValidateCalendarConfig(config models.WorkflowCalendarConfig) error
- type WorkflowRunService
- func (s *WorkflowRunService) GetWorkflowRunStatus(ctx context.Context, runID int32) (*models.WorkflowRunWithNodesDTO, error)
- func (s *WorkflowRunService) RegisterClient(runID string, clientChan chan []byte)
- func (s *WorkflowRunService) StartWorkflowRunProgressListener(ctx context.Context)
- func (s *WorkflowRunService) UnregisterClient(runID string, clientChan chan []byte)
- type WorkflowService
- func (s *WorkflowService) ArchiveWorkflow(ctx context.Context, workflowID int32) error
- func (s *WorkflowService) CreateWorkflow(ctx context.Context, userID string, name string, description string, ...) (*models.WorkflowGraph, error)
- func (s *WorkflowService) UpdateWorkflow(ctx context.Context, userID string, workflowID int32, name string, ...) error
- func (s *WorkflowService) ValidateWorkflowGraph(nodes []models.ValidateNode, edges []models.ValidateEdge) error
- func (s *WorkflowService) VerifyWorkflowAccess(ctx context.Context, workflowID int32, userID string) error
Constants ¶
View Source
const ( WorkflowStatusArchived = "archived" TriggerTypeScheduled = "schedule" TriggerTypeManual = "manual" )
Variables ¶
View Source
var (
ErrSyncTokenExpired = errors.New("sync token expired")
)
View Source
var ErrUserDoesNotHaveAccessToWorkflow = errors.New("user does not have access to workflow")
Functions ¶
func NewExecutorService ¶
func NewExecutorService(cfg models.AppConfig) models.ExecutorService
func NewOauthIntegrationService ¶
func NewOauthIntegrationService(cfg models.AppConfig) models.OauthIntegrationService
func NewOrchestratorService ¶
func NewOrchestratorService(cfg models.AppConfig) models.OrchestratorService
func NewSchedulerService ¶
func NewSchedulerService(cfg models.AppConfig) models.SchedulerService
func NewWorkflowCalendarService ¶
func NewWorkflowCalendarService(cfg models.AppConfig) models.WorkflowCalendarService
func NewWorkflowService ¶
func NewWorkflowService(cfg models.AppConfig) models.WorkflowService
Types ¶
type AccountService ¶
type AccountService struct {
// contains filtered or unexported fields
}
func NewAccountService ¶
func NewAccountService( cfg models.AppConfig, ) *AccountService
func (*AccountService) DeleteUserData ¶
func (s *AccountService) DeleteUserData(ctx context.Context, userID string) error
type ExecutorService ¶
type ExecutorService struct {
// contains filtered or unexported fields
}
func (*ExecutorService) ExecuteWorkflowNode ¶
func (s *ExecutorService) ExecuteWorkflowNode(ctx context.Context, msg []byte) error
type OrchestratorService ¶
type OrchestratorService struct {
// contains filtered or unexported fields
}
func (*OrchestratorService) OrchestrateWorkflow ¶
type SchedulerService ¶
type SchedulerService struct {
// contains filtered or unexported fields
}
func (*SchedulerService) CalculateNextRun ¶
func (s *SchedulerService) CalculateNextRun( st models.ScheduleType, oldNextRun time.Time, now time.Time, ) (*time.Time, error)
func (*SchedulerService) EnsureInFlightEnqueued ¶
func (s *SchedulerService) EnsureInFlightEnqueued()
func (*SchedulerService) GetDueWorkflows ¶
func (s *SchedulerService) GetDueWorkflows( ctx context.Context, ) ([]*models.WorkflowSchedule, error)
func (*SchedulerService) RunScheduledWorkflow ¶
func (s *SchedulerService) RunScheduledWorkflow( ctx context.Context, ws *models.WorkflowSchedule, ) error
func (*SchedulerService) ScheduleWorkflow ¶
func (s *SchedulerService) ScheduleWorkflow( ctx context.Context, workflowID int32, scheduleType models.ScheduleType, scheduledDate time.Time, ) error
func (*SchedulerService) UpdateWorkflowSchedule ¶
func (s *SchedulerService) UpdateWorkflowSchedule( ctx context.Context, workflowID int32, scheduleType models.ScheduleType, scheduledDate time.Time, ) error
func (*SchedulerService) ValidateSchedule ¶
func (s *SchedulerService) ValidateSchedule( st models.ScheduleType, nextRunAt time.Time, isRunning bool, ) error
type WorkflowCalendarService ¶
type WorkflowCalendarService struct {
// contains filtered or unexported fields
}
func (*WorkflowCalendarService) CheckEventChanges ¶
func (s *WorkflowCalendarService) CheckEventChanges( ctx context.Context, c *models.WorkflowCalendar, ) error
func (*WorkflowCalendarService) CreateWorkflowCalendar ¶
func (s *WorkflowCalendarService) CreateWorkflowCalendar( ctx context.Context, workflowID int32, userID string, config models.WorkflowCalendarConfig, ) (*models.WorkflowCalendar, error)
func (*WorkflowCalendarService) EnsureInFlightEnqueued ¶
func (s *WorkflowCalendarService) EnsureInFlightEnqueued()
func (*WorkflowCalendarService) GetActiveCalendars ¶
func (s *WorkflowCalendarService) GetActiveCalendars( ctx context.Context, ) ([]*models.WorkflowCalendar, error)
func (*WorkflowCalendarService) GetSyncToken ¶
func (*WorkflowCalendarService) InitCalendarClient ¶
func (s *WorkflowCalendarService) InitCalendarClient( ctx context.Context, userID string, ) (*google.CalendarClient, error)
func (*WorkflowCalendarService) UpdateWorkflowCalendar ¶
func (*WorkflowCalendarService) ValidateCalendarConfig ¶
func (s *WorkflowCalendarService) ValidateCalendarConfig( config models.WorkflowCalendarConfig, ) error
type WorkflowRunService ¶
type WorkflowRunService struct {
// contains filtered or unexported fields
}
func NewWorkflowRunService ¶
func NewWorkflowRunService(cfg models.AppConfig) *WorkflowRunService
func (*WorkflowRunService) GetWorkflowRunStatus ¶
func (s *WorkflowRunService) GetWorkflowRunStatus( ctx context.Context, runID int32, ) (*models.WorkflowRunWithNodesDTO, error)
func (*WorkflowRunService) RegisterClient ¶
func (s *WorkflowRunService) RegisterClient(runID string, clientChan chan []byte)
func (*WorkflowRunService) StartWorkflowRunProgressListener ¶
func (s *WorkflowRunService) StartWorkflowRunProgressListener(ctx context.Context)
func (*WorkflowRunService) UnregisterClient ¶
func (s *WorkflowRunService) UnregisterClient(runID string, clientChan chan []byte)
type WorkflowService ¶
type WorkflowService struct {
// contains filtered or unexported fields
}
func (*WorkflowService) ArchiveWorkflow ¶
func (s *WorkflowService) ArchiveWorkflow(ctx context.Context, workflowID int32) error
func (*WorkflowService) CreateWorkflow ¶
func (s *WorkflowService) CreateWorkflow( ctx context.Context, userID string, name string, description string, status string, nodes []*models.WorkflowNodeDTO, edges []*models.WorkflowEdgeDTO, ) (*models.WorkflowGraph, error)
func (*WorkflowService) UpdateWorkflow ¶
func (s *WorkflowService) UpdateWorkflow( ctx context.Context, userID string, workflowID int32, name string, description string, nodes []*models.WorkflowNodeDTO, edges []*models.WorkflowEdgeDTO, ) error
func (*WorkflowService) ValidateWorkflowGraph ¶
func (s *WorkflowService) ValidateWorkflowGraph( nodes []models.ValidateNode, edges []models.ValidateEdge, ) error
func (*WorkflowService) VerifyWorkflowAccess ¶
Click to show internal directories.
Click to hide internal directories.