gopass: Index | Files | Directories

package secret

import ""


Package Files



const (
    // Ident is the Gopass MIME secret header
    Ident = "GOPASS-SECRET-1.0"


var (
    // WriteMIME can be disabled to disable writing the new secrets format.
    // Use this to ensure secrets written by gopass can be correctly consumed
    // by other Password Store implementations, too.
    WriteMIME = true

type MIME Uses

type MIME struct {
    Header textproto.MIMEHeader
    // contains filtered or unexported fields

MIME is a gopass MIME secret

func New Uses

func New() *MIME

New creates a new MIME secret

func ParseMIME Uses

func ParseMIME(buf []byte) (*MIME, error)

ParseMIME tries to parse a MIME secret

func (*MIME) Bytes Uses

func (s *MIME) Bytes() []byte

Bytes serializes the secret

func (*MIME) Del Uses

func (s *MIME) Del(key string)

Del removes a key

func (*MIME) Equals Uses

func (s *MIME) Equals(other *MIME) bool

Equals compare two secrets

func (*MIME) Get Uses

func (s *MIME) Get(key string) string

Get returns the value of a single key

func (*MIME) GetBody Uses

func (s *MIME) GetBody() string

GetBody returns the body

func (*MIME) Keys Uses

func (s *MIME) Keys() []string

Keys returns all keys

func (*MIME) MIME Uses

func (s *MIME) MIME() *MIME

MIME returns self

func (*MIME) Set Uses

func (s *MIME) Set(key, value string)

Set sets a value of a key

func (*MIME) Write Uses

func (s *MIME) Write(p []byte) (int, error)

Write implements io.Writer

func (*MIME) WriteString Uses

func (s *MIME) WriteString(in string) (int, error)

WriteString appends a string to the buffer

type PermanentError Uses

type PermanentError struct {
    Err error

PermanentError signal that parsing should not attempt other formats.

func (*PermanentError) Error Uses

func (p *PermanentError) Error() string



Package secret imports 7 packages (graph). Updated 2020-09-23. Refresh now. Tools for package owners.