internal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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 DeleteAllThreads(threadsPath string) error

func DeleteFromAccounts

func DeleteFromAccounts(accountsPath, name string) error

func DeleteFromKeyring

func DeleteFromKeyring(user string) error

func DeleteHistoryFile

func DeleteHistoryFile(historyPath string) error

func EnsureAccounts

func EnsureAccounts(accountsPath string) error

func ExtractApiKey

func ExtractApiKey(secretsPath string) (string, error)

func ReadFromKeyring

func ReadFromKeyring(user string) (string, error)

func UpdateActiveAccount

func UpdateActiveAccount(accountsPath, name string) error

func WriteToAccounts

func WriteToAccounts(accountsPath string, accounts AmpedAccounts) error

func WriteToAmpSecrets

func WriteToAmpSecrets(apiKey, secretsPath string) error

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)

Jump to

Keyboard shortcuts

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