mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-20 15:06:36 +00:00
Merge branch 'main' into release/custom-0.1.99
# Conflicts: # backend/cmd/server/wire_gen.go # backend/cmd/server/wire_gen_test.go # backend/internal/handler/dto/mappers.go # backend/internal/service/ratelimit_service.go # backend/internal/service/ratelimit_service_401_db_fallback_test.go # backend/internal/service/ratelimit_service_401_test.go # frontend/src/components/account/AccountCapacityCell.vue # frontend/src/components/account/CreateAccountModal.vue # frontend/src/components/account/EditAccountModal.vue # frontend/src/views/admin/DataManagementView.vue
This commit is contained in:
commit
25a0030450
145 files changed
+11863
-768
No files matched your search
@@ -128,6 +128,8 @@ type SoraS3Profile struct {
|
||||
ProfileID string `json:"profile_id"`
|
||||
Name string `json:"name"`
|
||||
IsActive bool `json:"is_active"`
|
||||
Provider string `json:"provider"` // "s3" / "gdrive",空值视为 "s3"
|
||||
AccessMode string `json:"access_mode"` // "direct" / "proxy",空值视为 "direct"
|
||||
Enabled bool `json:"enabled"`
|
||||
Endpoint string `json:"endpoint"`
|
||||
Region string `json:"region"`
|
||||
@@ -140,6 +142,25 @@ type SoraS3Profile struct {
|
||||
CDNURL string `json:"cdn_url"`
|
||||
DefaultStorageQuotaBytes int64 `json:"default_storage_quota_bytes"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
|
||||
// --- Google Drive 专属 ---
|
||||
AuthType string `json:"auth_type,omitempty"` // "oauth2" / "service_account"
|
||||
ClientID string `json:"client_id,omitempty"`
|
||||
ClientSecret string `json:"-"`
|
||||
ClientSecretConfigured bool `json:"client_secret_configured"`
|
||||
RefreshToken string `json:"-"`
|
||||
RefreshTokenConfigured bool `json:"refresh_token_configured"`
|
||||
ServiceAccountJSON string `json:"-"`
|
||||
ServiceAccountConfigured bool `json:"service_account_configured"`
|
||||
FolderID string `json:"folder_id,omitempty"`
|
||||
}
|
||||
|
||||
// GetProvider 返回 Provider,空值视为 "s3"。
|
||||
func (p *SoraS3Profile) GetProvider() string {
|
||||
if p.Provider == "" {
|
||||
return SoraStorageTypeS3
|
||||
}
|
||||
return p.Provider
|
||||
}
|
||||
|
||||
// SoraS3ProfileList Sora S3 多配置列表
|
||||
|
||||
Reference in new issue
Block a user