Documentation
¶
Index ¶
- Variables
- type Service
- func (s *Service) AddSchedulePunch(schedule *domain.Schedule) error
- func (s *Service) DefaultSchedulePunchAllUsers() error
- func (s *Service) InitSchedules() error
- func (s *Service) Login(discordUserID string) (string, error)
- func (s *Service) Punch(userID string)
- func (s *Service) RamdomDelayInThirtyMinutes() time.Duration
- func (s *Service) Register(user *domain.User) error
- func (s *Service) RemoveSchedulePunch(schedule *domain.Schedule)
- func (s *Service) SetDayOff(discordUserID string, year, month, day int) error
- func (s *Service) TryToLogin(account, password string) (string, error)
- func (s *Service) WebPunch(accessToken string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var R *rand.Rand
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { Session *discordgo.Session Cfg *config.Config Repo repository.Repository Cron *cron.Cron }
func NewService ¶
func NewService(cfg *config.Config, repo repository.Repository, session *discordgo.Session, cron *cron.Cron) Service
func (*Service) AddSchedulePunch ¶ added in v1.1.2
func (*Service) DefaultSchedulePunchAllUsers ¶
func (*Service) InitSchedules ¶ added in v1.1.2
func (*Service) RamdomDelayInThirtyMinutes ¶ added in v1.1.2
func (*Service) RemoveSchedulePunch ¶ added in v1.1.2
remove old schedule
Click to show internal directories.
Click to hide internal directories.