| |
| package dto |
|
|
| import ( |
| "github.com/router-for-me/CLIProxyAPI/v6/internal/config" |
| ) |
|
|
| |
| type ConfigResponse struct { |
| Debug bool `json:"debug"` |
| UsageStatisticsEnabled bool `json:"usage_statistics_enabled"` |
| LoggingToFile bool `json:"logging_to_file"` |
| LogsMaxTotalSizeMB int `json:"logs_max_total_size_mb"` |
| RequestLog bool `json:"request_log"` |
| WebsocketAuth bool `json:"websocket_auth"` |
| RequestRetry int `json:"request_retry"` |
| MaxRetryInterval int `json:"max_retry_interval"` |
| ForceModelPrefix bool `json:"force_model_prefix"` |
| ProxyURL string `json:"proxy_url,omitempty"` |
| Routing RoutingConfig `json:"routing"` |
| RemoteManagement RemoteManagementConfig `json:"remote_management"` |
| QuotaExceeded QuotaExceededConfig `json:"quota_exceeded"` |
| APIKeys []string `json:"api_keys,omitempty"` |
| GeminiKey []config.GeminiKey `json:"gemini_key,omitempty"` |
| ClaudeKey []config.ClaudeKey `json:"claude_key,omitempty"` |
| CodexKey []config.CodexKey `json:"codex_key,omitempty"` |
| OpenAICompatibility []config.OpenAICompatibility `json:"openai_compatibility,omitempty"` |
| VertexCompatAPIKey []config.VertexCompatKey `json:"vertex_compat_api_key,omitempty"` |
| KiroKey []config.KiroKey `json:"kiro_key,omitempty"` |
| OAuthExcludedModels map[string][]string `json:"oauth_excluded_models,omitempty"` |
| OAuthModelAlias map[string][]config.OAuthModelAlias `json:"oauth_model_alias,omitempty"` |
| AmpCode config.AmpCode `json:"amp_code"` |
| } |
|
|
| |
| type RoutingConfig struct { |
| Strategy string `json:"strategy"` |
| } |
|
|
| |
| type RemoteManagementConfig struct { |
| AllowRemote bool `json:"allow_remote"` |
| SecretKey string `json:"secret_key,omitempty"` |
| } |
|
|
| |
| type QuotaExceededConfig struct { |
| SwitchProject bool `json:"switch_project"` |
| SwitchPreviewModel bool `json:"switch_preview_model"` |
| } |
|
|
| |
| type UpdateConfigRequest struct { |
| Config config.Config `json:"config"` |
| } |
|
|
| |
| type UpdateAPIKeysRequest struct { |
| Keys []string `json:"keys"` |
| } |
|
|
| |
| type UpdateGeminiKeysRequest struct { |
| Keys []config.GeminiKey `json:"keys"` |
| } |
|
|
| |
| type UpdateClaudeKeysRequest struct { |
| Keys []config.ClaudeKey `json:"keys"` |
| } |
|
|
| |
| type UpdateCodexKeysRequest struct { |
| Keys []config.CodexKey `json:"keys"` |
| } |
|
|
| |
| type UpdateOpenAICompatRequest struct { |
| Entries []config.OpenAICompatibility `json:"entries"` |
| } |
|
|
| |
| type UpdateVertexCompatKeysRequest struct { |
| Keys []config.VertexCompatKey `json:"keys"` |
| } |
|
|
| |
| type UpdateKiroKeysRequest struct { |
| Keys []config.KiroKey `json:"keys"` |
| } |
|
|
| |
| type UpdateOAuthExcludedModelsRequest struct { |
| Models map[string][]string `json:"models"` |
| } |
|
|
| |
| type UpdateOAuthModelAliasRequest struct { |
| Aliases map[string][]config.OAuthModelAlias `json:"aliases"` |
| } |
|
|
| |
| type UpdateAmpCodeRequest struct { |
| AmpCode config.AmpCode `json:"amp_code"` |
| } |
|
|
| |
| type UpdateAmpModelMappingsRequest struct { |
| Mappings []config.AmpModelMapping `json:"mappings"` |
| } |
|
|
| |
| type UpdateAmpUpstreamAPIKeysRequest struct { |
| Keys []config.AmpUpstreamAPIKeyEntry `json:"keys"` |
| } |
|
|
| |
| type UpdateRemoteManagementRequest struct { |
| AllowRemote bool `json:"allow_remote"` |
| SecretHash string `json:"secret_hash,omitempty"` |
| } |
|
|
| |
| type UpdateQuotaExceededRequest struct { |
| SwitchProject bool `json:"switch_project"` |
| SwitchPreviewModel bool `json:"switch_preview_model"` |
| } |
|
|
| |
| type VersionResponse struct { |
| LatestVersion string `json:"latest_version"` |
| } |
|
|
| |
| type FieldUpdateRequest struct { |
| Value interface{} `json:"value"` |
| } |
|
|
| |
| type StringFieldUpdateRequest struct { |
| Value *string `json:"value"` |
| } |
|
|
| |
| type BoolFieldUpdateRequest struct { |
| Value *bool `json:"value"` |
| } |
|
|
| |
| type IntFieldUpdateRequest struct { |
| Value *int `json:"value"` |
| } |
|
|