Versions in this module Expand all Collapse all v0 v0.3.0 Jul 11, 2026 v0.2.0 Mar 26, 2026 v0.1.1 Mar 20, 2026 v0.1.0 Mar 17, 2026 Changes in this version + var DefaultPorts = []int + func DetectModelCategory(modelName string) string + func EstimateGPUMemory(modelName string) int + func MaskApiKey(apiKey string) string + func PrintBullet(msg string) + func PrintError(msg string) + func PrintHeader(title string) + func PrintInfo(msg string) + func PrintKeyValue(key, value string) + func PrintStep(step, total int, title string) + func PrintSuccess(msg string) + func PrintWarning(msg string) + func ValidateEVMAddress(addr string) error + func ValidateEmail(email string) error + func ValidateName(name string) error + func ValidatePassword(password string) error + type AuthClient struct + func NewAuthClient(baseURL string) *AuthClient + func (c *AuthClient) CreateProviderKey(userToken, keyName string) (*CreateProviderKeyResponse, error) + func (c *AuthClient) GetProviderStatus(apiKey string) (*ProviderStatusResponse, error) + func (c *AuthClient) Login(email, password string) (*UserLoginResponse, error) + func (c *AuthClient) ProviderSignup(name, ownerAddress string) (*ProviderSignupResponse, error) + func (c *AuthClient) Signup(email, password, displayName string) (*UserSignupResponse, error) + func (c *AuthClient) UpgradeToProvider(token, name, walletAddress string) (*UpgradeToProviderResponse, error) + func (c *AuthClient) ValidateApiKey(apiKey string) (bool, error) + type CreateProviderKeyRequest struct + Name string + type CreateProviderKeyResponse struct + ApiKey string + Error string + Message string + ProviderID string + type Credentials struct + ApiKey string + Email string + Name string + ProviderID string + type CredentialsManager struct + func NewCredentialsManager(cpPath string) *CredentialsManager + func (m *CredentialsManager) Delete() error + func (m *CredentialsManager) GetApiKey() string + func (m *CredentialsManager) HasApiKey() bool + func (m *CredentialsManager) Load() (*Credentials, error) + func (m *CredentialsManager) Save(creds *Credentials) error + type DiscoveredServer struct + Endpoint string + Healthy bool + Host string + Models []string + Port int + RawModels []ModelInfo + Type ServerType + type GPUInfo struct + Index int + MemoryFree int + MemoryMB int + Name string + func GetGPUInfo() ([]GPUInfo, error) + type ModelDiscovery struct + func NewModelDiscovery() *ModelDiscovery + func (d *ModelDiscovery) DiscoverAll() []DiscoveredServer + func (d *ModelDiscovery) DiscoverOnPorts(host string, ports []int) []DiscoveredServer + func (d *ModelDiscovery) VerifyModel(endpoint, model string, serverType ServerType) error + type ModelInfo struct + Category string + ID string + Name string + type ModelMatch struct + Confidence float64 + LocalModel string + SwanModelID string + SwanModelName string + func MatchModels(localModels []string, swanModels []SwanModel) []ModelMatch + type PrerequisiteChecker struct + func NewPrerequisiteChecker() *PrerequisiteChecker + func (pc *PrerequisiteChecker) CheckAll() []PrerequisiteResult + func (pc *PrerequisiteChecker) GetResults() []PrerequisiteResult + func (pc *PrerequisiteChecker) HasCriticalFailures() bool + type PrerequisiteResult struct + Message string + Name string + Status bool + Version string + type Prompter struct + func NewPrompter() *Prompter + func (p *Prompter) AskMultiSelect(prompt string, options []SelectionOption) ([]int, error) + func (p *Prompter) AskPassword(prompt string) (string, error) + func (p *Prompter) AskSelection(prompt string, options []SelectionOption) (int, error) + func (p *Prompter) AskString(prompt string, defaultValue string) (string, error) + func (p *Prompter) AskYesNo(prompt string, defaultYes bool) (bool, error) + type ProviderSignupRequest struct + BeneficiaryAddress string + Description string + Name string + OwnerAddress string + WorkerAddress string + type ProviderSignupResponse struct + ApiKey string + CanConnect bool + Error string + KeyPrefix string + Message string + NextSteps []string + ProviderID string + Status string + type ProviderStatusResponse struct + ApiKeyValid bool + CanConnect bool + Error string + Message string + Name string + NextSteps []string + ProviderID string + Status string + type SelectionOption struct + Description string + Label string + Value interface{} + type ServerType string + const ServerTypeOllama + const ServerTypeOpenAI + const ServerTypeSGLang + const ServerTypeUnknown + const ServerTypeVLLM + type Spinner struct + func NewSpinner(message string) *Spinner + func (s *Spinner) Start() + func (s *Spinner) Stop() + func (s *Spinner) StopWithError(msg string) + func (s *Spinner) StopWithSuccess(msg string) + type SwanModel struct + Active bool + Category string + ID string + Name string + Slug string + func FetchSwanModels(apiURL string) ([]SwanModel, error) + type UpgradeToProviderRequest struct + BeneficiaryAddress string + Description string + Name string + WalletAddress string + WorkerAddress string + type UpgradeToProviderResponse struct + CanConnect bool + Error string + Message string + NextSteps []string + ProviderApiKey string + ProviderID string + ProviderKeyPrefix string + Status string + type UserLoginRequest struct + Email string + Password string + type UserLoginResponse struct + Error string + Token string + User *UserPublicInfo + type UserPublicInfo struct + AccountType string + DisplayName string + Email string + ID string + ProviderID string + type UserSignupRequest struct + DisplayName string + Email string + Password string + type UserSignupResponse struct + ApiKey string + Error string + Token string + User *UserPublicInfo