Documentation
¶
Index ¶
- func ActiveIdentityKeys(account *Account) []string
- func ApplyAccountToCodex(account *Account) (string, error)
- func ApplyAccountToOpenCode(account *Account) (string, error)
- func ApplyAccountToTarget(account *Account, target Source) (string, error)
- func ApplyAccountToTargets(account *Account, targets []Source) (map[Source]string, map[Source]error)
- func CanonicalAccountID(ids ...string) string
- func DeleteAccountFromSource(account *Account, source Source) error
- func DeleteCodexAuthAccount() error
- func DeleteManagedAccount(accountID string) error
- func DeleteManagedAccountByIdentity(account *Account) error
- func DeleteOpenCodeAuthAccount() error
- func SaveAccount(account *Account) error
- func SaveSettings(settings Settings) error
- func SaveUIState(state UIState) error
- func SaveUpdateState(state UpdateState) error
- func SetDismissedUpdateVersion(version string) error
- func SyncAccountEverywhere(account *Account) error
- func UpsertManagedAccount(account *Account) error
- type AccessTokenClaims
- type Account
- type AccountsLoadResult
- type Settings
- type Source
- type UIState
- type UpdateState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActiveIdentityKeys ¶
func ApplyAccountToCodex ¶
func ApplyAccountToOpenCode ¶
func ApplyAccountToTarget ¶
func ApplyAccountToTargets ¶
func CanonicalAccountID ¶
func DeleteAccountFromSource ¶
func DeleteCodexAuthAccount ¶
func DeleteCodexAuthAccount() error
func DeleteManagedAccount ¶
func DeleteOpenCodeAuthAccount ¶
func DeleteOpenCodeAuthAccount() error
func SaveAccount ¶
func SaveSettings ¶ added in v0.1.5
func SaveUIState ¶
func SaveUpdateState ¶ added in v0.1.5
func SaveUpdateState(state UpdateState) error
func SetDismissedUpdateVersion ¶ added in v0.1.5
func SyncAccountEverywhere ¶ added in v0.3.2
func UpsertManagedAccount ¶
Types ¶
type AccessTokenClaims ¶
func ParseAccessToken ¶
func ParseAccessToken(token string) AccessTokenClaims
type Account ¶
type Account struct {
Key string
Label string
Email string
AccountID string
AccessToken string
RefreshToken string
ExpiresAt time.Time
ClientID string
Source Source
FilePath string
Writable bool
}
func LoadAllAccounts ¶
func LoadManagedAccounts ¶
func ResolveFreshAccount ¶ added in v0.3.2
func (*Account) SourceLabel ¶
type AccountsLoadResult ¶
type AccountsLoadResult struct {
Accounts []*Account
SourcesByAccountID map[string][]string
ActiveSourcesByIdentity map[string][]string
}
func LoadAllAccountsWithSources ¶
func LoadAllAccountsWithSources() (AccountsLoadResult, error)
type Settings ¶ added in v0.1.5
type Settings struct {
CheckForUpdateOnStartup bool `json:"check_for_update_on_startup"`
}
func DefaultSettings ¶ added in v0.1.5
func DefaultSettings() Settings
func LoadSettings ¶ added in v0.1.5
type UIState ¶
type UIState struct {
CompactMode bool `json:"compact_mode"`
ExhaustedAccountKeys []string `json:"exhausted_account_keys"`
AccountOrderKeys []string `json:"account_order_keys"`
ActiveAccountKey string `json:"active_account_key"`
}
func LoadUIState ¶
type UpdateState ¶ added in v0.1.5
type UpdateState struct {
LatestVersion string `json:"latest_version"`
LastCheckedAt time.Time `json:"last_checked_at"`
DismissedVersion string `json:"dismissed_version"`
}
func LoadUpdateState ¶ added in v0.1.5
func LoadUpdateState() (UpdateState, error)
Click to show internal directories.
Click to hide internal directories.