Documentation
¶
Index ¶
- Constants
- type StatusEnum
- type Task
- type TaskErr
- type TaskList
- func (tasks TaskList) AddTask(newTodo Task) (uuid.UUID, error)
- func (tasks TaskList) CurrentTaskLength() int
- func (tasks TaskList) DeleteTask(id uuid.UUID)
- func (tasks TaskList) SearchTask(id uuid.UUID) (Task, error)
- func (tasks TaskList) UpdateStatus(id uuid.UUID, status StatusEnum) error
- func (tasks TaskList) UpdateTaskName(id uuid.UUID, name string) error
- type TaskServer
- type TaskService
Constants ¶
View Source
const ( CannotAddTask = TaskErr("Cannot add task") CannotFindTask = TaskErr("Task not found") CannotUpdateNonExistentTask = TaskErr("Cannot update non-existent task") NotAValidStatus = TaskErr("Not a valid status") )
View Source
const ( Start = iota Ongoing Completed Ignored )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StatusEnum ¶
type StatusEnum int
func (StatusEnum) CheckStatus ¶
func (ss StatusEnum) CheckStatus() error
func (StatusEnum) String ¶
func (ss StatusEnum) String() string
type Task ¶
type Task struct {
Name string
Status StatusEnum
}
type TaskList ¶
func (TaskList) CurrentTaskLength ¶
func (TaskList) DeleteTask ¶
func (TaskList) UpdateStatus ¶
func (tasks TaskList) UpdateStatus(id uuid.UUID, status StatusEnum) error
type TaskServer ¶
type TaskServer struct {
// contains filtered or unexported fields
}
func NewTaskServer ¶
func NewTaskServer(service TaskService) *TaskServer
Click to show internal directories.
Click to hide internal directories.