Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultBasicKeyringFolder = ".ark_cache/keyring" ArkBasicKeyringFolderEnvVar = "ARK_KEYRING_FOLDER" )
Variables for basic keyring
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicAuthTransport ¶
type BasicAuthTransport struct { Transport http.RoundTripper Username string Password string }
BasicAuthTransport is a custom HTTP transport that adds Basic Authentication to requests.
type BasicKeyring ¶
type BasicKeyring struct {
// contains filtered or unexported fields
}
BasicKeyring is a simple keyring implementation that uses AES encryption to store passwords.
func NewBasicKeyring ¶
func NewBasicKeyring() *BasicKeyring
NewBasicKeyring creates a new BasicKeyring instance. It initializes the keyring folder and file paths.
func (*BasicKeyring) DeletePassword ¶
func (b *BasicKeyring) DeletePassword(serviceName, username string) error
DeletePassword deletes a password for a given service and username from the keyring.
func (*BasicKeyring) GetPassword ¶
func (b *BasicKeyring) GetPassword(serviceName, username string) (string, error)
GetPassword retrieves a password for a given service and username from the keyring.
func (*BasicKeyring) SetPassword ¶
func (b *BasicKeyring) SetPassword(serviceName, username, password string) error
SetPassword sets a password for a given service and username in the keyring.
type HeaderTransport ¶
type HeaderTransport struct { Transport http.RoundTripper Headers map[string]string }
HeaderTransport is a custom HTTP transport that adds headers to requests.
Click to show internal directories.
Click to hide internal directories.