Documentation ¶
Index ¶
- func GetScheduleService() (res interfaces.ScheduleService, err error)
- func NewLogger() cron.Logger
- func NewScheduleService() (svc2 interfaces.ScheduleService, err error)
- type Logger
- type Option
- type Service
- func (svc *Service) Disable(s interfaces.Schedule, args ...interface{}) (err error)
- func (svc *Service) Enable(s interfaces.Schedule, args ...interface{}) (err error)
- func (svc *Service) GetCron() (c *cron.Cron)
- func (svc *Service) GetDelay() (delay bool)
- func (svc *Service) GetLocation() (loc *time.Location)
- func (svc *Service) GetSkip() (skip bool)
- func (svc *Service) GetUpdateInterval() (interval time.Duration)
- func (svc *Service) Init() (err error)
- func (svc *Service) SetDelay(delay bool)
- func (svc *Service) SetLocation(loc *time.Location)
- func (svc *Service) SetSkip(skip bool)
- func (svc *Service) SetUpdateInterval(interval time.Duration)
- func (svc *Service) Start()
- func (svc *Service) Stop()
- func (svc *Service) Update()
- func (svc *Service) Wait()
- type ServiceV2
- func (svc *ServiceV2) Disable(s models2.ScheduleV2, by primitive.ObjectID) (err error)
- func (svc *ServiceV2) Enable(s models2.ScheduleV2, by primitive.ObjectID) (err error)
- func (svc *ServiceV2) GetCron() (c *cron.Cron)
- func (svc *ServiceV2) GetDelay() (delay bool)
- func (svc *ServiceV2) GetLocation() (loc *time.Location)
- func (svc *ServiceV2) GetSkip() (skip bool)
- func (svc *ServiceV2) GetUpdateInterval() (interval time.Duration)
- func (svc *ServiceV2) Init() (err error)
- func (svc *ServiceV2) SetDelay(delay bool)
- func (svc *ServiceV2) SetLocation(loc *time.Location)
- func (svc *ServiceV2) SetSkip(skip bool)
- func (svc *ServiceV2) SetUpdateInterval(interval time.Duration)
- func (svc *ServiceV2) Start()
- func (svc *ServiceV2) Stop()
- func (svc *ServiceV2) Update()
- func (svc *ServiceV2) Wait()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetScheduleService ¶
func GetScheduleService() (res interfaces.ScheduleService, err error)
func NewScheduleService ¶
func NewScheduleService() (svc2 interfaces.ScheduleService, err error)
Types ¶
type Option ¶
type Option func(svc interfaces.ScheduleService)
func WithConfigPath ¶
func WithDelayIfStillRunning ¶
func WithDelayIfStillRunning() Option
func WithLocation ¶
func WithSkipIfStillRunning ¶
func WithSkipIfStillRunning() Option
func WithUpdateInterval ¶
type Service ¶
type Service struct { // dependencies interfaces.WithConfigPath // contains filtered or unexported fields }
func (*Service) Disable ¶
func (svc *Service) Disable(s interfaces.Schedule, args ...interface{}) (err error)
func (*Service) Enable ¶
func (svc *Service) Enable(s interfaces.Schedule, args ...interface{}) (err error)
func (*Service) GetLocation ¶
func (*Service) GetUpdateInterval ¶
func (*Service) SetLocation ¶
func (*Service) SetUpdateInterval ¶
type ServiceV2 ¶
type ServiceV2 struct { // dependencies interfaces.WithConfigPath // contains filtered or unexported fields }
func GetScheduleServiceV2 ¶
func NewScheduleServiceV2 ¶
func (*ServiceV2) GetLocation ¶
func (*ServiceV2) GetUpdateInterval ¶
func (*ServiceV2) SetLocation ¶
func (*ServiceV2) SetUpdateInterval ¶
Click to show internal directories.
Click to hide internal directories.