Documentation ¶
Index ¶
- type Service
- func (s *Service) CreateTask(ctx context.Context, task Task) (*Task, error)
- func (s *Service) DeleteTask(ctx context.Context, taskID string) (*Task, error)
- func (s *Service) GetTask(ctx context.Context, taskID string) (*Task, error)
- func (s *Service) GetTaskWithinTimeRange(ctx context.Context, userID string, startTime, endTime time.Time) (*Task, error)
- func (s *Service) GetTasks(ctx context.Context, userID, lastID string, limit int) ([]Task, error)
- func (s *Service) UpdateTask(ctx context.Context, taskID string, update Task) (*Task, error)
- type Task
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) CreateTask ¶
func (*Service) DeleteTask ¶
func (*Service) GetTaskWithinTimeRange ¶
type Task ¶
type Task struct { ID string `json:"id" bson:"_id,omitempty"` Title string `json:"title" bson:"title,omitempty"` StartTime time.Time `json:"startTime" bson:"startTime,omitempty"` EndTime time.Time `json:"endTime" bson:"endTime,omitempty"` UserID string `json:"userId" bson:"userId,omitempty"` Status string `json:"status" bson:"status,omitempty"` TimeAdded time.Time `json:"-" bson:"timeAdded,omitempty"` }
Click to show internal directories.
Click to hide internal directories.