controllers

package
v0.0.0-...-3349ed0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

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

func Init

func Init() error

Init the controllerss

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 (*TaskController) Delete

func (c *TaskController) Delete(ctx context.Context) error

func (*TaskController) Get

func (c *TaskController) Get(ctx context.Context) (*model.Task, error)

func (*TaskController) GetAll

func (c *TaskController) GetAll(ctx context.Context) ([]model.TaskPublicDTO, error)

func (*TaskController) Update

func (c *TaskController) Update(ctx context.Context) error

type TaskControllerConf

type TaskControllerConf struct {
	TaskDAO repositories.DAOFactoryOptions `mapstructure:"task_dao"`
}

TaskControllerConf is a configuration structure for TaskController.

Jump to

Keyboard shortcuts

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