Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrCredentialsRejected = errors.New("Chrome OAuth 续签材料失效")
ErrCredentialsRejected 表示上游已拒绝保存的 Chrome 续签材料
Functions ¶
func DefaultChromeRoot ¶
DefaultChromeRoot 返回稳定版 Chrome User Data 目录
func Refresh ¶
func Refresh(ctx context.Context, material aistudio.ChromeOAuthMaterial, proxy string) ([]aistudio.StateCookie, error)
Refresh 使用保存的设备绑定材料重新签发 Google Cookie
Types ¶
type Account ¶
type Account struct {
ID string `json:"id"`
GaiaID string `json:"-"`
Profile string `json:"profile"`
DisplayName string `json:"display_name"`
Email string `json:"email"`
Locale string `json:"locale"`
Importable bool `json:"importable"`
}
Account 描述本机 Chrome 中可发现的 Google 账号
type ImportOptions ¶
type ImportOptions struct {
AccountIDs []string
ChromeRoot string
Proxy string
Profiles []string
Emails []string
}
ImportOptions 保存 Chrome 批量导入参数
type ImportResult ¶
type ImportResult struct {
Profile string
DisplayName string
Email string
Locale string
CookieCount int
State aistudio.StorageState
}
ImportResult 返回一个已验证前的账号状态
func Import ¶
func Import(ctx context.Context, options ImportOptions) ([]ImportResult, error)
Import 通过设备绑定 OAuth 材料生成 Playwright storage state
type Verification ¶
type Verification struct {
ModelCount int
}
Verification 保存 AI Studio 登录页与模型目录验收结果
func Verify ¶
func Verify(ctx context.Context, state *aistudio.StorageState, proxy string) (Verification, error)
Verify 验证账号可访问 WAA 页面并读取实时模型目录