product

package
v0.0.0-...-df9f0db Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProductDto

type ProductDto struct {
	ID          string  `json:"id"`
	Name        string  `json:"name"`
	Price       float32 `json:"price"`
	Description string  `json:"description"`
	Branch      string  `json:"branch"`
	Stars       int32   `json:"stars"`
	ProductCode string  `json:"productCode"`
	ImageUrl    string  `json:"imageUrl"`
}

func (*ProductDto) Validate

func (p *ProductDto) Validate() []val.ValidationError

type ProductService

type ProductService interface {
	CreateProduct(ProductDto) (p.Product, error)
	GetProduct(string) (p.Product, error)
	GetByProductCode(string) (p.Product, error)
	ListProducts() ([]p.Product, error)
	DeleteProduct(string) (int64, error)
}

func NewProductService

func NewProductService() ProductService

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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