Based on QuantumNous/new-api v1.0.0-rc.36 (shallow history squashed). - CNY quota display mode: RMB-denominated top-up and crediting across Epay/Waffo channels - New CheckinButton in both authenticated and public headers (Turnstile supported) - New /subscribe page with public plan snapshot, Alipay/balance payment, auto group upgrade/reset - New /docs 12-section beginner guide with anchor navigation - New home PromoBanner linking to /docs; i18n synced (en/zh/zh-TW/fr/ja/ru/vi) - README: document custom features, live demo https://ai.88531.cn
40 lines
1.0 KiB
Go
40 lines
1.0 KiB
Go
package dto
|
|
|
|
type UpstreamDTO struct {
|
|
ID int `json:"id,omitempty"`
|
|
Name string `json:"name" binding:"required"`
|
|
BaseURL string `json:"base_url" binding:"required"`
|
|
Endpoint string `json:"endpoint"`
|
|
}
|
|
|
|
type UpstreamRequest struct {
|
|
ChannelIDs []int64 `json:"channel_ids"`
|
|
Upstreams []UpstreamDTO `json:"upstreams"`
|
|
Timeout int `json:"timeout"`
|
|
}
|
|
|
|
// TestResult 上游测试连通性结果
|
|
type TestResult struct {
|
|
Name string `json:"name"`
|
|
Status string `json:"status"`
|
|
Error string `json:"error,omitempty"`
|
|
}
|
|
|
|
// DifferenceItem 差异项
|
|
// Current 为本地值,可能为 nil
|
|
// Upstreams 为各渠道的上游值,具体数值 / "same" / nil
|
|
|
|
type DifferenceItem struct {
|
|
Current any `json:"current"`
|
|
Upstreams map[string]any `json:"upstreams"`
|
|
Confidence map[string]bool `json:"confidence"`
|
|
}
|
|
|
|
type SyncableChannel struct {
|
|
ID int `json:"id"`
|
|
Name string `json:"name"`
|
|
BaseURL string `json:"base_url"`
|
|
Status int `json:"status"`
|
|
Type int `json:"type"`
|
|
}
|