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 Address
- type BreakPoints
- type ConsumedEnergyPrice
- type Email
- type LogInFormData
- type MainMeterBillingCreateTmplData
- type MainMeterBillingFormData
- type MainMeterBillingListTmplData
- type MainMeterBillingPeriodFormData
- type MainMeterFormData
- type MainMeterID
- type MainMeterOverviewTmplData
- type MainMeterTmplData
- type MaxDayDiff
- type Password
- type Reading
- type ReadingValue
- 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) HandleGetMainMeterBillingCreate(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleGetMainMeterBillingList(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) 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) HandlePostMainMeterBillingCreate(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandlePostMainMeterCreate(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 ServicePrice
- type SignUpFormData
- type SubMeterCreateTmplData
- type SubMeterFormData
- type SubMeterID
- type SubMeterListTmplData
- type SubMeterOverviewTmplData
- type SubMeterReadingCreateTmplData
- type SubMeterReadingFormData
- type SubMeterReadingListTmplData
- type SubMeterTmplData
- type Time
- type Upper
- type Username
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 BreakPoints ¶
func (BreakPoints) Len ¶
func (bp BreakPoints) Len() int
func (BreakPoints) Less ¶
func (bp BreakPoints) Less(i, j int) bool
func (BreakPoints) Swap ¶
func (bp BreakPoints) Swap(i, j int)
type ConsumedEnergyPrice ¶
type ConsumedEnergyPrice float64
type LogInFormData ¶
type MainMeterBillingCreateTmplData ¶
type MainMeterBillingCreateTmplData struct {
MainMeterBillingFormData
Upper MainMeterTmplData
}
type MainMeterBillingFormData ¶
type MainMeterBillingFormData struct {
GeneralError string
MaxDayDiff string
MaxDayDiffError string
BillingPeriods []*MainMeterBillingPeriodFormData
}
func NewMainMeterBillingFormData ¶
func NewMainMeterBillingFormData() MainMeterBillingFormData
type MainMeterBillingListTmplData ¶
type MainMeterBillingListTmplData struct {
Upper MainMeterTmplData
}
type MainMeterBillingPeriodFormData ¶
type MainMeterBillingPeriodFormData struct {
BeginDate string
BeginDateError string
EndDate string
EndDateError string
BeginReadingValue string
BeginReadingValueError string
EndReadingValue string
EndReadingValueError string
ConsumedEnergyPrice string
ConsumedEnergyPriceError string
ServicePrice string
ServicePriceError string
}
type MainMeterFormData ¶
type MainMeterID ¶
type MainMeterID string
type MainMeterOverviewTmplData ¶
type MainMeterOverviewTmplData struct {
spinusdb.GetMainMeterRow
Upper MainMeterTmplData
}
type MainMeterTmplData ¶
type MainMeterTmplData struct {
ID int32
}
type MaxDayDiff ¶
type MaxDayDiff int32
type ReadingValue ¶
type ReadingValue float64
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) HandleGetMainMeterBillingCreate ¶
func (s *Server) HandleGetMainMeterBillingCreate(w http.ResponseWriter, r *http.Request)
func (*Server) HandleGetMainMeterBillingList ¶
func (s *Server) HandleGetMainMeterBillingList(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) 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) HandlePostMainMeterBillingCreate ¶
func (s *Server) HandlePostMainMeterBillingCreate(w http.ResponseWriter, r *http.Request)
func (*Server) HandlePostMainMeterCreate ¶
func (s *Server) HandlePostMainMeterCreate(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 ServicePrice ¶
type SignUpFormData ¶
type SubMeterCreateTmplData ¶
type SubMeterCreateTmplData struct {
SubMeterFormData
Upper MainMeterTmplData
}
type SubMeterFormData ¶
type SubMeterID ¶
type SubMeterID string
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.