init
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
@@ -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"`
|
||||
}
|
||||
)
|
||||
@@ -0,0 +1,18 @@
|
||||
package types
|
||||
|
||||
const (
|
||||
DeferCloseOrder = "defer:order:close"
|
||||
ForthwithActivateOrder = "forthwith:order:activate"
|
||||
)
|
||||
|
||||
type (
|
||||
DeferCheckOrderLogic struct {
|
||||
OrderNo string `json:"order_no"`
|
||||
}
|
||||
DeferCloseOrderPayload struct {
|
||||
OrderNo string `json:"order_no"`
|
||||
}
|
||||
ForthwithActivateOrderPayload struct {
|
||||
OrderNo string `json:"order_no"`
|
||||
}
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
package types
|
||||
|
||||
const (
|
||||
SchedulerCheckSubscription = "scheduler:check:subscription"
|
||||
SchedulerTotalServerData = "scheduler:total:server"
|
||||
SchedulerCheckOrder = "scheduler:check:order"
|
||||
)
|
||||
@@ -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"`
|
||||
}
|
||||
@@ -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"`
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user