handlers

package
v0.0.0-...-0fc5d1f Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package classification Product Api.

Documentation for Product Api

Schemes: http BasePath: / Version: 1.0.0 License: BSD-3

Consumes: - application/json

Produces: - application/json swagger:meta

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProductHandler

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

func NewProducts

func NewProducts(l *log.Logger, c *protos.CurrencyClient) *ProductHandler

func (ProductHandler) AddProduct

func (p ProductHandler) AddProduct(w http.ResponseWriter, r *http.Request)

AddProduct adds a new product into the dataStore

func (ProductHandler) DeleteProduct

func (p ProductHandler) DeleteProduct(w http.ResponseWriter, r *http.Request)

DeleteProduct deletes a product from database

func (ProductHandler) GetProducts

func (p ProductHandler) GetProducts(w http.ResponseWriter, r *http.Request)

GetProducts returns all Products in the API

func (ProductHandler) MiddlewareProductValidator

func (p ProductHandler) MiddlewareProductValidator(next http.Handler) http.Handler

func (ProductHandler) UpdateProduct

func (p ProductHandler) UpdateProduct(w http.ResponseWriter, r *http.Request)

UpdateProduct updates a product in database

type ProductIDParameterWrapper

type ProductIDParameterWrapper struct {
	// ID of product to delete from dataStrore
	// in: path
	// required: true
	ID int `json:"id"`
}

swagger:parameters deleteProduct updateProduct

type ProductKey

type ProductKey struct{}

type ProductsNoContentWrapper

type ProductsNoContentWrapper struct {
}

Jump to

Keyboard shortcuts

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