secrets

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package secrets keeps machine passwords in the system's password store when the user asks for it: the macOS Keychain or Windows Credential Manager. A password never appears in a program's arguments. Other systems have no store here: passwords are asked for each session.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnavailable = errors.New("remembering passwords needs the macOS Keychain or Windows Credential Manager")

ErrUnavailable means there is no password store on this system.

Functions

func Account

func Account(name, destination string) string

Account is the store's account name for a machine.

func Available

func Available() bool

Available reports whether passwords can be remembered on this system.

func Delete

func Delete(account string) error

Delete removes the stored password for an account (no error when there is none).

func Get

func Get(account string) (string, bool)

Get returns the stored password for an account.

func Set

func Set(account, password string) error

Set stores (or replaces) the password for an account (e.g. "studio me@10.0.0.5").

func StoreName added in v0.3.0

func StoreName() string

StoreName names this system's password store for people: "the Keychain".

Types

This section is empty.

Jump to

Keyboard shortcuts

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