secrets

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package secrets wraps the OS keyring for Alaska's API keys. Service = "alaska-cli"; account = provider name (e.g. "openai", "anthropic").

Index

Constants

View Source
const Service = "alaska-cli"

Variables

View Source
var ErrNotFound = errors.New("no API key stored for provider")

Functions

func Delete

func Delete(provider string) error

Delete removes the API key for a provider. Idempotent — no error if nothing stored.

func Get

func Get(provider string) (string, error)

Get retrieves the API key for a provider. Returns ErrNotFound if nothing stored.

func Has

func Has(provider string) bool

Has reports whether an API key is stored for a provider.

func Set

func Set(provider, apiKey string) error

Set stores (or replaces) the API key for a provider.

Types

This section is empty.

Jump to

Keyboard shortcuts

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