Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CliProxyTypeToProvider = map[string]string{
"anthropic": "claude",
"claude": "claude",
"codex": "codex",
"antigravity": "antigravity",
"kimi": "kimi",
"meta": "muse-code",
}
CliProxyTypeToProvider maps CLIProxyAPI types to GoRoute provider IDs.
Functions ¶
func DefaultCliProxyDir ¶
func DefaultCliProxyDir() string
DefaultCliProxyDir returns ~/.cli-proxy-api or CLIPROXYAPI_CONFIG_DIR env var.
Types ¶
type ParsedCliProxyAuth ¶
type ParsedCliProxyAuth struct {
Provider string `json:"provider"`
Type string `json:"type"`
Email string `json:"email,omitempty"`
AccessToken string `json:"access_token,omitempty"`
RefreshToken string `json:"refresh_token,omitempty"`
ExpiresAt string `json:"expires_at,omitempty"`
ProjectID string `json:"project_id,omitempty"`
ProviderSpecificData map[string]interface{} `json:"provider_specific_data,omitempty"`
}
ParsedCliProxyAuth represents a normalized credential from CLIProxyAPI.
func ParseCliProxyAuthRecord ¶
func ParseCliProxyAuthRecord(raw map[string]interface{}, now time.Time) *ParsedCliProxyAuth
ParseCliProxyAuthRecord parses one json raw map into a ParsedCliProxyAuth or returns nil.
func ScanCliProxyAuthDir ¶
func ScanCliProxyAuthDir(dir string) ([]ParsedCliProxyAuth, int, int, error)
ScanCliProxyAuthDir scans the given directory for all *.json credentials.