listing

package
v0.0.0-...-43fa908 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Task

type Task struct {
	gorm.Model
	Name string
}

Task defines the properties of a task to be added

func ToTask

func ToTask(taskDTO TaskDTO) Task

type TaskAPI

type TaskAPI struct {
	TaskService TaskService
}

func (*TaskAPI) FindAll

func (p *TaskAPI) FindAll(c *gin.Context)

func (*TaskAPI) FindByID

func (p *TaskAPI) FindByID(c *gin.Context)

type TaskDTO

type TaskDTO struct {
	ID   uint   `json:"id,string,omitempty"`
	Name string `json:"name"`
}

func ToTaskDTO

func ToTaskDTO(task Task) TaskDTO

func ToTaskDTOs

func ToTaskDTOs(tasks []Task) []TaskDTO

type TaskRepository

type TaskRepository interface {
	FindAll() []Task
	FindByID(id uint) Task
}

type TaskService

type TaskService interface {
	FindAll() []Task
	FindByID(id uint) Task
}

func ProvideTaskService

func ProvideTaskService(t TaskRepository) TaskService

Jump to

Keyboard shortcuts

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