handlers

package
v0.0.0-...-e26ef75 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidProductPath = fmt.Errorf("Invalid Path, path should be /products/[id]")

ErrInvalidProductPath error message

Functions

This section is empty.

Types

type Products

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

Products handler for getting and updating products

func NewProducts

func NewProducts(l *log.Logger) *Products

NewProducts returns a new products handler with the given logger

func (*Products) ServeHTTP

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

ServeHTTP implements the http.Handler interface

Jump to

Keyboard shortcuts

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