chromeauth

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 32 Imported by: 0 modules, 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

func Refresh

func Refresh(ctx context.Context, material auth.OAuthMaterial, proxy string) ([]gemini.Cookie, error)

Refresh 使用已保存的设备绑定材料重新签发 Google Cookie

func RunSetup

func RunSetup(ctx context.Context, args []string, stdin io.Reader, stdout io.Writer, stderr io.Writer, interactive bool) error

RunSetup 执行首次账号配置

Types

type Account

type Account struct {
	Profile     string `json:"profile"`
	DisplayName string `json:"displayName"`
	Email       string `json:"email"`
	Importable  bool   `json:"importable"`
}

Account 描述本机 Chrome 中可发现的 Google 账号

func Discover

func Discover(chromeRoot string) ([]Account, error)

Discover 只读列出本机 Chrome Google 账号

type CookieImportOptions

type CookieImportOptions struct {
	Header string
	ID     string
	Output string
	Proxy  string
}

CookieImportOptions 保存 Cookie Header 导入参数

type ImportOptions

type ImportOptions struct {
	ChromeRoot string
	Output     string
	Proxy      string
	Profiles   []string
	Emails     []string
}

ImportOptions 保存批量导入参数

type ImportResult

type ImportResult struct {
	Profile     string `json:"profile"`
	Email       string `json:"email"`
	Imported    bool   `json:"imported"`
	CookieCount int    `json:"cookieCount"`
	Path        string `json:"path"`
	CompletedAt string `json:"completedAt"`
}

ImportResult 描述单个账号导入结果

func Import

func Import(ctx context.Context, options ImportOptions) ([]ImportResult, int, error)

Import 通过设备绑定 OAuth 认证材料生成协议账号状态

func ImportCookieHeader

func ImportCookieHeader(ctx context.Context, options CookieImportOptions) (ImportResult, int, error)

ImportCookieHeader 从浏览器请求头生成短期账号状态

Jump to

Keyboard shortcuts

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