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 SaveUIState(state UIState) error
- func UpsertManagedAccount(account *Account) error
- type AccessTokenClaims
- type Account
- type AccountsLoadResult
- type Source
- type UIState
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 SaveUIState ¶
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 (*Account) SourceLabel ¶
type AccountsLoadResult ¶
type AccountsLoadResult struct {
Accounts []*Account
SourcesByAccountID map[string][]string
ActiveSourcesByIdentity map[string][]string
}
func LoadAllAccountsWithSources ¶
func LoadAllAccountsWithSources() (AccountsLoadResult, error)
Click to show internal directories.
Click to hide internal directories.