handlers

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapWith404ContentHandler

func WrapWith404ContentHandler(h http.Handler, content []byte) http.HandlerFunc

Types

type AdminHandler

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

func NewAdminHandler

func NewAdminHandler(repo *storage.ReadingRepository) *AdminHandler

func (*AdminHandler) ExportCsv

func (h *AdminHandler) ExportCsv(w http.ResponseWriter, r *http.Request)

func (*AdminHandler) GetBuildInfo

func (h *AdminHandler) GetBuildInfo(w http.ResponseWriter, r *http.Request)

func (*AdminHandler) ImportCsv

func (h *AdminHandler) ImportCsv(w http.ResponseWriter, r *http.Request)

type AggregationHandler

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

func NewAggregationHandler

func NewAggregationHandler(repo *storage.ReadingRepository) *AggregationHandler

func (*AggregationHandler) GetAggregationsMonth

func (h *AggregationHandler) GetAggregationsMonth(w http.ResponseWriter, r *http.Request)

func (*AggregationHandler) GetAggregationsYear

func (h *AggregationHandler) GetAggregationsYear(w http.ResponseWriter, r *http.Request)
type NavHandler struct {
	// contains filtered or unexported fields
}

func NewNavHandler

func NewNavHandler(configuration config.Config) *NavHandler
func (h *NavHandler) GetLabel(w http.ResponseWriter, r *http.Request)

type NotFoundRedirectRespWr

type NotFoundRedirectRespWr struct {
	http.ResponseWriter // We embed http.ResponseWriter
	// contains filtered or unexported fields
}

func (*NotFoundRedirectRespWr) Write

func (w *NotFoundRedirectRespWr) Write(p []byte) (int, error)

func (*NotFoundRedirectRespWr) WriteHeader

func (w *NotFoundRedirectRespWr) WriteHeader(status int)

type ReadingHandler

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

func NewReadingHandler

func NewReadingHandler(repo *storage.ReadingRepository, configuration config.Config) *ReadingHandler

func (*ReadingHandler) CreateReadings

func (h *ReadingHandler) CreateReadings(w http.ResponseWriter, r *http.Request)

func (*ReadingHandler) DeleteReading

func (h *ReadingHandler) DeleteReading(w http.ResponseWriter, r *http.Request)

func (*ReadingHandler) GetLastReadingDate

func (h *ReadingHandler) GetLastReadingDate(w http.ResponseWriter, r *http.Request)

func (*ReadingHandler) GetMeters

func (h *ReadingHandler) GetMeters(w http.ResponseWriter, r *http.Request)

func (*ReadingHandler) GetReadings

func (h *ReadingHandler) GetReadings(w http.ResponseWriter, r *http.Request)

func (*ReadingHandler) GetReadingsYears

func (h *ReadingHandler) GetReadingsYears(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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