Documentation
¶
Index ¶
- Constants
- func NewSubSystemRunner(j Job, c controller.Controller) (cron.Job, error)
- type Controller
- func (c *Controller) Create(job Job) error
- func (c *Controller) CreateJob(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Delete(id string) error
- func (c *Controller) DeleteJob(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Get(id string) (Job, error)
- func (c *Controller) GetEntity(id string) (controller.Entity, error)
- func (c *Controller) GetJob(w http.ResponseWriter, r *http.Request)
- func (c *Controller) InUse(depType, id string) ([]string, error)
- func (c *Controller) List() ([]Job, error)
- func (c *Controller) ListJobs(w http.ResponseWriter, r *http.Request)
- func (c *Controller) LoadAPI(r *mux.Router)
- func (c *Controller) On(id string, on bool) error
- func (c *Controller) Runner(j Job) (cron.Job, error)
- func (c *Controller) Setup() error
- func (c *Controller) Start()
- func (c *Controller) Stop()
- func (c *Controller) Update(id string, payload Job) error
- func (c *Controller) UpdateJob(w http.ResponseWriter, r *http.Request)
- type Job
- type Reminder
- type ReminderRunner
- type SubSystemRunner
- type Trigger
Constants ¶
View Source
const Bucket = storage.TimerBucket
Variables ¶
This section is empty.
Functions ¶
func NewSubSystemRunner ¶
func NewSubSystemRunner(j Job, c controller.Controller) (cron.Job, error)
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func New ¶
func New(c controller.Controller) *Controller
func (*Controller) Create ¶
func (c *Controller) Create(job Job) error
func (*Controller) CreateJob ¶
func (c *Controller) CreateJob(w http.ResponseWriter, r *http.Request)
func (*Controller) Delete ¶
func (c *Controller) Delete(id string) error
func (*Controller) DeleteJob ¶
func (c *Controller) DeleteJob(w http.ResponseWriter, r *http.Request)
func (*Controller) GetEntity ¶
func (c *Controller) GetEntity(id string) (controller.Entity, error)
func (*Controller) GetJob ¶
func (c *Controller) GetJob(w http.ResponseWriter, r *http.Request)
func (*Controller) List ¶
func (c *Controller) List() ([]Job, error)
func (*Controller) ListJobs ¶
func (c *Controller) ListJobs(w http.ResponseWriter, r *http.Request)
func (*Controller) LoadAPI ¶
func (c *Controller) LoadAPI(r *mux.Router)
func (*Controller) Setup ¶
func (c *Controller) Setup() error
func (*Controller) Start ¶
func (c *Controller) Start()
func (*Controller) Stop ¶
func (c *Controller) Stop()
func (*Controller) UpdateJob ¶
func (c *Controller) UpdateJob(w http.ResponseWriter, r *http.Request)
type Job ¶
type Job struct { ID string `json:"id"` Name string `json:"name"` Enable bool `json:"enable"` Type string `json:"type"` Month string `json:"month"` Week string `json:"week"` Day string `json:"day"` Hour string `json:"hour"` Minute string `json:"minute"` Second string `json:"second"` Target json.RawMessage `json:"target"` }
type ReminderRunner ¶
type ReminderRunner struct {
// contains filtered or unexported fields
}
func (ReminderRunner) Run ¶
func (r ReminderRunner) Run()
type SubSystemRunner ¶
type SubSystemRunner struct { Type string // contains filtered or unexported fields }
func (*SubSystemRunner) Run ¶
func (m *SubSystemRunner) Run()
Click to show internal directories.
Click to hide internal directories.