Download internal/application/dto/config_dto.go from shimen/API: direct link, hf CLI and curl.
- Browser
- Download file 6.05 kB
-
https://huggingface.co/spaces/shimen/API/resolve/main/internal/application/dto/config_dto.go
- Command line
-
hf download hf://spaces/shimen/API/internal/application/dto/config_dto.go
-
curl -L -o config_dto.go https://huggingface.co/spaces/shimen/API/resolve/main/internal/application/dto/config_dto.go
6.05 kB
| // Package dto provides data transfer objects for the application layer. | |
| package dto | |
| import ( | |
| "github.com/router-for-me/CLIProxyAPI/v6/internal/config" | |
| ) | |
| // ConfigResponse represents a configuration response | |
| 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"` | |
| } | |
| // RoutingConfig represents routing configuration | |
| type RoutingConfig struct { | |
| Strategy string `json:"strategy"` | |
| } | |
| // RemoteManagementConfig represents remote management configuration | |
| type RemoteManagementConfig struct { | |
| AllowRemote bool `json:"allow_remote"` | |
| SecretKey string `json:"secret_key,omitempty"` | |
| } | |
| // QuotaExceededConfig represents quota exceeded configuration | |
| type QuotaExceededConfig struct { | |
| SwitchProject bool `json:"switch_project"` | |
| SwitchPreviewModel bool `json:"switch_preview_model"` | |
| } | |
| // UpdateConfigRequest represents a request to update configuration | |
| type UpdateConfigRequest struct { | |
| Config config.Config `json:"config"` | |
| } | |
| // UpdateAPIKeysRequest represents a request to update API keys | |
| type UpdateAPIKeysRequest struct { | |
| Keys []string `json:"keys"` | |
| } | |
| // UpdateGeminiKeysRequest represents a request to update Gemini keys | |
| type UpdateGeminiKeysRequest struct { | |
| Keys []config.GeminiKey `json:"keys"` | |
| } | |
| // UpdateClaudeKeysRequest represents a request to update Claude keys | |
| type UpdateClaudeKeysRequest struct { | |
| Keys []config.ClaudeKey `json:"keys"` | |
| } | |
| // UpdateCodexKeysRequest represents a request to update Codex keys | |
| type UpdateCodexKeysRequest struct { | |
| Keys []config.CodexKey `json:"keys"` | |
| } | |
| // UpdateOpenAICompatRequest represents a request to update OpenAI compatibility | |
| type UpdateOpenAICompatRequest struct { | |
| Entries []config.OpenAICompatibility `json:"entries"` | |
| } | |
| // UpdateVertexCompatKeysRequest represents a request to update Vertex compatibility keys | |
| type UpdateVertexCompatKeysRequest struct { | |
| Keys []config.VertexCompatKey `json:"keys"` | |
| } | |
| // UpdateKiroKeysRequest represents a request to update Kiro keys | |
| type UpdateKiroKeysRequest struct { | |
| Keys []config.KiroKey `json:"keys"` | |
| } | |
| // UpdateOAuthExcludedModelsRequest represents a request to update OAuth excluded models | |
| type UpdateOAuthExcludedModelsRequest struct { | |
| Models map[string][]string `json:"models"` | |
| } | |
| // UpdateOAuthModelAliasRequest represents a request to update OAuth model aliases | |
| type UpdateOAuthModelAliasRequest struct { | |
| Aliases map[string][]config.OAuthModelAlias `json:"aliases"` | |
| } | |
| // UpdateAmpCodeRequest represents a request to update AmpCode | |
| type UpdateAmpCodeRequest struct { | |
| AmpCode config.AmpCode `json:"amp_code"` | |
| } | |
| // UpdateAmpModelMappingsRequest represents a request to update Amp model mappings | |
| type UpdateAmpModelMappingsRequest struct { | |
| Mappings []config.AmpModelMapping `json:"mappings"` | |
| } | |
| // UpdateAmpUpstreamAPIKeysRequest represents a request to update Amp upstream API keys | |
| type UpdateAmpUpstreamAPIKeysRequest struct { | |
| Keys []config.AmpUpstreamAPIKeyEntry `json:"keys"` | |
| } | |
| // UpdateRemoteManagementRequest represents a request to update remote management settings | |
| type UpdateRemoteManagementRequest struct { | |
| AllowRemote bool `json:"allow_remote"` | |
| SecretHash string `json:"secret_hash,omitempty"` | |
| } | |
| // UpdateQuotaExceededRequest represents a request to update quota exceeded settings | |
| type UpdateQuotaExceededRequest struct { | |
| SwitchProject bool `json:"switch_project"` | |
| SwitchPreviewModel bool `json:"switch_preview_model"` | |
| } | |
| // VersionResponse represents a version response | |
| type VersionResponse struct { | |
| LatestVersion string `json:"latest_version"` | |
| } | |
| // FieldUpdateRequest represents a request to update a single field | |
| type FieldUpdateRequest struct { | |
| Value interface{} `json:"value"` | |
| } | |
| // StringFieldUpdateRequest represents a request to update a string field | |
| type StringFieldUpdateRequest struct { | |
| Value *string `json:"value"` | |
| } | |
| // BoolFieldUpdateRequest represents a request to update a bool field | |
| type BoolFieldUpdateRequest struct { | |
| Value *bool `json:"value"` | |
| } | |
| // IntFieldUpdateRequest represents a request to update an int field | |
| type IntFieldUpdateRequest struct { | |
| Value *int `json:"value"` | |
| } | |