domain

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	ID              int       `json:"id" swaggerignore:"true"`
	Name            string    `json:"name" example:"Tarefa 1"`
	Description     string    `json:"description" example:"Descrição da tarefa 1"`
	Date            time.Time `json:"date" example:"2021-02-02"`
	Initials        string    `json:"initials" example:"vin" maxLength:"3"`
	hateoas.Hateoas `swaggerignore:"true"`
}

func FromJSONItem

func FromJSONItem(body io.Reader) (*Item, error)

func NewItem

func NewItem(id int, name string, description string, date time.Time, initials string) (*Item, error)

type ItemRepository

type ItemRepository interface {
	Create(date time.Time, description, name, initials string) (*Item, error)
	Update(id int, date time.Time, description, name, initials string) (*Item, error)
	Delete(id int) (*Item, error)
	Fetch(initials string) (*[]Item, error)
	GetByID(id int) (*Item, error)
}

type ItemService added in v1.0.1

type ItemService interface {
	CreateItem(response http.ResponseWriter, request *http.Request)
	UpdateItem(response http.ResponseWriter, request *http.Request)
	DeleteItem(response http.ResponseWriter, request *http.Request)
	GetItemByID(response http.ResponseWriter, request *http.Request)
	FetchItems(response http.ResponseWriter, request *http.Request)
}

type ItemUsecase

type ItemUsecase interface {
	Create(item Item) (*Item, error)
	Update(item Item) (*Item, error)
	Delete(id int) (*Item, error)
	Fetch(initials string) (*[]Item, error)
	GetByID(id int) (*Item, error)
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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