init: 1.0.0

This commit is contained in:
Chang lue Tsen
2025-04-25 12:08:29 +09:00
commit 8addcc584b
1031 changed files with 76472 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
package types
const (
// ForthwithGetCountry forthwith country get
ForthwithGetCountry = "forthwith:country:get"
)
type GetNodeCountry struct {
Protocol string `json:"protocol"`
ServerAddr string `json:"server_addr"`
}
+14
View File
@@ -0,0 +1,14 @@
package types
const (
// ForthwithSendEmail forthwith send email
ForthwithSendEmail = "forthwith:email:send"
)
type (
SendEmailPayload struct {
Email string `json:"to"`
Subject string `json:"subject"`
Content string `json:"content"`
}
)
+15
View File
@@ -0,0 +1,15 @@
package types
const (
DeferCloseOrder = "defer:order:close"
ForthwithActivateOrder = "forthwith:order:activate"
)
type (
DeferCloseOrderPayload struct {
OrderNo string `json:"order_no"`
}
ForthwithActivateOrderPayload struct {
OrderNo string `json:"order_no"`
}
)
+6
View File
@@ -0,0 +1,6 @@
package types
const (
SchedulerCheckSubscription = "scheduler:check:subscription"
SchedulerTotalServerData = "scheduler:total:server"
)
+39
View File
@@ -0,0 +1,39 @@
package types
const ForthwithTrafficStatistics = "forthwith:traffic:statistics"
type UserTraffic struct {
SID int64 `json:"uid"`
Upload int64 `json:"upload"`
Download int64 `json:"download"`
}
type TrafficStatistics struct {
ServerId int64 `json:"server_id"`
Logs []UserTraffic `json:"logs"`
}
type NodeStatus struct {
OnlineUsers []OnlineUser `json:"online_users"`
Status ServerStatus `json:"status"`
LastAt int64 `json:"last_at"`
}
type OnlineUser struct {
UID int64 `json:"uid"`
IP string `json:"ip"`
}
type ServerStatus struct {
Cpu float64 `json:"cpu"`
Mem float64 `json:"mem"`
Disk float64 `json:"disk"`
UpdatedAt int64 `json:"updated_at"`
}
type ServerTrafficCount struct {
ServerId int64 `json:"server_id"`
Name string `json:"name"`
Today int64 `json:"today"`
Yesterday int64 `json:"yesterday"`
}
+15
View File
@@ -0,0 +1,15 @@
package types
const (
// ForthwithSendEmail forthwith send email
ForthwithSendSms = "forthwith:sms:send"
)
type (
SendSmsPayload struct {
Type uint8 `json:"type"`
Telephone string `json:"telephone"`
TelephoneArea string `json:"area"`
Content string `json:"content"`
}
)