contract

package
v0.0.0-...-8054c29 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 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 CategoryRepository

type CategoryRepository interface {
	GetById(id int) (*entity.Category, error)
}

type CategoryUseCase

type CategoryUseCase interface {
	GetById(id int) (*entity.Category, error)
}

type ClientRepository

type ClientRepository interface {
	Create(client entity.Client) (entity.Client, error)
	GetClientById(id *int) (*entity.Client, error)
	GetClientByCpf(cpf int) (*entity.Client, error)
	GetAlreadyExists(cpf int, email string) (*entity.Client, error)
}

type ClientUseCase

type ClientUseCase interface {
	GetClientByCpf(cpf int) (*entity.Client, error)
	GetClientById(id *int) (*entity.Client, error)
	Create(client entity.Client) (*entity.Client, error)
	GetAlreadyExists(cpf int, email string) (*entity.Client, error)
}

type OrderRepository

type OrderRepository interface {
	Create(order entity.Order) (entity.Order, error)
	GetAll() ([]entity.Order, error)
	GetById(id int) (*entity.Order, error)
	UpdateStatusById(id int, status enum.StatusOrder) error
}

type OrderUseCase

type OrderUseCase interface {
	Create(order entity.Order, products []*entity.Product) (*entity.Order, error)
	GetAll() (*[]entity.Order, error)
	GetById(id int) (*entity.Order, error)
	UpdateStatusById(id int, status enum.StatusOrder) error
}

type PaymentRepository

type PaymentRepository interface {
	Create(payment entity.Payment) (entity.Payment, error)
	GetLastPaymentStatus(orderId int) (*entity.Payment, error)
}

type PaymentUseCase

type PaymentUseCase interface {
	Create(payment *entity.Payment) error
	CreateQRCode(order *entity.Order) (*response_payment_service.CreateQRCode, error)
	GetLastPaymentStatus(orderId int) (enum.PaymentStatus, error)
	PaymentNotification(order *entity.Order) error
}

type ProductRepository

type ProductRepository interface {
	Create(product entity.Product) (entity.Product, error)
	Update(product entity.Product) (*entity.Product, error)
	Delete(id int) error
	GetProductByCategory(categoryId int) ([]entity.Product, error)
	GetById(id int) (*entity.Product, error)
}

type ProductUseCase

type ProductUseCase interface {
	Create(product entity.Product) (*entity.Product, error)
	Update(product entity.Product, id int) (*entity.Product, error)
	Delete(id int) error
	GetProductByCategory(categoryId int) ([]entity.Product, error)
	GetById(int int) (*entity.Product, error)
}

type QueueService

type QueueService interface {
	ReceiveMessage(queueUrl string) (*types.Message, error)
	DeleteMessage(queueURL string, receiptHandle string) error
	SendMessage(queueUrl string, message string, messageGroupId string) error
}

Directories

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

Jump to

Keyboard shortcuts

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