products

package
v0.0.0-...-8150c3c Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Products

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

func NewProducts

func NewProducts(l hclog.Logger, pdb *data.ProductsDB) *Products

NewProducts returns a new instance of Products

func (*Products) AddProducts

func (p *Products) AddProducts(rw http.ResponseWriter, r *http.Request)

AddProducts to the dataset

func (*Products) DeleteProduct

func (p *Products) DeleteProduct(rw http.ResponseWriter, r *http.Request)

func (*Products) GetProduct

func (p *Products) GetProduct(rw http.ResponseWriter, r *http.Request)

GetProduct returns a single product by its ID

func (*Products) GetProducts

func (p *Products) GetProducts(rw http.ResponseWriter, r *http.Request)

swagger: route GET /products prodects listProducts Returns the list of all products response: 200 GetProducts return the products in the data store

func (*Products) UpdateProduct

func (p *Products) UpdateProduct(rw http.ResponseWriter, r *http.Request)

UpdateProduct with new product passed in the reuqest body

Jump to

Keyboard shortcuts

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