keychain

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package keychain provides secure credential storage using the system keychain. On macOS it uses Keychain, on Windows it uses Credential Manager, and on Linux it uses Secret Service (via D-Bus).

Index

Constants

View Source
const (
	// ServiceName is the service identifier used for all Wails credentials
	ServiceName = "wails"

	// Credential keys
	KeyWindowsCertPassword = "windows-cert-password"
	KeyPGPPassword         = "pgp-password"
)

Variables

This section is empty.

Functions

func Delete

func Delete(key string) error

Delete removes a credential from the system keychain.

func Exists

func Exists(key string) bool

Exists checks if a credential exists in the keychain or environment.

func Get

func Get(key string) (string, error)

Get retrieves a credential from the system keychain. Returns the value and nil error if found, or empty string and error if not found. Also checks environment variables as a fallback (useful for CI).

func Set

func Set(key, value string) error

Set stores a credential in the system keychain. The credential is identified by a key and can be retrieved later with Get.

Types

This section is empty.

Jump to

Keyboard shortcuts

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