Documentation ¶
Index ¶
- func NewSqlite3DB(cfg Config) (*sqlx.DB, error)
- type Config
- type Product
- func (p *Product) Create(ctx context.Context, product domain.Product) error
- func (p *Product) DeleteById(ctx context.Context, id int) error
- func (p *Product) GetAllProducts(ctx context.Context) ([]domain.Product, error)
- func (p *Product) UpdateById(ctx context.Context, id int, input domain.UpdateProductInput) error
- type Producter
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Product ¶
type Product struct {
// contains filtered or unexported fields
}
Product - product
func (*Product) DeleteById ¶
DeleteById - delete product
func (*Product) GetAllProducts ¶
GetAllProducts - getting all products in csv-file
func (*Product) UpdateById ¶
UpdateById - update product
type Producter ¶
type Producter interface { Create(ctx context.Context, product domain.Product) error UpdateById(ctx context.Context, id int, input domain.UpdateProductInput) error DeleteById(ctx context.Context, id int) error GetAllProducts(ctx context.Context) ([]domain.Product, error) }
Producter - repository contract
Click to show internal directories.
Click to hide internal directories.