Documentation
¶
Index ¶
- func New(conn database.DB) domain.ShopRepository
- type ShopRepository
- func (sr *ShopRepository) GetAll(ctx context.Context, page, limit int, name string) ([]domain.Shop, error)
- func (sr *ShopRepository) GetByID(ctx context.Context, id uint) (*domain.Shop, error)
- func (sr *ShopRepository) GetUserShop(ctx context.Context, userID uint) (*domain.Shop, error)
- func (sr *ShopRepository) Update(ctx context.Context, shop *domain.Shop) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ShopRepository ¶
type ShopRepository struct {
// contains filtered or unexported fields
}
ShopRepository is a struct that implements ShopRepository interface.
func (*ShopRepository) GetAll ¶
func (sr *ShopRepository) GetAll(ctx context.Context, page, limit int, name string) ([]domain.Shop, error)
GetAll returns all Shops.
func (*ShopRepository) GetUserShop ¶
GetUserShop returns the Shop with the specified User ID.
Click to show internal directories.
Click to hide internal directories.