Documentation ¶
Index ¶
- func MillisecondInterval(interval time.Duration) int64
- func SetDBConfig() string
- func Setup(pathToFile string, db *DataBase)
- func StateCodeToWeekDay(stateCode int) time.Weekday
- func StrToWeekday(strWeekday string) (time.Weekday, error)
- func ToDuration(millisecondInterval int64) time.Duration
- func WeekdayToStr(weekday time.Weekday) string
- type DataBase
- func (db *DataBase) AddFastTask(fastTask models.FastTask) error
- func (db *DataBase) AddScheduleTask(scheduleTask models.ScheduleTask) error
- func (db *DataBase) AddUser(user models.User) error
- func (db *DataBase) ClearAll(assigneeId int) error
- func (db *DataBase) DeleteFastTask(ftId int) error
- func (db *DataBase) DeleteScheduleTask(schId int) error
- func (db *DataBase) DeleteScheduleWeek(assigneeId int, weekday time.Weekday) error
- func (db *DataBase) GetAllFastTasks() ([]models.FastTask, error)
- func (db *DataBase) GetFastTasks(assigneeId int) ([]models.FastTask, error)
- func (db *DataBase) GetSchedule(assigneeId int, weekday time.Weekday) ([]models.ScheduleTask, error)
- func (db *DataBase) GetUser(userId int) (models.User, error)
- func (db *DataBase) GetUsers() ([]models.User, error)
- func (db *DataBase) UpdateFastTasks(fastTasks []models.FastTask) error
- func (db *DataBase) UpdateScheduleTask(scheduleTask models.ScheduleTask) error
- func (db *DataBase) UpdateState(user models.User) error
- type Datastore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MillisecondInterval ¶
func SetDBConfig ¶
func SetDBConfig() string
func StateCodeToWeekDay ¶
func ToDuration ¶
func WeekdayToStr ¶
Types ¶
type DataBase ¶
func (*DataBase) AddScheduleTask ¶
func (db *DataBase) AddScheduleTask(scheduleTask models.ScheduleTask) error
func (*DataBase) DeleteFastTask ¶
func (*DataBase) DeleteScheduleTask ¶
func (*DataBase) DeleteScheduleWeek ¶
func (*DataBase) GetFastTasks ¶
func (*DataBase) GetSchedule ¶
func (*DataBase) UpdateFastTasks ¶
func (*DataBase) UpdateScheduleTask ¶
func (db *DataBase) UpdateScheduleTask(scheduleTask models.ScheduleTask) error
type Datastore ¶
type Datastore interface { // User. AddUser(user models.User) error GetUsers() ([]models.User, error) GetUser(userId int) (models.User, error) UpdateState(user models.User) error // FastTask. AddFastTask(fastTask models.FastTask) error GetAllFastTasks() ([]models.FastTask, error) GetFastTasks(assigneeId int) ([]models.FastTask, error) UpdateFastTasks(fastTasks []models.FastTask) error DeleteFastTask(ftId int) error // Schedule. AddScheduleTask(scheduleTask models.ScheduleTask) error GetSchedule(assigneeId int, weekday time.Weekday) ([]models.ScheduleTask, error) UpdateScheduleTask(scheduleTask models.ScheduleTask) error DeleteScheduleTask(schId int) error DeleteScheduleWeek(assigneeId int, weekday time.Weekday) error ClearAll(assigneeId int) error }
Click to show internal directories.
Click to hide internal directories.