product

package
v0.0.0-...-f80c191 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(store types.ProductStore, userStore types.UserStore) *Handler

func (*Handler) RegisterRoutes

func (h *Handler) RegisterRoutes(router *mux.Router)

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(db *sql.DB) *Store

func (*Store) CreateProduct

func (s *Store) CreateProduct(product types.CreateProductRequest) (int, error)

func (*Store) GetProductByID

func (s *Store) GetProductByID(id int) (*types.Product, error)

func (*Store) GetProducts

func (s *Store) GetProducts() ([]types.Product, error)

func (*Store) GetProductsByID

func (s *Store) GetProductsByID(productIDs []int) ([]types.Product, error)

func (*Store) UpdateProduct

func (s *Store) UpdateProduct(product types.Product) error

Jump to

Keyboard shortcuts

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