fix: harden real backend workflows and channel connections
This commit is contained in:
@@ -7,10 +7,11 @@ const SchemaVersion = "v1"
|
||||
type MessageType string
|
||||
|
||||
const (
|
||||
MessageTypeSubmitCommand MessageType = "SubmitCommand"
|
||||
MessageTypeSubmitResult MessageType = "SubmitResult"
|
||||
MessageTypeReceiptEvent MessageType = "ReceiptEvent"
|
||||
MessageTypeUplinkEvent MessageType = "UplinkEvent"
|
||||
MessageTypeSubmitCommand MessageType = "SubmitCommand"
|
||||
MessageTypeSubmitResult MessageType = "SubmitResult"
|
||||
MessageTypeReceiptEvent MessageType = "ReceiptEvent"
|
||||
MessageTypeUplinkEvent MessageType = "UplinkEvent"
|
||||
MessageTypeConnectChannel MessageType = "ConnectChannel"
|
||||
)
|
||||
|
||||
type Envelope struct {
|
||||
@@ -88,3 +89,27 @@ type UplinkEvent struct {
|
||||
Content string `json:"content"`
|
||||
ReceivedAt time.Time `json:"receivedAt"`
|
||||
}
|
||||
|
||||
type ConnectChannelCommand struct {
|
||||
SchemaVersion string `json:"schemaVersion"`
|
||||
MessageType MessageType `json:"messageType"`
|
||||
TraceID string `json:"traceId"`
|
||||
ChannelID string `json:"channelId"`
|
||||
ConnectionID string `json:"connectionId"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
Reason string `json:"reason"`
|
||||
DesiredConnections int `json:"desiredConnections"`
|
||||
Channel ConnectChannelConfig `json:"channel"`
|
||||
}
|
||||
|
||||
type ConnectChannelConfig struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
GatewayHost string `json:"gatewayHost"`
|
||||
GatewayPort int `json:"gatewayPort"`
|
||||
Account string `json:"account"`
|
||||
PasswordCipher string `json:"passwordCipher"`
|
||||
SrcID string `json:"srcId"`
|
||||
CMPPVersion string `json:"cmppVersion"`
|
||||
RateLimitPerSecond int `json:"rateLimitPerSecond"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user