config

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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"`
	Email        string    `yaml:"email,omitempty"`
	RefreshToken string    `yaml:"refresh_token,omitempty"`
	AccessToken  string    `yaml:"access_token,omitempty"`
	ExpiresAt    time.Time `yaml:"expires_at,omitempty"`
	ProjectID    string    `yaml:"project_id,omitempty"`
}

type ComboConfig

type ComboConfig struct {
	Name     string        `yaml:"name"`
	Strategy string        `yaml:"strategy"` // "failover", "round_robin"
	Targets  []ComboTarget `yaml:"targets"`
}

type ComboTarget

type ComboTarget struct {
	ProviderID string `yaml:"provider_id"`
	Model      string `yaml:"model"`
}

type Config

type Config struct {
	Server    ServerConfig     `yaml:"server"`
	Providers []ProviderConfig `yaml:"providers"`
	Combos    []ComboConfig    `yaml:"combos"`
}

func DefaultConfig

func DefaultConfig() *Config

func Load

func Load(path string) (*Config, error)

func (*Config) Save

func (c *Config) Save(path string) error

type ProviderConfig

type ProviderConfig struct {
	ID       string          `yaml:"id"`
	Type     string          `yaml:"type"` // "openai", "antigravity"
	BaseURL  string          `yaml:"base_url,omitempty"`
	APIKey   string          `yaml:"api_key,omitempty"`
	Accounts []AccountConfig `yaml:"accounts,omitempty"`
}

type ServerConfig

type ServerConfig struct {
	Port       int    `yaml:"port"`
	Host       string `yaml:"host"`
	StorageDir string `yaml:"storage_dir"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL