format

package
v1.0.0-beta2-UNO Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package format implements the age file format.

Index

Constants

This section is empty.

Variables

View Source
var EncodeToString = b64.EncodeToString

Functions

func ArmoredReader

func ArmoredReader(r io.Reader) io.Reader

func ArmoredWriter

func ArmoredWriter(dst io.Writer) io.WriteCloser

func DecodeString

func DecodeString(s string) ([]byte, error)

func NopCloser

func NopCloser(w io.Writer) io.WriteCloser

Types

type CloserFunc

type CloserFunc func() error

func (CloserFunc) Close

func (f CloserFunc) Close() error
type Header struct {
	Recipients []*Recipient
	MAC        []byte
}

func Parse

func Parse(input io.Reader) (*Header, io.Reader, error)

Parse returns the header and a Reader that begins at the start of the payload.

func (*Header) Marshal

func (h *Header) Marshal(w io.Writer) error

func (*Header) MarshalWithoutMAC

func (h *Header) MarshalWithoutMAC(w io.Writer) error

type ParseError

type ParseError string

func (ParseError) Error

func (e ParseError) Error() string

type Recipient

type Recipient struct {
	Type string
	Args []string
	Body []byte
}

func (*Recipient) Marshal

func (r *Recipient) Marshal(w io.Writer) error

Jump to

Keyboard shortcuts

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