secret

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
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
)

Functions

This section is empty.

Types

type MIME

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

MIME is a gopass MIME secret

func New

func New() *MIME

New creates a new MIME secret

func ParseMIME

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

ParseMIME tries to parse a MIME secret

func (*MIME) Bytes

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

Bytes serializes the secret

func (*MIME) Del

func (s *MIME) Del(key string)

Del removes a key

func (*MIME) Equals

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

Equals compare two secrets

func (*MIME) Get

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

Get returns the value of a single key

func (*MIME) GetBody

func (s *MIME) GetBody() string

GetBody returns the body

func (*MIME) Keys

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

Keys returns all keys

func (*MIME) MIME

func (s *MIME) MIME() *MIME

MIME returns self

func (*MIME) Set

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

Set sets a value of a key

func (*MIME) Write

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

Write implements io.Writer

func (*MIME) WriteString

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

WriteString appends a string to the buffer

type PermanentError

type PermanentError struct {
	Err error
}

PermanentError signal that parsing should not attempt other formats.

func (*PermanentError) Error

func (p *PermanentError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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