provider

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	AccountID     string `json:"id"`
	Email         string `json:"email,omitempty"`
	Label         string `json:"label,omitempty"`
	RateLimitTier string `json:"rate_limit_tier,omitempty"`
	Active        bool   `json:"active"`
	SwitchID      string `json:"switch_id,omitempty"`
}

type AccountManager

type AccountManager interface {
	ProviderID() ID
	Discover(ctx context.Context) ([]Account, error)
	Switch(ctx context.Context, identifier string) (Account, error)
}

type ID

type ID string

ID identifies a provider.

const (
	Claude ID = "claude"
	Codex  ID = "codex"
	Gemini ID = "gemini"
)

type Provider

type Provider interface {
	Fetch(ctx context.Context, now time.Time) ([]quota.Result, error)
}

Provider fetches quota information for an AI service.

type Services

type Services struct {
	Usage Provider
}

Services groups the service implementations for a provider. Currently only Usage is populated; additional fields can be added without changing the Runner interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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