Documentation
¶
Index ¶
- Variables
- type ProductService
- func (ps *ProductService) CreateProduct(ctx context.Context, data *entities_pb.ProductInfo) (*repo.ProductModel, error)
- func (ps *ProductService) GetProduct(ctx context.Context, id int) (*repo.ProductModel, error)
- func (ps *ProductService) GetProducts(ctx context.Context, limit int, page int, ids []uint64) ([]*repo.ProductModel, error)
- func (ps *ProductService) Transform(input []*repo.ProductModel) []*entities_pb.ProductInfo
- func (ps *ProductService) TransformSingle(prod *repo.ProductModel) *entities_pb.ProductInfo
- type ProductServiceInterface
- type TaskService
- func (ts *TaskService) Create(ctx context.Context, data *entities_pb.TaskInfo) (*repo.TaskModel, error)
- func (ts *TaskService) GetList(ctx context.Context, limit int, page int, ids []uint64) ([]*repo.TaskModel, error)
- func (ts *TaskService) GetSingle(ctx context.Context, id int) (*repo.TaskModel, error)
- func (ts *TaskService) Transform(input []*repo.TaskModel) []*entities_pb.TaskInfo
- func (ts *TaskService) TransformSingle(task *repo.TaskModel) *entities_pb.TaskInfo
- type TaskServiceInterface
Constants ¶
This section is empty.
Variables ¶
View Source
var GraphSet = wire.NewSet( ProductProvider, wire.Bind(new(ProductServiceInterface), new(*ProductService)), TaskProvider, wire.Bind(new(TaskServiceInterface), new(*TaskService)), )
GraphSet ...
Functions ¶
This section is empty.
Types ¶
type ProductService ¶
type ProductService struct {
// contains filtered or unexported fields
}
ProductService ...
func ProductProvider ¶
func ProductProvider( productRepo repo.ProductRepoInterface, cacheRepo cache.CacheInteface, ) *ProductService
ProductProvider ...
func (*ProductService) CreateProduct ¶
func (ps *ProductService) CreateProduct(ctx context.Context, data *entities_pb.ProductInfo) (*repo.ProductModel, error)
CreateProduct ...
func (*ProductService) GetProduct ¶
func (ps *ProductService) GetProduct(ctx context.Context, id int) (*repo.ProductModel, error)
GetProduct ...
func (*ProductService) GetProducts ¶
func (ps *ProductService) GetProducts(ctx context.Context, limit int, page int, ids []uint64) ([]*repo.ProductModel, error)
GetProducts ...
func (*ProductService) Transform ¶
func (ps *ProductService) Transform(input []*repo.ProductModel) []*entities_pb.ProductInfo
Transform ...
func (*ProductService) TransformSingle ¶
func (ps *ProductService) TransformSingle(prod *repo.ProductModel) *entities_pb.ProductInfo
TransformSingle ...
type ProductServiceInterface ¶
type ProductServiceInterface interface {
GetProducts(ctx context.Context, limit int, page int, ids []uint64) ([]*repo.ProductModel, error)
GetProduct(ctx context.Context, id int) (*repo.ProductModel, error)
CreateProduct(ctx context.Context, data *entities_pb.ProductInfo) (*repo.ProductModel, error)
Transform(input []*repo.ProductModel) []*entities_pb.ProductInfo
TransformSingle(prod *repo.ProductModel) *entities_pb.ProductInfo
}
ProductServiceInterface ...
type TaskService ¶
type TaskService struct {
// contains filtered or unexported fields
}
TaskService ...
func TaskProvider ¶
func TaskProvider( taskRepo repo.TaskRepoInterface, cacheRepo cache.CacheInteface, ) *TaskService
TaskProvider ...
func (*TaskService) Create ¶
func (ts *TaskService) Create(ctx context.Context, data *entities_pb.TaskInfo) (*repo.TaskModel, error)
Create ...
func (*TaskService) GetList ¶
func (ts *TaskService) GetList(ctx context.Context, limit int, page int, ids []uint64) ([]*repo.TaskModel, error)
GetList ...
func (*TaskService) Transform ¶
func (ts *TaskService) Transform(input []*repo.TaskModel) []*entities_pb.TaskInfo
Transform ...
func (*TaskService) TransformSingle ¶
func (ts *TaskService) TransformSingle(task *repo.TaskModel) *entities_pb.TaskInfo
TransformSingle ...
type TaskServiceInterface ¶
type TaskServiceInterface interface {
GetList(ctx context.Context, limit int, page int, ids []uint64) ([]*repo.TaskModel, error)
GetSingle(ctx context.Context, id int) (*repo.TaskModel, error)
Create(ctx context.Context, data *entities_pb.TaskInfo) (*repo.TaskModel, error)
Transform(input []*repo.TaskModel) []*entities_pb.TaskInfo
TransformSingle(prod *repo.TaskModel) *entities_pb.TaskInfo
}
TaskServiceInterface ...
Click to show internal directories.
Click to hide internal directories.