Documentation ¶
Index ¶
- type Models
- type Products
- type ProductsTable
- func (p *ProductsTable) Create(ctx context.Context, product *structure.Product) error
- func (p *ProductsTable) DeleteByID(ctx context.Context, id int) error
- func (p *ProductsTable) GetAll(ctx context.Context) ([]structure.Product, error)
- func (p *ProductsTable) GetByID(ctx context.Context, id int) (*structure.Product, error)
- func (p *ProductsTable) UpdateByID(ctx context.Context, id int, product *structure.Product) error
- type Users
- type UsersTable
- func (u *UsersTable) Create(ctx context.Context, data *structure.User) error
- func (u *UsersTable) DeleteByID(ctx context.Context, id int) error
- func (u *UsersTable) GetAll(ctx context.Context, pagination *structure.GetAllUsersRequest) ([]structure.User, int, error)
- func (u *UsersTable) GetByID(ctx context.Context, id int) (*structure.User, error)
- func (u *UsersTable) GetByUsername(ctx context.Context, username string) (*structure.User, error)
- func (u *UsersTable) UpdateByID(ctx context.Context, id int, user *structure.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Products ¶
type Products interface { Create(ctx context.Context, product *structure.Product) error GetByID(ctx context.Context, id int) (*structure.Product, error) GetAll(ctx context.Context) ([]structure.Product, error) UpdateByID(ctx context.Context, id int, product *structure.Product) error DeleteByID(ctx context.Context, id int) error }
type ProductsTable ¶
func (*ProductsTable) DeleteByID ¶
func (p *ProductsTable) DeleteByID(ctx context.Context, id int) error
func (*ProductsTable) UpdateByID ¶
type Users ¶
type Users interface { Create(ctx context.Context, user *structure.User) error GetByID(ctx context.Context, id int) (*structure.User, error) GetByUsername(ctx context.Context, username string) (*structure.User, error) GetAll(ctx context.Context, pagination *structure.GetAllUsersRequest) ([]structure.User, int, error) UpdateByID(ctx context.Context, id int, user *structure.User) error DeleteByID(ctx context.Context, id int) error }
type UsersTable ¶
func (*UsersTable) DeleteByID ¶
func (u *UsersTable) DeleteByID(ctx context.Context, id int) error
func (*UsersTable) GetAll ¶
func (u *UsersTable) GetAll(ctx context.Context, pagination *structure.GetAllUsersRequest) ([]structure.User, int, error)
func (*UsersTable) GetByUsername ¶
func (*UsersTable) UpdateByID ¶
Click to show internal directories.
Click to hide internal directories.