services

package
v0.0.0-...-bd14a77 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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) GetSingle

func (ts *TaskService) GetSingle(ctx context.Context, id int) (*repo.TaskModel, error)

GetSingle ...

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 ...

Jump to

Keyboard shortcuts

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