Documentation
¶
Index ¶
- func NewSqlite3DB(cfg Config) (*sqlx.DB, error)
- type Auth
- type Authorizer
- 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 Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
Auth - Auth
func (*Auth) CreateUser ¶
CreateUser - create user
type Authorizer ¶
type Authorizer interface { CreateUser(ctx context.Context, input domain.SignUpInput) error GetByCredentials(ctx context.Context, email, password string) (domain.User, error) }
Producter - auth contract
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.