service

package
v1.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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 (s *Service) AddSchedulePunch(schedule *domain.Schedule) error

func (*Service) DefaultSchedulePunchAllUsers

func (s *Service) DefaultSchedulePunchAllUsers() error

func (*Service) InitSchedules added in v1.1.2

func (s *Service) InitSchedules() error

func (*Service) Login

func (s *Service) Login(discordUserID string) (string, error)

func (*Service) Punch

func (s *Service) Punch(userID string)

func (*Service) PunchOnTime added in v1.1.3

func (s *Service) PunchOnTime(accessToken string, punchTime time.Time) error

func (*Service) RamdomDelayInThirtyMinutes added in v1.1.2

func (s *Service) RamdomDelayInThirtyMinutes() time.Duration

func (*Service) Register

func (s *Service) Register(user *domain.User) error

func (*Service) RemoveSchedulePunch added in v1.1.2

func (s *Service) RemoveSchedulePunch(schedule *domain.Schedule)

remove old schedule

func (*Service) SetDayOff

func (s *Service) SetDayOff(discordUserID string, year, month, day int) error

func (*Service) TryToLogin

func (s *Service) TryToLogin(account, password string) (string, error)

func (*Service) WebPunch added in v1.1.2

func (s *Service) WebPunch(accessToken string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL