service

package
v0.0.0-...-d691187 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CategoryService

type CategoryService interface {
	Create(req domain.Category) (*web.CategoryCreated, error)
	GetCategoryBySearch(page int, perPage int, search string, buf bytes.Buffer) (map[string]interface{}, error)
}

func NewCategoryService

func NewCategoryService(repo repository.CategoryRepository, validate middleware.ValidationInterface, es *elasticsearch.Client, trace trace.Tracer, meter metric.MeterProvider) CategoryService

type OrderService

type OrderService interface {
	AddToCart(req domain.Cart) (*web.Cart, error)
	FindID(uuid string) (*web.OrderResponse, error)
	History(userID uint, page int, perPage int) (*web.Pagination, error)
	Buy(req domain.Order) (*web.BuyResponse, error)
	Pay(uuid string, userID uint) (*web.PaymentResponse, error)
	Checkout(id uint) (*web.BuyResponse, error)
	Cart(userID uint, page int, perPage int) (*web.Pagination, error)
}

type ProductService

type ProductService interface {
	Create(req domain.ProductRequest) (*web.ProductResponse, error)
	FindID(id uint) (*web.ProductResponse, error)
	FindAll(page int, perPage int) (*web.Pagination, error)
	FindAllByCategoryID(categoryID uint, page int, perPage int) (*web.Pagination, error)
	GetProductBySearch(page int, perPage int, search string, buf bytes.Buffer) (map[string]interface{}, error)
}

func NewProductService

func NewProductService(repo repository.ProductRepository, validation middleware.ValidationInterface, es *elasticsearch.Client, trace trace.Tracer, meter metric.MeterProvider) ProductService

type UserService

type UserService interface {
	Register(req domain.UserRequest) (*web.UserRegister, error)
	Login(req domain.UserLogin) (*web.UserLogin, error)
}

Jump to

Keyboard shortcuts

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