Documentation
¶
Index ¶
- Variables
- func AppendToAccounts(accountsPath string, account AmpedAccount) error
- func DeleteAllFromKeyring() error
- func DeleteAllThreads(threadsPath string) error
- func DeleteFromAccounts(accountsPath, name string) error
- func DeleteFromKeyring(user string) error
- func DeleteHistoryFile(historyPath string) error
- func EnsureAccounts(accountsPath string) error
- func ExtractApiKey(secretsPath string) (string, error)
- func ReadFromKeyring(user string) (string, error)
- func UpdateActiveAccount(accountsPath, name string) error
- func WriteToAccounts(accountsPath string, accounts AmpedAccounts) error
- func WriteToAmpSecrets(apiKey, secretsPath string) error
- type AmpSecrets
- type AmpedAccount
- type AmpedAccounts
Constants ¶
This section is empty.
Variables ¶
View Source
var Viper = viper.New()
Functions ¶
func AppendToAccounts ¶
func AppendToAccounts(accountsPath string, account AmpedAccount) error
func DeleteAllFromKeyring ¶
func DeleteAllFromKeyring() error
func DeleteAllThreads ¶
func DeleteFromAccounts ¶
func DeleteFromKeyring ¶
func DeleteHistoryFile ¶
func EnsureAccounts ¶
func ExtractApiKey ¶
func ReadFromKeyring ¶
func UpdateActiveAccount ¶
func WriteToAccounts ¶
func WriteToAccounts(accountsPath string, accounts AmpedAccounts) error
func WriteToAmpSecrets ¶
Types ¶
type AmpSecrets ¶
type AmpSecrets struct {
APIKeyHTTPSAmpcodeCom string `json:"apiKey@https://ampcode.com/"`
}
type AmpedAccount ¶
type AmpedAccount struct {
Name string `json:"name"`
}
type AmpedAccounts ¶
type AmpedAccounts struct {
Accounts []AmpedAccount `json:"accounts"`
Active string `json:"active"`
}
func ReadFromAccounts ¶
func ReadFromAccounts(accountsPath string) (AmpedAccounts, error)
Click to show internal directories.
Click to hide internal directories.