Documentation ¶
Index ¶
- type ProjectTask
- type Task
- type TaskData
- func (c *TaskData) ArchiveTask(taskId int, accountId int) error
- func (c *TaskData) DeleteTask(taskId int, accountId int) error
- func (c *TaskData) GetAllTasks(accountId int, active bool) ([]*Task, error)
- func (c *TaskData) GetTask(taskId int, accountId int) (*Task, error)
- func (c *TaskData) RestoreTask(taskId int, accountId int) error
- func (c *TaskData) SaveTask(task *Task) (int, error)
- func (c *TaskData) UpdateTask(task *Task) error
- type TaskRequest
- type TaskResource
- func (c *TaskResource) ArchiveTask(taskId int, accountId int) *api.Error
- func (c *TaskResource) DeleteTask(taskId int, accountId int) *api.Error
- func (c *TaskResource) GetAllTasks(accountId int, active bool) ([]*Task, *api.Error)
- func (c *TaskResource) GetTask(taskId int, accountId int) (*Task, *api.Error)
- func (c *TaskResource) RestoreTask(taskId int, accountId int) *api.Error
- func (c *TaskResource) SaveTask(accountId int, name string, common bool, rate float64, billable bool) (*Task, *api.Error)
- func (c *TaskResource) UpdateTask(updateTask *Task) *api.Error
- type TaskResponse
- type TaskRouter
- type TaskService
- type TaskStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProjectTask ¶
type Task ¶
type Task struct { TaskId int `json:"-" db:"task_id"` AccountId int `json:"-" db:"account_id"` Name string `json:"-" db:"task_name"` DefaultRate sql.NullFloat64 `json:"-" db:"default_rate"` DefaultBillable bool `json:"-" db:"default_billable"` Common bool `json:"-"` TaskActive bool `json:"-" db:"task_active"` }
func GetTaskListDifference ¶
Find tasks that are in the source list, but not in the other list
type TaskData ¶
type TaskData struct {
// contains filtered or unexported fields
}
func (*TaskData) GetAllTasks ¶
func (*TaskData) UpdateTask ¶
type TaskRequest ¶
type TaskResource ¶
type TaskResource struct {
// contains filtered or unexported fields
}
func (*TaskResource) ArchiveTask ¶
func (c *TaskResource) ArchiveTask(taskId int, accountId int) *api.Error
func (*TaskResource) DeleteTask ¶
func (c *TaskResource) DeleteTask(taskId int, accountId int) *api.Error
func (*TaskResource) GetAllTasks ¶
func (*TaskResource) RestoreTask ¶
func (c *TaskResource) RestoreTask(taskId int, accountId int) *api.Error
func (*TaskResource) UpdateTask ¶
func (c *TaskResource) UpdateTask(updateTask *Task) *api.Error
type TaskResponse ¶
type TaskResponse struct { Id int `json:"id,omitempty"` Name string `json:"name"` DefaultRate float64 `json:"defaultRate,omitempty"` DefaultBillable bool `json:"defaultBillable"` TaskActive bool `json:"taskActive"` Common bool `json:"common"` }
func NewTaskResponse ¶
func NewTaskResponse(task *Task) *TaskResponse
func NewTasksResponse ¶
func NewTasksResponse(tasks []*Task) []*TaskResponse
type TaskRouter ¶
type TaskRouter struct {
// contains filtered or unexported fields
}
func NewRouter ¶
func NewRouter(store TaskStore, profileRouter *profile.ProfileRouter) *TaskRouter
func (*TaskRouter) Router ¶
func (a *TaskRouter) Router() *chi.Mux
type TaskService ¶
type TaskService interface { GetTask(taskId int, accountId int) (*Task, *api.Error) GetAllTasks(accountId int, active bool) ([]*Task, *api.Error) SaveTask(accountId int, name string, common bool, rate float64, billable bool) (*Task, *api.Error) UpdateTask(*Task) *api.Error ArchiveTask(taskId int, accountId int) *api.Error RestoreTask(taskId int, accountId int) *api.Error DeleteTask(taskId int, accountId int) *api.Error }
func NewTaskService ¶
func NewTaskService(store TaskStore) TaskService
type TaskStore ¶
type TaskStore interface { GetTask(taskId int, accountId int) (*Task, error) GetAllTasks(accountId int, active bool) ([]*Task, error) SaveTask(*Task) (int, error) UpdateTask(*Task) error ArchiveTask(taskId int, accountId int) error RestoreTask(taskId int, accountId int) error DeleteTask(taskId int, accountId int) error }
func NewTaskStore ¶
Click to show internal directories.
Click to hide internal directories.