mysql

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: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//ProductKafkaTopic ...
	ProductKafkaTopic = "yuuxxq8y-product"

	//TaskKafkaTopic ...
	TaskKafkaTopic = "yuuxxq8y-task"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ProductMySQLRepo

type ProductMySQLRepo struct {
	// contains filtered or unexported fields
}

ProductMySQLRepo ...

func NewProductMySQLRepo

func NewProductMySQLRepo(
	db *infra.ConnPool,
) *ProductMySQLRepo

NewProductMySQLRepo ...

func (*ProductMySQLRepo) Create

func (p *ProductMySQLRepo) Create(ctx context.Context, data *entities_pb.ProductInfo) (productDAO *repo.ProductModel, err error)

Create ...

func (*ProductMySQLRepo) Find

func (p *ProductMySQLRepo) Find(ctx context.Context, id int) (productDAO *repo.ProductModel, err error)

Find ...

func (*ProductMySQLRepo) Get

func (p *ProductMySQLRepo) Get(ctx context.Context, limit int, page int, ids []uint64) (productDAO []*repo.ProductModel, err error)

Get ...

func (*ProductMySQLRepo) Update

func (p *ProductMySQLRepo) Update(ctx context.Context, product *repo.ProductModel) (err error)

Update ...

type TaskMySQLRepo

type TaskMySQLRepo struct {
	// contains filtered or unexported fields
}

TaskMySQLRepo ...

func NewTaskMySQLRepo

func NewTaskMySQLRepo(
	db *infra.ConnPool,
) *TaskMySQLRepo

NewTaskMySQLRepo ...

func (*TaskMySQLRepo) Create

func (t *TaskMySQLRepo) Create(ctx context.Context, data *entities_pb.TaskInfo) (taskDAO *repo.TaskModel, err error)

Create Task

func (*TaskMySQLRepo) Find

func (t *TaskMySQLRepo) Find(ctx context.Context, id int) (taskDAO *repo.TaskModel, err error)

Find ...

func (*TaskMySQLRepo) Get

func (t *TaskMySQLRepo) Get(ctx context.Context, limit int, page int, ids []uint64) (taskDAO []*repo.TaskModel, err error)

Get Task

func (*TaskMySQLRepo) Update

func (t *TaskMySQLRepo) Update(ctx context.Context, task *repo.TaskModel) (err error)

Update Task

Jump to

Keyboard shortcuts

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