repo

package
v0.0.0-...-f0a364e Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomerRepo

type CustomerRepo interface {
	Create(*model.Customer) (*model.Customer, error)
	Find(uint) (*model.Customer, error)
	Delete(uint) (bool, error)
	Update(uint, request.CustomerUpdateInfo) (*model.Customer, error)
}

type CustomerRepoImpl

type CustomerRepoImpl struct {
	DB *gorm.DB
}

func (CustomerRepoImpl) Create

func (customerRepo CustomerRepoImpl) Create(customer *model.Customer) (*model.Customer, error)

Add a customer

func (CustomerRepoImpl) Delete

func (customerRepo CustomerRepoImpl) Delete(id uint) (bool, error)

Delete a customer

func (CustomerRepoImpl) Find

func (customerRepo CustomerRepoImpl) Find(id uint) (*model.Customer, error)

Find a customer

func (CustomerRepoImpl) Update

func (customerRepo CustomerRepoImpl) Update(id uint, info request.CustomerUpdateInfo) (*model.Customer, error)

Update a customer

type ProductRepo

type ProductRepo interface {
	Find(uint) (*model.Product, error)
	GetInfo(uint) (response.ProductInfo, error)
}

type ProductRepoImpl

type ProductRepoImpl struct {
	DB *gorm.DB
}

func (ProductRepoImpl) Find

func (productRepo ProductRepoImpl) Find(id uint) (*model.Product, error)

Find Product

func (ProductRepoImpl) GetInfo

func (productRepo ProductRepoImpl) GetInfo(id uint) (response.ProductInfo, error)

Get Product Info

Jump to

Keyboard shortcuts

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