Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountConfig ¶
type AccountConfig struct {
ID string `yaml:"id" json:"id"`
Pool string `yaml:"pool,omitempty" json:"pool,omitempty"`
Email string `yaml:"email,omitempty" json:"email,omitempty"`
RefreshToken string `yaml:"refresh_token,omitempty" json:"refresh_token,omitempty"`
AccessToken string `yaml:"access_token,omitempty" json:"access_token,omitempty"`
ExpiresAt time.Time `yaml:"expires_at,omitempty" json:"expires_at,omitempty"`
ProjectID string `yaml:"project_id,omitempty" json:"project_id,omitempty"`
ProfileARN string `yaml:"profile_arn,omitempty" json:"profile_arn,omitempty"`
APIKey string `yaml:"api_key,omitempty" json:"api_key,omitempty"`
AccountID string `yaml:"account_id,omitempty" json:"account_id,omitempty"`
Status string `yaml:"status,omitempty" json:"status,omitempty"`
Disabled bool `yaml:"disabled,omitempty" json:"disabled,omitempty"`
Weight float64 `yaml:"weight,omitempty" json:"weight,omitempty"`
}
type ComboConfig ¶
type ComboConfig struct {
Name string `yaml:"name" json:"name"`
Strategy string `yaml:"strategy" json:"strategy"` // "failover", "round_robin"
Targets []ComboTarget `yaml:"targets" json:"targets"`
}
type ComboTarget ¶
type Config ¶
type Config struct {
Server ServerConfig `yaml:"server"`
Providers []ProviderConfig `yaml:"providers"`
Combos []ComboConfig `yaml:"combos"`
Keys []VirtualKey `yaml:"keys,omitempty" json:"keys,omitempty"`
}
func DefaultConfig ¶
func DefaultConfig() *Config
type ProviderConfig ¶
type ProviderConfig struct {
ID string `yaml:"id"`
Type string `yaml:"type"` // "openai", "antigravity", "kiro"
BaseURL string `yaml:"base_url,omitempty"`
APIKey string `yaml:"api_key,omitempty"`
RefreshToken string `yaml:"refresh_token,omitempty"`
ProfileARN string `yaml:"profile_arn,omitempty"`
Strategy string `yaml:"strategy,omitempty"` // "priority", "round_robin", "balanced"
Headers map[string]string `yaml:"headers,omitempty"`
Accounts []AccountConfig `yaml:"accounts,omitempty"`
}
type ServerConfig ¶
type ServerConfig struct {
Port int `yaml:"port" json:"port"`
Host string `yaml:"host" json:"host"`
StorageDir string `yaml:"storage_dir" json:"storage_dir"`
DisableDashboard bool `yaml:"disable_dashboard,omitempty" json:"disable_dashboard,omitempty"`
EnableDashboard bool `yaml:"enable_dashboard,omitempty" json:"enable_dashboard,omitempty"`
}
type VirtualKey ¶ added in v0.3.0
type VirtualKey struct {
ID string `yaml:"id" json:"id"`
Name string `yaml:"name" json:"name"`
Key string `yaml:"key" json:"key"` // e.g. "sk-goroute-..."
IsActive bool `yaml:"is_active" json:"is_active"`
AllowedModels []string `yaml:"allowed_models,omitempty" json:"allowed_models,omitempty"`
MaxRPM int `yaml:"max_rpm,omitempty" json:"max_rpm,omitempty"`
TotalTokensUsed int `yaml:"total_tokens_used,omitempty" json:"total_tokens_used,omitempty"`
CreatedAt time.Time `yaml:"created_at" json:"created_at"`
}
Click to show internal directories.
Click to hide internal directories.