Documentation
¶
Overview ¶
Package dto holds the platform module's contract: the requests and responses of the audit log, system settings, admin console, admin tool and public site endpoints. The Go package keeps the name dto so the Swagger schema names (dto.*) stay stable.
The views of other modules' data in this file are platform-owned snapshots: they deliberately duplicate the JSON shapes instead of coupling one module's API to another.
Index ¶
- Constants
- type AdminActionLog
- type AuthConfig
- type BalanceLog
- type CommissionLog
- type Currency
- type CurrencyConfig
- type DeviceAuthticateConfig
- type EmailAuthticateConfig
- type FilterAdminActionLogRequest
- type FilterAdminActionLogResponse
- type FilterBalanceLogRequest
- type FilterBalanceLogResponse
- type FilterCommissionLogRequest
- type FilterCommissionLogResponse
- type FilterEmailLogResponse
- type FilterGiftLogRequest
- type FilterGiftLogResponse
- type FilterLogParams
- type FilterLoginLogRequest
- type FilterLoginLogResponse
- type FilterMobileLogResponse
- type FilterOrderLogRequest
- type FilterOrderLogResponse
- type FilterRegisterLogRequest
- type FilterRegisterLogResponse
- type FilterResetSubscribeLogRequest
- type FilterResetSubscribeLogResponse
- type FilterServerTrafficLogRequest
- type FilterServerTrafficLogResponse
- type FilterSubscribeLogRequest
- type FilterSubscribeLogResponse
- type FilterSubscribeTrafficRequest
- type FilterSubscribeTrafficResponse
- type FilterTrafficLogDetailsRequest
- type FilterTrafficLogDetailsResponse
- type FilterUnmatchedPaymentLogRequest
- type FilterUnmatchedPaymentLogResponse
- type GetGlobalConfigResponse
- type GetMessageLogListRequest
- type GetMessageLogListResponse
- type GetNodeMultiplierResponse
- type GetStatResponse
- type GetSubscribeClientResponse
- type GetTosResponse
- type GiftLog
- type HeartbeatResponse
- type InviteConfig
- type LogResponse
- type LogSetting
- type LoginLog
- type MessageLog
- type MobileAuthenticateConfig
- type NodeConfig
- type OrderLog
- type OrdersStatistics
- type PlatformDownloadLinkSnapshot
- type PlatformNodeDNSSnapshot
- type PlatformNodeOutboundSnapshot
- type PlatformUserAuthMethodSnapshot
- type PlatformUserDeviceSnapshot
- type PlatformUserSnapshot
- type PreViewNodeMultiplierResponse
- type PrivacyPolicyConfig
- type PubilcRegisterConfig
- type PubilcVerifyCodeConfig
- type QueryIPLocationRequest
- type QueryIPLocationResponse
- type RegisterConfig
- type RegisterLog
- type ResetSubscribeLog
- type RevenueStatisticsResponse
- type ServerTotalDataResponse
- type ServerTrafficData
- type ServerTrafficLog
- type SetNodeMultiplierRequest
- type SiteConfig
- type SubscribeClient
- type SubscribeConfig
- type SubscribeLog
- type TicketWaitRelpyResponse
- type TimePeriod
- type TosConfig
- type TrafficLogDetails
- type UnmatchedPaymentLog
- type UserStatistics
- type UserStatisticsResponse
- type UserSubscribeTrafficLog
- type UserTrafficData
- type VeifyConfig
- type VerifyCodeConfig
- type VerifyConfig
- type VersionResponse
Constants ¶
const SecretMask = "********"
SecretMask is what the admin settings API shows in place of a stored secret (the Turnstile secret, the currency access key, the node outbound credentials). An update that carries SecretMask in such a field keeps the stored value; an empty field clears it. The node secret is shown in clear: administrators copy it into every node's configuration.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminActionLog ¶ added in v1.21.0
type AdminActionLog struct {
Id int64 `json:"id"`
UserId int64 `json:"user_id"`
Action string `json:"action"`
Object string `json:"object,omitempty"`
ObjectId int64 `json:"object_id,omitempty"`
Detail string `json:"detail,omitempty"`
Source string `json:"source"`
TelegramSenderId int64 `json:"telegram_sender_id,omitempty"`
Timestamp int64 `json:"timestamp"`
CreatedAt int64 `json:"created_at"`
ClientIP string `json:"client_ip,omitempty"`
UserAgent string `json:"user_agent,omitempty"`
IPCountryCode string `json:"ip_country_code,omitempty"`
IPCountry string `json:"ip_country,omitempty"`
IPRegion string `json:"ip_region,omitempty"`
IPCity string `json:"ip_city,omitempty"`
IPASN uint `json:"ip_asn,omitempty"`
IPASOrganization string `json:"ip_as_organization,omitempty"`
}
AdminActionLog is one administrator mutation: what was done to which object, by whom (UserId is the administrator's account) and from where (Source "http" carries the request's address and agent; "telegram" the bot command's sender).
type AuthConfig ¶
type AuthConfig struct {
Mobile MobileAuthenticateConfig `json:"mobile"`
Email EmailAuthticateConfig `json:"email"`
Device DeviceAuthticateConfig `json:"device"`
Register PubilcRegisterConfig `json:"register"`
}
AuthConfig is the public site's view of the sign-in and registration settings.
type BalanceLog ¶
type BalanceLog struct {
Type uint16 `json:"type"`
UserId int64 `json:"user_id"`
Amount int64 `json:"amount"`
OrderNo string `json:"order_no,omitempty"`
Balance int64 `json:"balance"`
Timestamp int64 `json:"timestamp"`
ClientIP string `json:"client_ip,omitempty"`
UserAgent string `json:"user_agent,omitempty"`
ActorID int64 `json:"actor_id,omitempty"`
IPCountryCode string `json:"ip_country_code,omitempty"`
IPCountry string `json:"ip_country,omitempty"`
IPRegion string `json:"ip_region,omitempty"`
IPCity string `json:"ip_city,omitempty"`
IPASN uint `json:"ip_asn,omitempty"`
IPASOrganization string `json:"ip_as_organization,omitempty"`
}
type CommissionLog ¶
type CommissionLog struct {
Type uint16 `json:"type"`
UserId int64 `json:"user_id"`
Amount int64 `json:"amount"`
OrderNo string `json:"order_no"`
Timestamp int64 `json:"timestamp"`
ClientIP string `json:"client_ip,omitempty"`
UserAgent string `json:"user_agent,omitempty"`
ActorID int64 `json:"actor_id,omitempty"`
IPCountryCode string `json:"ip_country_code,omitempty"`
IPCountry string `json:"ip_country,omitempty"`
IPRegion string `json:"ip_region,omitempty"`
IPCity string `json:"ip_city,omitempty"`
IPASN uint `json:"ip_asn,omitempty"`
IPASOrganization string `json:"ip_as_organization,omitempty"`
}
type CurrencyConfig ¶
type DeviceAuthticateConfig ¶
type EmailAuthticateConfig ¶
type FilterAdminActionLogRequest ¶ added in v1.21.0
type FilterAdminActionLogRequest struct {
FilterLogParams
// UserId narrows the trail to one administrator.
UserId int64 `form:"user_id"`
}
type FilterAdminActionLogResponse ¶ added in v1.21.0
type FilterAdminActionLogResponse struct {
Total int64 `json:"total"`
List []AdminActionLog `json:"list"`
}
type FilterBalanceLogRequest ¶
type FilterBalanceLogRequest struct {
FilterLogParams
UserId int64 `form:"user_id"`
}
type FilterBalanceLogResponse ¶
type FilterBalanceLogResponse struct {
Total int64 `json:"total"`
List []BalanceLog `json:"list"`
}
type FilterCommissionLogRequest ¶
type FilterCommissionLogRequest struct {
FilterLogParams
UserId int64 `form:"user_id"`
}
type FilterCommissionLogResponse ¶
type FilterCommissionLogResponse struct {
Total int64 `json:"total"`
List []CommissionLog `json:"list"`
}
type FilterEmailLogResponse ¶
type FilterEmailLogResponse struct {
Total int64 `json:"total"`
List []MessageLog `json:"list"`
}
type FilterGiftLogRequest ¶
type FilterGiftLogRequest struct {
FilterLogParams
UserId int64 `form:"user_id"`
}
type FilterGiftLogResponse ¶
type FilterLogParams ¶
type FilterLogParams struct {
Page int `form:"page" validate:"required,gt=0"`
Size int `form:"size" validate:"required,gt=0,lte=100"`
Date string `form:"date"`
StartDate string `form:"start_date" validate:"omitempty,datetime=2006-01-02"`
EndDate string `form:"end_date" validate:"omitempty,datetime=2006-01-02"`
Search string `form:"search"`
}
type FilterLoginLogRequest ¶
type FilterLoginLogRequest struct {
FilterLogParams
UserId int64 `form:"user_id"`
}
type FilterLoginLogResponse ¶
type FilterMobileLogResponse ¶
type FilterMobileLogResponse struct {
Total int64 `json:"total"`
List []MessageLog `json:"list"`
}
type FilterOrderLogRequest ¶ added in v1.20.1
type FilterOrderLogRequest struct {
FilterLogParams
UserId int64 `form:"user_id"`
}
type FilterOrderLogResponse ¶ added in v1.20.1
type FilterRegisterLogRequest ¶
type FilterRegisterLogRequest struct {
FilterLogParams
UserId int64 `form:"user_id"`
}
type FilterRegisterLogResponse ¶
type FilterRegisterLogResponse struct {
Total int64 `json:"total"`
List []RegisterLog `json:"list"`
}
type FilterResetSubscribeLogRequest ¶
type FilterResetSubscribeLogRequest struct {
FilterLogParams
UserSubscribeId int64 `form:"user_subscribe_id"`
}
type FilterResetSubscribeLogResponse ¶
type FilterResetSubscribeLogResponse struct {
Total int64 `json:"total"`
List []ResetSubscribeLog `json:"list"`
}
type FilterServerTrafficLogRequest ¶
type FilterServerTrafficLogRequest struct {
FilterLogParams
ServerId int64 `form:"server_id"`
}
type FilterServerTrafficLogResponse ¶
type FilterServerTrafficLogResponse struct {
Total int64 `json:"total"`
List []ServerTrafficLog `json:"list"`
}
type FilterSubscribeLogRequest ¶
type FilterSubscribeLogRequest struct {
FilterLogParams
UserId int64 `form:"user_id"`
UserSubscribeId int64 `form:"user_subscribe_id"`
}
type FilterSubscribeLogResponse ¶
type FilterSubscribeLogResponse struct {
Total int64 `json:"total"`
List []SubscribeLog `json:"list"`
}
type FilterSubscribeTrafficRequest ¶
type FilterSubscribeTrafficRequest struct {
FilterLogParams
UserId int64 `form:"user_id"`
UserSubscribeId int64 `form:"user_subscribe_id"`
}
type FilterSubscribeTrafficResponse ¶
type FilterSubscribeTrafficResponse struct {
Total int64 `json:"total"`
List []UserSubscribeTrafficLog `json:"list"`
}
type FilterTrafficLogDetailsRequest ¶
type FilterTrafficLogDetailsRequest struct {
FilterLogParams
ServerId int64 `form:"server_id"`
SubscribeId int64 `form:"subscribe_id"`
UserId int64 `form:"user_id"`
}
type FilterTrafficLogDetailsResponse ¶
type FilterTrafficLogDetailsResponse struct {
Total int64 `json:"total"`
List []TrafficLogDetails `json:"list"`
}
type FilterUnmatchedPaymentLogRequest ¶ added in v1.21.0
type FilterUnmatchedPaymentLogRequest struct {
FilterLogParams
// UserId narrows the list to one payer.
UserId int64 `form:"user_id"`
}
type FilterUnmatchedPaymentLogResponse ¶ added in v1.21.0
type FilterUnmatchedPaymentLogResponse struct {
Total int64 `json:"total"`
List []UnmatchedPaymentLog `json:"list"`
}
type GetGlobalConfigResponse ¶
type GetGlobalConfigResponse struct {
Site SiteConfig `json:"site"`
Verify VeifyConfig `json:"verify"`
Auth AuthConfig `json:"auth"`
Invite InviteConfig `json:"invite"`
Currency Currency `json:"currency"`
Subscribe SubscribeConfig `json:"subscribe"`
VerifyCode PubilcVerifyCodeConfig `json:"verify_code"`
OAuthMethods []string `json:"oauth_methods"`
WebAd bool `json:"web_ad"`
}
type GetMessageLogListResponse ¶
type GetMessageLogListResponse struct {
Total int64 `json:"total"`
List []MessageLog `json:"list"`
}
type GetNodeMultiplierResponse ¶
type GetNodeMultiplierResponse struct {
Periods []TimePeriod `json:"periods"`
}
type GetStatResponse ¶
type GetSubscribeClientResponse ¶
type GetSubscribeClientResponse struct {
Total int64 `json:"total"`
List []SubscribeClient `json:"list"`
}
type GetTosResponse ¶
type GetTosResponse struct {
TosContent string `json:"tos_content"`
}
type GiftLog ¶
type GiftLog struct {
Type uint16 `json:"type"`
UserId int64 `json:"user_id"`
OrderNo string `json:"order_no"`
SubscribeId int64 `json:"subscribe_id"`
Amount int64 `json:"amount"`
Balance int64 `json:"balance"`
Remark string `json:"remark,omitempty"`
Timestamp int64 `json:"timestamp"`
ClientIP string `json:"client_ip,omitempty"`
UserAgent string `json:"user_agent,omitempty"`
ActorID int64 `json:"actor_id,omitempty"`
IPCountryCode string `json:"ip_country_code,omitempty"`
IPCountry string `json:"ip_country,omitempty"`
IPRegion string `json:"ip_region,omitempty"`
IPCity string `json:"ip_city,omitempty"`
IPASN uint `json:"ip_asn,omitempty"`
IPASOrganization string `json:"ip_as_organization,omitempty"`
}
type HeartbeatResponse ¶
type InviteConfig ¶
type LogResponse ¶
type LogResponse struct {
List any `json:"list"`
}
type LogSetting ¶
type LogSetting struct {
AutoClear *bool `json:"auto_clear" validate:"required"`
ClearDays int64 `json:"clear_days" validate:"required,gte=7,lte=3650"`
}
LogSetting is the log retention: ClearDays may not go below seven days, so the login, registration and subscription logs outlive the time it takes to notice an incident.
type LoginLog ¶
type LoginLog struct {
UserId int64 `json:"user_id"`
Method string `json:"method"`
LoginIP string `json:"login_ip"`
UserAgent string `json:"user_agent"`
Success bool `json:"success"`
Timestamp int64 `json:"timestamp"`
ActorID int64 `json:"actor_id,omitempty"`
IPCountryCode string `json:"ip_country_code,omitempty"`
IPCountry string `json:"ip_country,omitempty"`
IPRegion string `json:"ip_region,omitempty"`
IPCity string `json:"ip_city,omitempty"`
IPASN uint `json:"ip_asn,omitempty"`
IPASOrganization string `json:"ip_as_organization,omitempty"`
}
type MessageLog ¶
type MessageLog struct {
Id int64 `json:"id"`
Type uint8 `json:"type"`
Platform string `json:"platform"`
To string `json:"to"`
Subject string `json:"subject"`
Content any `json:"content"`
Status uint8 `json:"status"`
CreatedAt int64 `json:"created_at"`
ClientIP string `json:"client_ip,omitempty"`
UserAgent string `json:"user_agent,omitempty"`
ActorID int64 `json:"actor_id,omitempty"`
IPCountryCode string `json:"ip_country_code,omitempty"`
IPCountry string `json:"ip_country,omitempty"`
IPRegion string `json:"ip_region,omitempty"`
IPCity string `json:"ip_city,omitempty"`
IPASN uint `json:"ip_asn,omitempty"`
IPASOrganization string `json:"ip_as_organization,omitempty"`
}
type NodeConfig ¶
type NodeConfig struct {
NodeSecret string `json:"node_secret"`
NodePullInterval int64 `json:"node_pull_interval"`
NodePushInterval int64 `json:"node_push_interval"`
TrafficReportThreshold int64 `json:"traffic_report_threshold"`
IPStrategy string `json:"ip_strategy"`
DNS []PlatformNodeDNSSnapshot `json:"dns"`
Block []string `json:"block"`
Outbound []PlatformNodeOutboundSnapshot `json:"outbound"`
}
type OrderLog ¶ added in v1.20.1
type OrderLog struct {
Id int64 `json:"id"`
UserId int64 `json:"user_id"`
OrderNo string `json:"order_no"`
OrderType uint8 `json:"order_type"`
Quantity int64 `json:"quantity"`
Price int64 `json:"price"`
Amount int64 `json:"amount"`
GiftAmount int64 `json:"gift_amount"`
Discount int64 `json:"discount"`
CouponDiscount int64 `json:"coupon_discount"`
PaymentId int64 `json:"payment_id"`
Method string `json:"method"`
FeeAmount int64 `json:"fee_amount"`
SubscribeId int64 `json:"subscribe_id,omitempty"`
Source string `json:"source"`
Timestamp int64 `json:"timestamp"`
ClientIP string `json:"client_ip,omitempty"`
UserAgent string `json:"user_agent,omitempty"`
ActorID int64 `json:"actor_id,omitempty"`
IPCountryCode string `json:"ip_country_code,omitempty"`
IPCountry string `json:"ip_country,omitempty"`
IPRegion string `json:"ip_region,omitempty"`
IPCity string `json:"ip_city,omitempty"`
IPASN uint `json:"ip_asn,omitempty"`
IPASOrganization string `json:"ip_as_organization,omitempty"`
}
type OrdersStatistics ¶
type OrdersStatistics struct {
Date string `json:"date,omitempty"`
AmountTotal int64 `json:"amount_total"`
NewOrderAmount int64 `json:"new_order_amount"`
RenewalOrderAmount int64 `json:"renewal_order_amount"`
List []OrdersStatistics `json:"list,omitempty"`
}
type PlatformDownloadLinkSnapshot ¶
type PlatformDownloadLinkSnapshot struct {
IOS string `json:"ios,omitempty"`
Android string `json:"android,omitempty"`
Windows string `json:"windows,omitempty"`
Mac string `json:"mac,omitempty"`
Linux string `json:"linux,omitempty"`
Harmony string `json:"harmony,omitempty"`
} // @name dto.DownloadLink
type PlatformNodeDNSSnapshot ¶
type PlatformNodeOutboundSnapshot ¶
type PlatformNodeOutboundSnapshot struct {
Name string `json:"name"`
Protocol string `json:"protocol"`
Address string `json:"address"`
Port int64 `json:"port"`
User string `json:"user,omitempty"`
Password string `json:"password"`
UUID string `json:"uuid,omitempty"`
Cipher string `json:"cipher,omitempty"`
Plugin string `json:"plugin,omitempty"`
PluginOptions any `json:"plugin_opts,omitempty"`
Security string `json:"security,omitempty"`
SNI string `json:"sni,omitempty"`
ALPN []string `json:"alpn,omitempty"`
AllowInsecure bool `json:"allow_insecure,omitempty"`
Fingerprint string `json:"fingerprint,omitempty"`
Transport string `json:"transport,omitempty"`
Host string `json:"host,omitempty"`
Path string `json:"path,omitempty"`
ServiceName string `json:"service_name,omitempty"`
XHTTPMode string `json:"xhttp_mode,omitempty"`
XHTTPExtra string `json:"xhttp_extra,omitempty"`
Flow string `json:"flow,omitempty"`
Encryption string `json:"encryption,omitempty"`
EncryptionMode string `json:"encryption_mode,omitempty"`
EncryptionRTT string `json:"encryption_rtt,omitempty"`
EncryptionTicket string `json:"encryption_ticket,omitempty"`
EncryptionPadding string `json:"encryption_client_padding,omitempty"`
EncryptionPassword string `json:"encryption_password,omitempty"`
Multiplex string `json:"multiplex,omitempty"`
UoT bool `json:"uot,omitempty"`
UoTVersion int `json:"uot_version,omitempty"`
CongestionController string `json:"congestion_controller,omitempty"`
UDPStream bool `json:"udp_stream,omitempty"`
ReduceRtt bool `json:"reduce_rtt,omitempty"`
Heartbeat int `json:"heartbeat,omitempty"`
RealityPublicKey string `json:"reality_public_key,omitempty"`
RealityShortId string `json:"reality_short_id,omitempty"`
SpiderX string `json:"spider_x,omitempty"`
Settings string `json:"settings,omitempty"`
StreamSettings string `json:"stream_settings,omitempty"`
Rules []string `json:"rules"`
} // @name dto.NodeOutbound
type PlatformUserDeviceSnapshot ¶
type PlatformUserDeviceSnapshot struct {
Id int64 `json:"id"`
Ip string `json:"ip"`
Identifier string `json:"identifier"`
UserAgent string `json:"user_agent"`
Online bool `json:"online"`
Enabled bool `json:"enabled"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
} // @name dto.UserDevice
type PlatformUserSnapshot ¶
type PlatformUserSnapshot struct {
Id int64 `json:"id"`
Avatar string `json:"avatar"`
Balance int64 `json:"balance"`
Commission int64 `json:"commission"`
ReferralPercentage uint8 `json:"referral_percentage"`
OnlyFirstPurchase bool `json:"only_first_purchase"`
GiftAmount int64 `json:"gift_amount"`
Telegram int64 `json:"telegram"`
ReferCode string `json:"refer_code"`
RefererId int64 `json:"referer_id"`
Enable bool `json:"enable"`
IsAdmin bool `json:"is_admin,omitempty"`
EnableBalanceNotify bool `json:"enable_balance_notify"`
EnableLoginNotify bool `json:"enable_login_notify"`
EnableSubscribeNotify bool `json:"enable_subscribe_notify"`
EnableTradeNotify bool `json:"enable_trade_notify"`
AuthMethods []PlatformUserAuthMethodSnapshot `json:"auth_methods"`
UserDevices []PlatformUserDeviceSnapshot `json:"user_devices"`
Rules []string `json:"rules"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
DeletedAt int64 `json:"deleted_at,omitempty"`
} // @name dto.User
type PrivacyPolicyConfig ¶
type PrivacyPolicyConfig struct {
PrivacyPolicy string `json:"privacy_policy"`
}
type PubilcRegisterConfig ¶
type PubilcVerifyCodeConfig ¶
type PubilcVerifyCodeConfig struct {
VerifyCodeInterval int64 `json:"verify_code_interval"`
}
type QueryIPLocationRequest ¶
type QueryIPLocationRequest struct {
IP string `form:"ip" validate:"required"`
}
type QueryIPLocationResponse ¶
type RegisterConfig ¶
type RegisterConfig struct {
StopRegister bool `json:"stop_register"`
EnableTrial bool `json:"enable_trial"`
TrialSubscribe int64 `json:"trial_subscribe"`
TrialTime int64 `json:"trial_time"`
TrialTimeUnit string `json:"trial_time_unit"`
EnableIpRegisterLimit bool `json:"enable_ip_register_limit"`
IpRegisterLimit int64 `json:"ip_register_limit"`
IpRegisterLimitDuration int64 `json:"ip_register_limit_duration"`
}
type RegisterLog ¶
type RegisterLog struct {
UserId int64 `json:"user_id"`
AuthMethod string `json:"auth_method"`
Identifier string `json:"identifier"`
RegisterIP string `json:"register_ip"`
UserAgent string `json:"user_agent"`
Timestamp int64 `json:"timestamp"`
ActorID int64 `json:"actor_id,omitempty"`
IPCountryCode string `json:"ip_country_code,omitempty"`
IPCountry string `json:"ip_country,omitempty"`
IPRegion string `json:"ip_region,omitempty"`
IPCity string `json:"ip_city,omitempty"`
IPASN uint `json:"ip_asn,omitempty"`
IPASOrganization string `json:"ip_as_organization,omitempty"`
}
type ResetSubscribeLog ¶
type ResetSubscribeLog struct {
Type uint16 `json:"type"`
UserId int64 `json:"user_id"`
UserSubscribeId int64 `json:"user_subscribe_id"`
OrderNo string `json:"order_no,omitempty"`
Timestamp int64 `json:"timestamp"`
ClientIP string `json:"client_ip,omitempty"`
UserAgent string `json:"user_agent,omitempty"`
ActorID int64 `json:"actor_id,omitempty"`
IPCountryCode string `json:"ip_country_code,omitempty"`
IPCountry string `json:"ip_country,omitempty"`
IPRegion string `json:"ip_region,omitempty"`
IPCity string `json:"ip_city,omitempty"`
IPASN uint `json:"ip_asn,omitempty"`
IPASOrganization string `json:"ip_as_organization,omitempty"`
}
type RevenueStatisticsResponse ¶
type RevenueStatisticsResponse struct {
Today OrdersStatistics `json:"today"`
Monthly OrdersStatistics `json:"monthly"`
All OrdersStatistics `json:"all"`
}
type ServerTotalDataResponse ¶
type ServerTotalDataResponse struct {
OnlineUsers int64 `json:"online_users"`
OnlineServers int64 `json:"online_servers"`
OfflineServers int64 `json:"offline_servers"`
TodayUpload int64 `json:"today_upload"`
TodayDownload int64 `json:"today_download"`
MonthlyUpload int64 `json:"monthly_upload"`
MonthlyDownload int64 `json:"monthly_download"`
UpdatedAt int64 `json:"updated_at"`
ServerTrafficRankingToday []ServerTrafficData `json:"server_traffic_ranking_today"`
ServerTrafficRankingYesterday []ServerTrafficData `json:"server_traffic_ranking_yesterday"`
UserTrafficRankingToday []UserTrafficData `json:"user_traffic_ranking_today"`
UserTrafficRankingYesterday []UserTrafficData `json:"user_traffic_ranking_yesterday"`
}
type ServerTrafficData ¶
type ServerTrafficLog ¶
type ServerTrafficLog struct {
ServerId int64 `json:"server_id"` // Server ID
Upload int64 `json:"upload"` // Upload traffic in bytes
Download int64 `json:"download"` // Download traffic in bytes
Total int64 `json:"total"` // Total traffic in bytes (Upload + Download)
Date string `json:"date"` // Date in YYYY-MM-DD format
Details bool `json:"details"` // Whether to show detailed traffic
}
type SetNodeMultiplierRequest ¶
type SetNodeMultiplierRequest struct {
Periods []TimePeriod `json:"periods"`
}
type SiteConfig ¶
type SubscribeClient ¶
type SubscribeClient struct {
Id int64 `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Icon string `json:"icon,omitempty"`
Scheme string `json:"scheme,omitempty"`
IsDefault bool `json:"is_default"`
DownloadLink PlatformDownloadLinkSnapshot `json:"download_link,omitempty"`
}
type SubscribeConfig ¶
type SubscribeConfig struct {
SingleModel bool `json:"single_model"`
SubscribePath string `json:"subscribe_path"`
SubscribeDomain string `json:"subscribe_domain"`
PanDomain bool `json:"pan_domain"`
UserAgentLimit bool `json:"user_agent_limit"`
UserAgentList string `json:"user_agent_list"`
ShowTutorial bool `json:"show_tutorial"`
ProfileUpdateInterval int64 `json:"profile_update_interval"`
ProfileWebPageURL string `json:"profile_web_page_url"`
}
type SubscribeLog ¶
type SubscribeLog struct {
UserId int64 `json:"user_id"`
Token string `json:"token"`
UserAgent string `json:"user_agent"`
ClientIP string `json:"client_ip"`
UserSubscribeId int64 `json:"user_subscribe_id"`
Timestamp int64 `json:"timestamp"`
ActorID int64 `json:"actor_id,omitempty"`
IPCountryCode string `json:"ip_country_code,omitempty"`
IPCountry string `json:"ip_country,omitempty"`
IPRegion string `json:"ip_region,omitempty"`
IPCity string `json:"ip_city,omitempty"`
IPASN uint `json:"ip_asn,omitempty"`
IPASOrganization string `json:"ip_as_organization,omitempty"`
}
type TicketWaitRelpyResponse ¶
type TicketWaitRelpyResponse struct {
Count int64 `json:"count"`
}
type TimePeriod ¶
type TrafficLogDetails ¶
type UnmatchedPaymentLog ¶ added in v1.21.0
type UnmatchedPaymentLog struct {
Id int64 `json:"id"`
UserId int64 `json:"user_id"`
OrderNo string `json:"order_no"`
TradeNo string `json:"trade_no"`
Platform string `json:"platform"`
Amount int64 `json:"amount"`
Currency string `json:"currency"`
Reason string `json:"reason"`
Timestamp int64 `json:"timestamp"`
CreatedAt int64 `json:"created_at"`
ClientIP string `json:"client_ip,omitempty"`
UserAgent string `json:"user_agent,omitempty"`
ActorID int64 `json:"actor_id,omitempty"`
IPCountryCode string `json:"ip_country_code,omitempty"`
IPCountry string `json:"ip_country,omitempty"`
IPRegion string `json:"ip_region,omitempty"`
IPCity string `json:"ip_city,omitempty"`
IPASN uint `json:"ip_asn,omitempty"`
IPASOrganization string `json:"ip_as_organization,omitempty"`
}
UnmatchedPaymentLog is a payment a gateway confirmed that could not settle its order; UserId is the payer when known.
type UserStatistics ¶
type UserStatistics struct {
Date string `json:"date,omitempty"`
Register int64 `json:"register"`
NewOrderUsers int64 `json:"new_order_users"`
RenewalOrderUsers int64 `json:"renewal_order_users"`
List []UserStatistics `json:"list,omitempty"`
}
type UserStatisticsResponse ¶
type UserStatisticsResponse struct {
Today UserStatistics `json:"today"`
Monthly UserStatistics `json:"monthly"`
All UserStatistics `json:"all"`
}
type UserSubscribeTrafficLog ¶
type UserSubscribeTrafficLog struct {
SubscribeId int64 `json:"subscribe_id"` // Subscribe ID
UserId int64 `json:"user_id"` // User ID
Upload int64 `json:"upload"` // Upload traffic in bytes
Download int64 `json:"download"` // Download traffic in bytes
Total int64 `json:"total"` // Total traffic in bytes (Upload + Download)
Date string `json:"date"` // Date in YYYY-MM-DD format
Details bool `json:"details"` // Whether to show detailed traffic
}
type UserTrafficData ¶
type UserTrafficData struct {
// SID identifies the user_subscribe row the traffic was billed to, UID the
// user owning it. UID is carried separately so the console can still name
// the user after the subscription row is gone.
SID int64 `json:"sid"`
UID int64 `json:"uid"`
Upload int64 `json:"upload"`
Download int64 `json:"download"`
}
type VeifyConfig ¶
type VerifyCodeConfig ¶
type VerifyConfig ¶
type VerifyConfig struct {
TurnstileSiteKey string `json:"turnstile_site_key"`
TurnstileSecret string `json:"turnstile_secret"`
EnableLoginVerify bool `json:"enable_login_verify"`
EnableRegisterVerify bool `json:"enable_register_verify"`
EnableResetPasswordVerify bool `json:"enable_reset_password_verify"`
}
type VersionResponse ¶
type VersionResponse struct {
Version string `json:"version"`
}