Documentation ¶
Index ¶
- func New(repo Repository, imageCache *ImageCache, logger *slog.Logger) http.Handler
- func PlotHandler(logger *slog.Logger) http.Handler
- func PlotterHandler(repository Repository, plotter Plotter, logger *slog.Logger) http.Handler
- func ReportHandler(logger *slog.Logger) http.Handler
- type ImageCache
- type Plotter
- type RedisClient
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶ added in v0.11.0
func New(repo Repository, imageCache *ImageCache, logger *slog.Logger) http.Handler
func PlotterHandler ¶ added in v0.11.1
Types ¶
type ImageCache ¶ added in v0.12.0
type ImageCache struct { Namespace string Rounding time.Duration TTL time.Duration Client RedisClient }
func (*ImageCache) Middleware ¶ added in v0.12.0
type Plotter ¶ added in v0.11.1
type Plotter interface {
Plot(repository.Measurements, bool) (*vgimg.PngCanvas, error)
}
type RedisClient ¶ added in v0.12.0
type Repository ¶ added in v0.11.1
type Repository interface {
Get(from, to time.Time) (repository.Measurements, error)
}
Click to show internal directories.
Click to hide internal directories.