app

package
v1.7.7 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTaskAppService

func NewTaskAppService(
	s service.TaskService,
	repo repository.Task,
) *taskAppService

func NewUserPointsAppMessageService

func NewUserPointsAppMessageService(
	tr repository.Task,
	repo repository.UserPoints,
) *userPointsAppMessageService

func NewUserPointsAppService

func NewUserPointsAppService(
	tr repository.Task,
	repo repository.UserPoints,
) *userPointsAppService

Types

type CmdToAddPointsItem

type CmdToAddPointsItem struct {
	Account types.Account
	TaskId  string
	Desc    string
	Time    int64
}

type PointsDetailDTO

type PointsDetailDTO struct {
	Task string `json:"task"`

	domain.PointsDetail
}

type TaskAppService

type TaskAppService interface {
	Add(t *domain.Task) error
	Doc(lang common.Language) (dto TaskDocDTO, err error)
}

type TaskCompletionInfoDTO

type TaskCompletionInfoDTO struct {
	Name      string `json:"name"`
	Addr      string `json:"addr"`
	Points    int    `json:"points"`
	Completed bool   `json:"completed"`
}

type TaskDocDTO

type TaskDocDTO struct {
	Content string `json:"content"`
}

type TasksCompletionInfoDTO

type TasksCompletionInfoDTO struct {
	Kind  string                  `json:"kind"`
	Tasks []TaskCompletionInfoDTO `json:"tasks"`
}

TasksCompletionInfoDTO

type UserPointsAppMessageService

type UserPointsAppMessageService interface {
	AddPointsItem(cmd *CmdToAddPointsItem) error
}

type UserPointsAppService

type UserPointsAppService interface {
	Points(account types.Account) (int, error)
	PointsDetails(account types.Account, lang common.Language) (dto UserPointsDetailsDTO, err error)
	TasksOfDay(account types.Account, lang common.Language) ([]TasksCompletionInfoDTO, error)
}

type UserPointsDetailsDTO

type UserPointsDetailsDTO struct {
	Total   int               `json:"total"`
	Details []PointsDetailDTO `json:"details"`
}

Jump to

Keyboard shortcuts

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