categoryrepository

package
v0.0.0-...-71fa18b Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 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 CategoryRepository

type CategoryRepository struct {
	Model categorymodel.ICategoryModel
}

func New

func New() *CategoryRepository

New create a new instance

func (*CategoryRepository) Add

func (*CategoryRepository) GetAll

func (*CategoryRepository) GetByID

func (*CategoryRepository) GetByName

type ICategoryRepository

type ICategoryRepository interface {
	Add(ctx context.Context, category *entities.Category) (*entities.Category, *errors.CustomError)
	GetAll(ctx context.Context) (*[]entities.Category, *errors.CustomError)
	GetByName(ctx context.Context, name string) (*entities.Category, *errors.CustomError)
	GetByID(ctx context.Context, id int64) (*entities.Category, *errors.CustomError)
}

type Options

type Options struct {
	Sqlx *sqlx.DB
}

Jump to

Keyboard shortcuts

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