Documentation ¶
Index ¶
- func GetMainMeter(ctx context.Context) (spinusdb.GetMainMeterRow, bool)
- func GetSubMeter(ctx context.Context) (spinusdb.GetSubMeterRow, bool)
- func UserID(ctx context.Context) (int32, bool)
- func WithCacheControl(h http.Handler, maxAge int) http.Handler
- type LogInFormData
- type MainMeterFormData
- type MainMeterOverviewTmplData
- type MainMeterReadingCreateTmplData
- type MainMeterReadingFormData
- type MainMeterReadingListTmplData
- type MainMeterTmplData
- type Server
- func (s *Server) Close() error
- func (s *Server) HandleForbidden(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleGetIndex(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleGetLogIn(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleGetMainMeterCreate(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleGetMainMeterList(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleGetMainMeterOverview(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleGetMainMeterReadingCreate(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleGetMainMeterReadingList(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleGetSignUp(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleGetSubMeterCreate(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleGetSubMeterList(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleGetSubMeterOverview(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleGetSubMeterReadingCreate(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleGetSubMeterReadingList(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleInternalServerError(w http.ResponseWriter, r *http.Request, err error)
- func (s *Server) HandleNotAllowed(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleNotFound(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandlePostLogIn(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandlePostLogOut(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandlePostMainMeterCreate(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandlePostMainMeterReadingCreate(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandlePostSignUp(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandlePostSubMeterCreate(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandlePostSubMeterReadingCreate(w http.ResponseWriter, r *http.Request)
- func (s *Server) ListenAndServe() error
- func (s *Server) Shutdown(ctx context.Context) error
- func (s *Server) WithMainMeter(h http.Handler) http.Handler
- func (s *Server) WithRequiredLogin(h http.Handler) http.Handler
- func (s *Server) WithSubMeter(h http.Handler) http.Handler
- func (s *Server) WithUserID(h http.Handler) http.Handler
- type SignUpFormData
- type SubMeterCreateTmplData
- type SubMeterFormData
- type SubMeterListTmplData
- type SubMeterOverviewTmplData
- type SubMeterReadingCreateTmplData
- type SubMeterReadingFormData
- type SubMeterReadingListTmplData
- type SubMeterTmplData
- type Upper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMainMeter ¶
func GetMainMeter(ctx context.Context) (spinusdb.GetMainMeterRow, bool)
func GetSubMeter ¶
func GetSubMeter(ctx context.Context) (spinusdb.GetSubMeterRow, bool)
Types ¶
type LogInFormData ¶
type MainMeterFormData ¶
type MainMeterOverviewTmplData ¶
type MainMeterOverviewTmplData struct { spinusdb.GetMainMeterRow Upper MainMeterTmplData }
type MainMeterReadingCreateTmplData ¶
type MainMeterReadingCreateTmplData struct { MainMeterReadingFormData Upper MainMeterTmplData }
type MainMeterReadingListTmplData ¶
type MainMeterReadingListTmplData struct { MainMeterReadings []spinusdb.MainMeterReading Upper MainMeterTmplData }
type MainMeterTmplData ¶
type MainMeterTmplData struct {
ID int32
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) HandleForbidden ¶
func (s *Server) HandleForbidden(w http.ResponseWriter, r *http.Request)
func (*Server) HandleGetIndex ¶
func (s *Server) HandleGetIndex(w http.ResponseWriter, r *http.Request)
func (*Server) HandleGetLogIn ¶
func (s *Server) HandleGetLogIn(w http.ResponseWriter, r *http.Request)
func (*Server) HandleGetMainMeterCreate ¶
func (s *Server) HandleGetMainMeterCreate(w http.ResponseWriter, r *http.Request)
func (*Server) HandleGetMainMeterList ¶
func (s *Server) HandleGetMainMeterList(w http.ResponseWriter, r *http.Request)
func (*Server) HandleGetMainMeterOverview ¶
func (s *Server) HandleGetMainMeterOverview(w http.ResponseWriter, r *http.Request)
func (*Server) HandleGetMainMeterReadingCreate ¶
func (s *Server) HandleGetMainMeterReadingCreate(w http.ResponseWriter, r *http.Request)
func (*Server) HandleGetMainMeterReadingList ¶
func (s *Server) HandleGetMainMeterReadingList(w http.ResponseWriter, r *http.Request)
func (*Server) HandleGetSignUp ¶
func (s *Server) HandleGetSignUp(w http.ResponseWriter, r *http.Request)
func (*Server) HandleGetSubMeterCreate ¶
func (s *Server) HandleGetSubMeterCreate(w http.ResponseWriter, r *http.Request)
func (*Server) HandleGetSubMeterList ¶
func (s *Server) HandleGetSubMeterList(w http.ResponseWriter, r *http.Request)
func (*Server) HandleGetSubMeterOverview ¶
func (s *Server) HandleGetSubMeterOverview(w http.ResponseWriter, r *http.Request)
func (*Server) HandleGetSubMeterReadingCreate ¶
func (s *Server) HandleGetSubMeterReadingCreate(w http.ResponseWriter, r *http.Request)
func (*Server) HandleGetSubMeterReadingList ¶
func (s *Server) HandleGetSubMeterReadingList(w http.ResponseWriter, r *http.Request)
func (*Server) HandleInternalServerError ¶
func (*Server) HandleNotAllowed ¶
func (s *Server) HandleNotAllowed(w http.ResponseWriter, r *http.Request)
func (*Server) HandleNotFound ¶
func (s *Server) HandleNotFound(w http.ResponseWriter, r *http.Request)
func (*Server) HandlePostLogIn ¶
func (s *Server) HandlePostLogIn(w http.ResponseWriter, r *http.Request)
func (*Server) HandlePostLogOut ¶
func (s *Server) HandlePostLogOut(w http.ResponseWriter, r *http.Request)
func (*Server) HandlePostMainMeterCreate ¶
func (s *Server) HandlePostMainMeterCreate(w http.ResponseWriter, r *http.Request)
func (*Server) HandlePostMainMeterReadingCreate ¶
func (s *Server) HandlePostMainMeterReadingCreate(w http.ResponseWriter, r *http.Request)
func (*Server) HandlePostSignUp ¶
func (s *Server) HandlePostSignUp(w http.ResponseWriter, r *http.Request)
func (*Server) HandlePostSubMeterCreate ¶
func (s *Server) HandlePostSubMeterCreate(w http.ResponseWriter, r *http.Request)
func (*Server) HandlePostSubMeterReadingCreate ¶
func (s *Server) HandlePostSubMeterReadingCreate(w http.ResponseWriter, r *http.Request)
func (*Server) ListenAndServe ¶
type SignUpFormData ¶
type SubMeterCreateTmplData ¶
type SubMeterCreateTmplData struct { SubMeterFormData Upper MainMeterTmplData }
type SubMeterFormData ¶
type SubMeterListTmplData ¶
type SubMeterListTmplData struct { SubMeters []spinusdb.ListSubMetersRow Upper MainMeterTmplData }
type SubMeterOverviewTmplData ¶
type SubMeterOverviewTmplData struct { spinusdb.GetSubMeterRow Upper SubMeterTmplData }
type SubMeterReadingCreateTmplData ¶
type SubMeterReadingCreateTmplData struct { SubMeterReadingFormData Upper SubMeterTmplData }
type SubMeterReadingFormData ¶
type SubMeterReadingListTmplData ¶
type SubMeterReadingListTmplData struct { SubMeterReadings []spinusdb.SubMeterReading Upper SubMeterTmplData }
type SubMeterTmplData ¶
Click to show internal directories.
Click to hide internal directories.