Documentation ¶
Index ¶
- type Persistence
- type ProcessApi
- type Scheduler
- func (this *Scheduler) Add(entry model.ScheduleEntry, user string) (result model.ScheduleEntry, err error, code int)
- func (this *Scheduler) Delete(id string, user string) (err error, code int)
- func (this *Scheduler) List(user string, createdBy *string) (result []model.ScheduleEntry, err error, code int)
- func (this *Scheduler) Start(ctx context.Context, wg *sync.WaitGroup) error
- func (this *Scheduler) Stop()
- func (this *Scheduler) Update(entry model.ScheduleEntry, user string) (result model.ScheduleEntry, err error, code int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Persistence ¶
type Persistence interface { GetAll() ([]model.ScheduleEntry, error) Set(entry model.ScheduleEntry) error Get(id string, userId string) (model.ScheduleEntry, error) Remove(id string, user string) error List(user string, createdBy *string) ([]model.ScheduleEntry, error) }
type ProcessApi ¶
type ProcessApi interface {
Execute(entry model.ScheduleEntry)
}
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func New ¶
func New(persistence Persistence, processes ProcessApi) *Scheduler
func (*Scheduler) Add ¶
func (this *Scheduler) Add(entry model.ScheduleEntry, user string) (result model.ScheduleEntry, err error, code int)
func (*Scheduler) Update ¶
func (this *Scheduler) Update(entry model.ScheduleEntry, user string) (result model.ScheduleEntry, err error, code int)
Click to show internal directories.
Click to hide internal directories.