credentials

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package credentials provides secure storage for API keys using the OS keyring.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoAPIKey           = errors.New("no API key configured")
	ErrKeyringUnavailable = errors.New("OS keyring unavailable")
)

Functions

func DeleteAPIKey

func DeleteAPIKey() error

func GetAPIKey

func GetAPIKey() (string, error)

GetAPIKey retrieves the Weather API key using the following priority: 1. Environment variable (WEATHER_API_KEY) 2. OS Keyring

func HasStoredAPIKey

func HasStoredAPIKey() bool

func IsKeyringAvailable

func IsKeyringAvailable() bool

func PromptForAPIKey

func PromptForAPIKey() (string, error)

func SetAPIKey

func SetAPIKey(key string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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