repo

package
v0.0.0-...-782ee41 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetTasksParam

type GetTasksParam struct {
	TaskId       int64
	UserId       int64
	OrderDueDate string
	Limit        int
	Offset       int
}

type GetUsersParam

type GetUsersParam struct {
	Cols   []string
	Limit  int
	Offset int
	UserId int64
	Email  string
}

type PostgresRepo

type PostgresRepo struct {
	DB     *sqlx.DB
	Config config.Config
}

func (PostgresRepo) CreateTask

func (r PostgresRepo) CreateTask(ctx context.Context, task *model.Task) (err error)

func (PostgresRepo) CreateUser

func (r PostgresRepo) CreateUser(ctx context.Context, user *model.User) (err error)

func (PostgresRepo) GetTasks

func (r PostgresRepo) GetTasks(ctx context.Context, param *GetTasksParam) (result []*model.Task, err error)

func (PostgresRepo) GetUsers

func (r PostgresRepo) GetUsers(ctx context.Context, param *GetUsersParam) (result []*model.User, err error)

func (PostgresRepo) UpdateTask

func (r PostgresRepo) UpdateTask(ctx context.Context, task *model.Task) (result *model.Task, err error)

func (PostgresRepo) UpdateUser

func (r PostgresRepo) UpdateUser(ctx context.Context, user *model.User) (result *model.User, err error)

type Repository

type Repository interface {
	CreateTask(ctx context.Context, task *model.Task) (err error)
	CreateUser(ctx context.Context, user *model.User) (err error)
	GetTasks(ctx context.Context, param *GetTasksParam) (result []*model.Task, err error)
	GetUsers(ctx context.Context, param *GetUsersParam) (result []*model.User, err error)
	UpdateTask(ctx context.Context, task *model.Task) (result *model.Task, err error)
	UpdateUser(ctx context.Context, user *model.User) (result *model.User, err error)
}

Directories

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

Jump to

Keyboard shortcuts

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