Documentation ¶
Index ¶
Constants ¶
View Source
const (
PluginName = "/api/v1/jobs"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
type CreateRequest struct { CronExpr string `json:"cron_expr,omitempty" validate:"required,min=9,max=254"` JobCode string `json:"job_code,omitempty" validate:"required,max=254"` Payload string `json:"payload,omitempty"` Opts []Option `json:"opts,omitempty" validate:"omitempty,dive"` Enabled bool `json:"enabled,omitempty"` }
func (CreateRequest) PeriodicTask ¶
func (r CreateRequest) PeriodicTask() smp.PeriodicTask
type Option ¶
type Option struct { Type smp.OptionType `json:"type,omitempty" validate:"required,max=50"` Value string `json:"value,omitempty" validate:"required"` }
type UpdateRequest ¶
type UpdateRequest struct { CronExpr string `json:"cron_expr,omitempty" validate:"omitempty,min=9,max=254"` JobCode string `json:"job_code,omitempty" validate:"omitempty,max=254"` Payload *string `json:"payload,omitempty"` Opts *[]Option `json:"opts,omitempty" validate:"omitempty,dive"` Enabled *bool `json:"enabled,omitempty"` }
func (UpdateRequest) PeriodicTask ¶
func (r UpdateRequest) PeriodicTask(id string) smp.PeriodicTask
Click to show internal directories.
Click to hide internal directories.