Documentation
¶
Overview ¶
Package secrets keeps the secrets gitd stores on disk — the tokens and private keys of connections made through the API — sealed with a key kept apart, when one is given.
Without a key a secret is kept as it is, and only the file's permissions protect it. With one, a copy of the state directory or a backup of it opens nothing without the key.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Box ¶
type Box struct {
// contains filtered or unexported fields
}
Box seals and opens secrets with one key, or keeps them as they are without one.
func Open ¶
Open returns the box for the key in keyFile, or a box without a key when keyFile is empty. The key is 32 bytes, written raw, in hex or in base64.