Documentation ¶
Index ¶
- Variables
- func Init() error
- type Conf
- type ITaskController
- type TaskController
- func (c *TaskController) Create(ctx context.Context) (*model.TaskPublicDTO, error)
- func (c *TaskController) Delete(ctx context.Context) error
- func (c *TaskController) Get(ctx context.Context) (*model.Task, error)
- func (c *TaskController) GetAll(ctx context.Context) ([]model.TaskPublicDTO, error)
- func (c *TaskController) Update(ctx context.Context) error
- type TaskControllerConf
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Config of the controllers package Config Conf // TaskInstance is an instance of ITaskController. TaskInstance ITaskController )
Functions ¶
Types ¶
type Conf ¶
type Conf struct {
TaskController TaskControllerConf `mapstructure:"task_controller"`
}
Conf for the controllers package
type ITaskController ¶
type ITaskController interface { Create(ctx context.Context) (*model.TaskPublicDTO, error) Get(ctx context.Context) (*model.Task, error) GetAll(ctx context.Context) ([]model.TaskPublicDTO, error) Update(ctx context.Context) error Delete(ctx context.Context) error }
ITaskController is an interface for TaskController and TaskControllerMocking.
type TaskController ¶
type TaskController struct {
// contains filtered or unexported fields
}
TaskController is an controllers to manage business logic of Task.
func (*TaskController) Create ¶
func (c *TaskController) Create(ctx context.Context) (*model.TaskPublicDTO, error)
func (*TaskController) GetAll ¶
func (c *TaskController) GetAll(ctx context.Context) ([]model.TaskPublicDTO, error)
type TaskControllerConf ¶
type TaskControllerConf struct {
TaskDAO repositories.DAOFactoryOptions `mapstructure:"task_dao"`
}
TaskControllerConf is a configuration structure for TaskController.
Click to show internal directories.
Click to hide internal directories.