handlers

package
v0.0.0-...-7cb54bc Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GzipMiddleWare

func GzipMiddleWare(next http.Handler) http.Handler

func ProductValidationMiddleWare

func ProductValidationMiddleWare(next http.Handler) http.Handler

Types

type File

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

func NewFiles

func NewFiles(s files.Storage, l *slog.Logger) *File

func (*File) FileMultiPart

func (f *File) FileMultiPart(w http.ResponseWriter, r *http.Request)

func (*File) FileUpload

func (f *File) FileUpload(w http.ResponseWriter, r *http.Request)

func (*File) GetFile

func (f *File) GetFile(w http.ResponseWriter, r *http.Request)

func (*File) InvalidURI

func (f *File) InvalidURI(url string, w http.ResponseWriter)

func (*File) Routes

func (f *File) Routes() chi.Router

type Goodbye

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

func NewGoodbye

func NewGoodbye(l *slog.Logger) *Goodbye

func (*Goodbye) ServeHTTP

func (g *Goodbye) ServeHTTP(w http.ResponseWriter, r *http.Request)

type GzipResponseWriter

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

func NewGzipResponseWriter

func NewGzipResponseWriter(rw http.ResponseWriter) *GzipResponseWriter

func (*GzipResponseWriter) Flush

func (grw *GzipResponseWriter) Flush()

func (*GzipResponseWriter) Header

func (grw *GzipResponseWriter) Header() http.Header

func (*GzipResponseWriter) Write

func (grw *GzipResponseWriter) Write(p []byte) (int, error)

func (*GzipResponseWriter) WriteHeader

func (grw *GzipResponseWriter) WriteHeader(statusCode int)

type Hello

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

func NewHello

func NewHello(l *slog.Logger) *Hello

func (*Hello) ServeHTTP

func (h *Hello) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ProductKey

type ProductKey struct{}

type Products

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

func NewProducts

func NewProducts(l *slog.Logger) *Products

func (*Products) AddProduct

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

func (*Products) GetProduct

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

func (*Products) Routes

func (p *Products) Routes() chi.Router

func (*Products) UpdateProduct

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

Jump to

Keyboard shortcuts

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