Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
EnvFile = ".env"
)
Functions ¶
Types ¶
type AppConfig ¶
type AppConfig struct { Server struct { Host string `envconfig:"SERVER_HOST"` Port string `envconfig:"SERVER_PORT" default:"8080"` TlsPort string `envconfig:"SERVER_TLS_PORT" default:"8443"` GracefulShutdownTime int `envconfig:"GRACEFUL_SHUTDOWN_TIME" default:"10"` UseTls bool `envconfig:"USE_TLS" default:"false"` CertFile string `envconfig:"CERT_FILE" default:"./cert/cert.pem"` KeyFile string `envconfig:"KEY_FILE" default:"./cert/cert.key"` } Gin struct { Mode string `envconfig:"GIN_MODE" default:"release"` TemplatePath string `envconfig:"TEMPLATE_PATH" default:"./templates/"` } ShellyEM3 struct { Host string `envconfig:"SHELLY_HOST"` User string `envconfig:"SHELLY_USER"` Password string `envconfig:"SHELLY_PASS"` UseBasicAuth bool `envconfig:"SHELLY_USE_BASIC_AUTH" default:"false"` IntervalSec int `envconfig:"SHELLY_INTERVAL_SEC" default:"1"` } Metrics struct { VoltageGauge prometheus.GaugeVec CurrentGauge prometheus.GaugeVec ActivePowerGauge prometheus.GaugeVec ApparentPowerGauge prometheus.GaugeVec PowerFactorGauge prometheus.GaugeVec FrequencyGauge prometheus.GaugeVec } RunTime struct { Router *gin.Engine ListenAddr string StartDate time.Time RunShellyPoll bool ShellyCurrentData domain.ShellyData } }
Click to show internal directories.
Click to hide internal directories.