repository

package
v0.0.0-...-400441b Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(conn database.DB) domain.ShopRepository

New creates a new ShopRepository instance.

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) GetByID

func (sr *ShopRepository) GetByID(ctx context.Context, id uint) (*domain.Shop, error)

GetByID returns the Shop with the specified ID.

func (*ShopRepository) GetUserShop

func (sr *ShopRepository) GetUserShop(ctx context.Context, userID uint) (*domain.Shop, error)

GetUserShop returns the Shop with the specified User ID.

func (*ShopRepository) Update

func (sr *ShopRepository) Update(ctx context.Context, shop *domain.Shop) error

Update updates the Shop with the specified ID.

Jump to

Keyboard shortcuts

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