Documentation
¶
Index ¶
- func CompleteTaskWithTimelog(taskID uint, createTimelog bool, timelogData *model.TimeLog) error
- func CreateConstraint(constraint *model.Constraint) error
- func CreateTag(tag *model.Tag) error
- func CreateTask(task *model.Task) error
- func CreateTimeLog(tl *model.TimeLog) error
- func DeleteConstraint(id uint) error
- func DeleteTag(id uint) error
- func DeleteTask(id uint) error
- func DeleteTimeLog(id uint) error
- func GetActiveConstraints() ([]model.Constraint, error)
- func GetAllConstraints() ([]model.Constraint, error)
- func GetAllTasks(includeSuspended bool, includeCompleted bool) ([]model.Task, error)
- func GetCompletedTasksInDateRange(startDate, endDate time.Time) ([]model.Task, error)
- func GetConstraintByID(id uint) (*model.Constraint, error)
- func GetConstraintsByDateRange(startDate, endDate time.Time) ([]model.Constraint, error)
- func GetTagByID(id uint) (*model.Tag, error)
- func GetTagByName(name string) (*model.Tag, error)
- func GetTaskByID(id uint) (*model.Task, error)
- func GetTaskStats(date time.Time) (map[string]interface{}, error)
- func GetTasksByDate(date time.Time, includeSuspended bool, includeCompleted bool) ([]model.Task, error)
- func GetTasksByDateRange(startDate, endDate time.Time) ([]model.Task, error)
- func GetTimeLogByID(id uint) (*model.TimeLog, error)
- func InitService(loggerInstance logger.Logger, config *config.Config)
- func ListTags(conds ...interface{}) ([]model.Tag, error)
- func ListTimeLogs(conds ...interface{}) ([]model.TimeLog, error)
- func ListTimeLogsWithOptions(limit int, orderBy string, conds ...interface{}) ([]model.TimeLog, error)
- func MarkConstraintAsActive(constraintID uint) error
- func MarkConstraintAsCompleted(constraintID uint, endReason string) error
- func MarkTaskAsCompleted(taskID uint) error
- func MarkTaskAsIncomplete(taskID uint) error
- func SuspendTask(taskID uint) error
- func UnsuspendTask(taskID uint) error
- func UpdateConstraint(constraint *model.Constraint) error
- func UpdateTag(tag *model.Tag) error
- func UpdateTask(task *model.Task) error
- func UpdateTimeLog(tl *model.TimeLog) error
- type Pages
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompleteTaskWithTimelog ¶
CompleteTaskWithTimelog 完成任务并创建时间记录 这是一个组合操作,将任务标记为完成,并可选地创建关联的时间记录
func CreateConstraint ¶
func CreateConstraint(constraint *model.Constraint) error
CreateConstraint 创建约束
func GetActiveConstraints ¶
func GetActiveConstraints() ([]model.Constraint, error)
GetActiveConstraints 获取活跃的约束
func GetAllConstraints ¶
func GetAllConstraints() ([]model.Constraint, error)
GetAllConstraints 获取所有约束
func GetAllTasks ¶
GetAllTasks 获取所有任务 includeSuspended: 是否包含暂停的任务 includeCompleted: 是否包含已完成的任务
func GetCompletedTasksInDateRange ¶
GetCompletedTasksInDateRange 获取指定日期范围内的已完成任务
func GetConstraintByID ¶
func GetConstraintByID(id uint) (*model.Constraint, error)
GetConstraintByID 根据ID获取约束
func GetConstraintsByDateRange ¶
func GetConstraintsByDateRange(startDate, endDate time.Time) ([]model.Constraint, error)
GetConstraintsByDateRange 根据日期范围获取约束
func GetTaskStats ¶
GetTaskStats 获取任务统计信息
func GetTasksByDate ¶
func GetTasksByDate(date time.Time, includeSuspended bool, includeCompleted bool) ([]model.Task, error)
GetTasksByDate 根据日期获取任务 includeSuspended: 是否包含暂停的任务 includeCompleted: 是否包含已完成的任务
func GetTasksByDateRange ¶
GetTasksByDateRange 根据日期范围获取任务
func GetTimeLogByID ¶
GetTimeLogByID 根据ID获取时间日志
func ListTimeLogs ¶
ListTimeLogs 查询时间日志(可扩展条件)
func ListTimeLogsWithOptions ¶
func ListTimeLogsWithOptions(limit int, orderBy string, conds ...interface{}) ([]model.TimeLog, error)
ListTimeLogsWithOptions 查询时间日志(支持排序和限制)
func MarkConstraintAsActive ¶
MarkConstraintAsActive 重新激活约束
func MarkConstraintAsCompleted ¶
MarkConstraintAsCompleted 标记约束为完成
func MarkTaskAsIncomplete ¶
MarkTaskAsIncomplete 标记任务为未完成
func UpdateConstraint ¶
func UpdateConstraint(constraint *model.Constraint) error
UpdateConstraint 更新约束