refactor: rename iot client to stateless gateway

This commit is contained in:
2026-08-03 14:43:39 +08:00
parent 5edca1524f
commit aaede08f88
26 changed files with 92 additions and 111 deletions

View File

@@ -23,7 +23,7 @@ type PaymentAPIConfig struct {
}
type IoTAPIConfig struct {
PlatformBaseURL string `yaml:"PlatformBaseURL"`
ClientBaseURL string `yaml:"ClientBaseURL"`
GatewayBaseURL string `yaml:"GatewayBaseURL"`
Token string `yaml:"Token"`
IntervalMilliseconds int `yaml:"IntervalMilliseconds"`
}
@@ -37,7 +37,7 @@ func New(srvKey string) {
if Spec.PaymentAPI.BaseURL == "" || Spec.PaymentAPI.Token == "" || Spec.PaymentAPI.IntervalSeconds <= 0 {
panic("PaymentAPI configuration is required")
}
if Spec.IoTAPI.PlatformBaseURL == "" || Spec.IoTAPI.ClientBaseURL == "" || Spec.IoTAPI.Token == "" || Spec.IoTAPI.IntervalMilliseconds <= 0 {
if Spec.IoTAPI.PlatformBaseURL == "" || Spec.IoTAPI.GatewayBaseURL == "" || Spec.IoTAPI.Token == "" || Spec.IoTAPI.IntervalMilliseconds <= 0 {
panic("IoTAPI configuration is required")
}
conf.PrintInfo(Spec.Addr)