Documentation
¶
Overview ¶
Package secrets is the one place celestial-data knows its secrets: each service it signs in to, the fields that service's secret has, and where in 1Password the person who runs it keeps that secret. The config says where; op reads it, each time it is needed.
A secret goes only to the code that asked for it. What op prints, the secret, is never put in an error, and nothing this package writes holds it.
Two things are passed on as they come, and are trusted to hold no secret: op's own words when it fails, and an error from the Reader a Keeper is given. That boundary is theirs to keep, and is the whole of what this package promises.
Index ¶
Constants ¶
const Tool = "celestial-data-secrets"
Tool is the name of the command that keeps the secrets, and of its folder in the person's config.
Variables ¶
This section is empty.
Functions ¶
func Beside ¶
Beside is a file of a name in the config's folder under a home, where what a login keeps is kept unless the person says otherwise.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper reads the secrets of the services the config places, through a reader.
func Open ¶
Open is a keeper of the services the config at path places, reading through keys. A config that is not there places nothing; one that will not read is refused, naming its line.
type OnePassword ¶
type OnePassword struct {
// contains filtered or unexported fields
}
OnePassword reads secrets with the 1Password command, op. Each read may ask the person at the keyboard to allow it.
func NewOnePassword ¶
func NewOnePassword(command string) OnePassword
NewOnePassword is a reader that runs command as op.
func (OnePassword) Read ¶
func (keys OnePassword) Read(reference string) (string, error)
Read runs op read for reference and gives what it printed, without the end of the line. A failure names the reference and passes on op's own words from its errors, never what it printed. That those words hold no secret is op's to keep.