Documentation
¶
Index ¶
- func NewConnection() (*gorm.DB, error)
- func NewGormProductRepository(db *gorm.DB) repositories.ProductRepository
- func NewGormSellerRepository(db *gorm.DB) repositories.SellerRepository
- type GormProductRepository
- func (repo *GormProductRepository) Create(product *entities.ValidatedProduct) (*entities.Product, error)
- func (repo *GormProductRepository) Delete(id uuid.UUID) error
- func (repo *GormProductRepository) FindAll() ([]*entities.Product, error)
- func (repo *GormProductRepository) FindById(id uuid.UUID) (*entities.Product, error)
- func (repo *GormProductRepository) Update(product *entities.ValidatedProduct) (*entities.Product, error)
- type GormSellerRepository
- func (repo *GormSellerRepository) Create(seller *entities.ValidatedSeller) (*entities.Seller, error)
- func (repo *GormSellerRepository) Delete(id uuid.UUID) error
- func (repo *GormSellerRepository) FindAll() ([]*entities.Seller, error)
- func (repo *GormSellerRepository) FindById(id uuid.UUID) (*entities.Seller, error)
- func (repo *GormSellerRepository) Update(seller *entities.ValidatedSeller) (*entities.Seller, error)
- type Product
- type Seller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConnection ¶
func NewGormProductRepository ¶
func NewGormProductRepository(db *gorm.DB) repositories.ProductRepository
func NewGormSellerRepository ¶
func NewGormSellerRepository(db *gorm.DB) repositories.SellerRepository
Types ¶
type GormProductRepository ¶
type GormProductRepository struct {
// contains filtered or unexported fields
}
func (*GormProductRepository) Create ¶
func (repo *GormProductRepository) Create(product *entities.ValidatedProduct) (*entities.Product, error)
func (*GormProductRepository) Delete ¶
func (repo *GormProductRepository) Delete(id uuid.UUID) error
func (*GormProductRepository) FindAll ¶
func (repo *GormProductRepository) FindAll() ([]*entities.Product, error)
func (*GormProductRepository) Update ¶
func (repo *GormProductRepository) Update(product *entities.ValidatedProduct) (*entities.Product, error)
type GormSellerRepository ¶
type GormSellerRepository struct {
// contains filtered or unexported fields
}
func (*GormSellerRepository) Create ¶
func (repo *GormSellerRepository) Create(seller *entities.ValidatedSeller) (*entities.Seller, error)
func (*GormSellerRepository) FindAll ¶
func (repo *GormSellerRepository) FindAll() ([]*entities.Seller, error)
func (*GormSellerRepository) Update ¶
func (repo *GormSellerRepository) Update(seller *entities.ValidatedSeller) (*entities.Seller, error)
Click to show internal directories.
Click to hide internal directories.