Documentation ¶
Index ¶
- Constants
- Variables
- func New() gopass.Secret
- type AKV
- func (a *AKV) Add(key string, value any) error
- func (a *AKV) Body() string
- func (a *AKV) Bytes() []byte
- func (a *AKV) Del(key string) bool
- func (a *AKV) FromMime() bool
- func (a *AKV) Get(key string) (string, bool)
- func (a *AKV) Keys() []string
- func (a *AKV) Password() string
- func (a *AKV) SafeStr() string
- func (a *AKV) Set(key string, value any) error
- func (a *AKV) SetPassword(p string)
- func (a *AKV) Values(key string) ([]string, bool)
- func (a *AKV) Write(buf []byte) (int, error)
- type PermanentError
- type YAML
- func (y *YAML) Add(key string, value any) error
- func (y *YAML) Body() string
- func (y *YAML) Bytes() []byte
- func (y *YAML) Del(key string) bool
- func (y *YAML) Get(key string) (string, bool)
- func (y *YAML) Keys() []string
- func (y *YAML) Password() string
- func (y *YAML) SafeStr() string
- func (y *YAML) Set(key string, value any) error
- func (y *YAML) SetPassword(v string)
- func (y *YAML) Values(key string) ([]string, bool)
- func (y *YAML) Write(buf []byte) (int, error)
Constants ¶
const (
// Ident is the header of the deprecated Gopass MIME secret.
Ident = "GOPASS-SECRET-1.0"
)
Variables ¶
var ErrNoYAML = fmt.Errorf("no YAML marker")
ErrNoYAML is returned when no YAML section is found.
var ErrNotSupported = fmt.Errorf("not supported")
ErrNotSupported is returned when a method is not supported.
Functions ¶
Types ¶
type AKV ¶ added in v1.15.0
type AKV struct {
// contains filtered or unexported fields
}
AKV is the new Key-Value implementation that will replace KV.
func NewAKVWithData ¶ added in v1.15.0
NewAKVWithData returns a new KV secret populated with data.
func (*AKV) FromMime ¶ added in v1.15.0
FromMime returns whether this secret was converted from a Mime secret of not.
func (*AKV) SetPassword ¶ added in v1.15.0
SetPassword updates the password.
type PermanentError ¶
type PermanentError struct {
Err error
}
PermanentError signal that parsing should not attempt other formats.
func (*PermanentError) Error ¶
func (p *PermanentError) Error() string
type YAML ¶
type YAML struct {
// contains filtered or unexported fields
}
YAML is a gopass secret that contains a parsed YAML data structure. This is a legacy data type that is discouraged for new users as YAML is neither trivial nor intuitive for users manually editing secrets (e.g. unquoted phone numbers being parsed as octal and such).
Format ------ Line | Description
0 | Password 1-n | Body n+1 | Separator ("---") n+2 | YAML content.
func (*YAML) Add ¶ added in v1.12.0
Add doesn't work since as per YAML specification keys must be unique.