Documentation ¶
Index ¶
- Variables
- func New(repo Repository, imageCache *ImageCache, logger *slog.Logger) http.Handler
- func PlotHandler(logger *slog.Logger) http.Handler
- func PlotterHandler(repository Repository, plotter string, logger *slog.Logger) http.Handler
- func ReportHandler(repo Repository, logger *slog.Logger) http.Handler
- type ImageCache
- type RedisClient
- type Repository
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultXYZConfig = plotters.XYZConfig{ Title: "Report", X: "time", XTicker: "2006-01-02\n15:04:05", Y: "solar intensity (%)", Width: 800, Height: 600, Ranges: []float64{0, 500, 1000, 1500, 2000, 2500, 3000, 3500, 4000}, ColorMap: moreland.SmoothBlueRed(), }
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
func ReportHandler ¶ added in v0.11.1
func ReportHandler(repo Repository, logger *slog.Logger) http.Handler
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 RedisClient ¶ added in v0.12.0
type Repository ¶ added in v0.11.1
type Repository interface { Get(from, to time.Time) (repository.Measurements, error) GetDataRange() (time.Time, time.Time, error) }
Click to show internal directories.
Click to hide internal directories.