Documentation
¶
Index ¶
- type APIError
- type Config
- type CreateCronData
- type CronService
- func (s *CronService) CloneCron(cronId string, userId string, newName string) (*cronmodels.Cron, error)
- func (s *CronService) CreateCron(userId string, data CreateCronData) (*cronmodels.Cron, error)
- func (s *CronService) CreateSystemCron(systemType string, config CreateCronData) (*cronmodels.Cron, error)
- func (s *CronService) DeleteCron(cronId string, userId string) error
- func (s *CronService) DeleteSystemCron(systemType string) error
- func (s *CronService) GetCron(cronId string, userId string) (*cronmodels.Cron, error)
- func (s *CronService) GetSystemCron(systemType string) (*cronmodels.Cron, error)
- func (s *CronService) ListCrons(userId string, filters map[string]interface{}) ([]*cronmodels.Cron, error)
- func (s *CronService) PauseCron(cronId string, userId string) error
- func (s *CronService) ResumeCron(cronId string, userId string) error
- func (s *CronService) TestCron(cronId string, userId string) error
- func (s *CronService) UpdateCron(cronId string, userId string, data UpdateCronData) (*cronmodels.Cron, error)
- type ExecutionResult
- type Executor
- type Scheduler
- type UpdateCronData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type CreateCronData ¶
type CreateCronData struct {
Name string `json:"name"`
Description string `json:"description"`
Schedule string `json:"schedule"`
WebhookURL string `json:"webhook_url"`
WebhookMethod string `json:"webhook_method"`
WebhookHeaders map[string]interface{} `json:"webhook_headers"`
WebhookPayload map[string]interface{} `json:"webhook_payload"`
TimeoutSeconds int `json:"timeout_seconds"`
NotifyOnSuccess bool `json:"notify_on_success"`
NotifyOnFailure bool `json:"notify_on_failure"`
NotificationWebhook string `json:"notification_webhook"`
MaxRetries int `json:"max_retries"`
RetryDelaySeconds int `json:"retry_delay_seconds"`
}
type CronService ¶
type CronService struct {
// contains filtered or unexported fields
}
func NewCronService ¶
func NewCronService(scheduler *Scheduler, executor *Executor) *CronService
func (*CronService) CloneCron ¶
func (s *CronService) CloneCron(cronId string, userId string, newName string) (*cronmodels.Cron, error)
func (*CronService) CreateCron ¶
func (s *CronService) CreateCron(userId string, data CreateCronData) (*cronmodels.Cron, error)
func (*CronService) CreateSystemCron ¶
func (s *CronService) CreateSystemCron(systemType string, config CreateCronData) (*cronmodels.Cron, error)
func (*CronService) DeleteCron ¶
func (s *CronService) DeleteCron(cronId string, userId string) error
func (*CronService) DeleteSystemCron ¶
func (s *CronService) DeleteSystemCron(systemType string) error
func (*CronService) GetCron ¶
func (s *CronService) GetCron(cronId string, userId string) (*cronmodels.Cron, error)
func (*CronService) GetSystemCron ¶
func (s *CronService) GetSystemCron(systemType string) (*cronmodels.Cron, error)
func (*CronService) ListCrons ¶
func (s *CronService) ListCrons(userId string, filters map[string]interface{}) ([]*cronmodels.Cron, error)
func (*CronService) ResumeCron ¶
func (s *CronService) ResumeCron(cronId string, userId string) error
func (*CronService) UpdateCron ¶
func (s *CronService) UpdateCron(cronId string, userId string, data UpdateCronData) (*cronmodels.Cron, error)
type ExecutionResult ¶
type ExecutionResult struct {
Status string
HTTPStatus int
DurationMs int64
RequestURL string
RequestMethod string
RequestHeaders map[string]string
RequestPayload map[string]interface{}
ResponseHeaders map[string]string
ResponseBody string
ErrorMessage string
ErrorStack string
StartedAt time.Time
CompletedAt time.Time
RetryCount int
}
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func NewExecutor ¶
func NewExecutor() *Executor
func NewExecutorWithApp ¶
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func NewScheduler ¶
func (*Scheduler) ExecuteCron ¶
func (*Scheduler) ReloadCrons ¶
func (*Scheduler) RemoveCron ¶
type UpdateCronData ¶
type UpdateCronData struct {
Name *string `json:"name"`
Description *string `json:"description"`
Schedule *string `json:"schedule"`
WebhookURL *string `json:"webhook_url"`
WebhookMethod *string `json:"webhook_method"`
WebhookHeaders map[string]interface{} `json:"webhook_headers"`
WebhookPayload map[string]interface{} `json:"webhook_payload"`
TimeoutSeconds *int `json:"timeout_seconds"`
IsActive *bool `json:"is_active"`
NotifyOnSuccess *bool `json:"notify_on_success"`
NotifyOnFailure *bool `json:"notify_on_failure"`
NotificationWebhook *string `json:"notification_webhook"`
MaxRetries *int `json:"max_retries"`
RetryDelaySeconds *int `json:"retry_delay_seconds"`
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package migrations owns cron service storage migrations.
|
Package migrations owns cron service storage migrations. |
Click to show internal directories.
Click to hide internal directories.