base64lib

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: CC0-1.0, CC0-1.0, CC0-1.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder struct {
	io.Reader
	// contains filtered or unexported fields
}

Decoder describes a base64 decoder.

func DecoderArg

func DecoderArg(c *rt.GoCont, n int) (*Decoder, error)

DecoderArg turns a continuation argument into a *Decoder.

func NewDecoder

func NewDecoder(enc *base64.Encoding, r io.Reader) *Decoder

NewDecoder returns a new base64 decoder, using the encoding enc and wrapping r.

func ValueToDecoder

func ValueToDecoder(v rt.Value) (*Decoder, bool)

ValueToDecoder turns a Lua value to a *Decoder if possible.

func (*Decoder) Encoding

func (d *Decoder) Encoding() *base64.Encoding

Encoding returns the encoding used.

func (*Decoder) String

func (*Decoder) String() string

String returns a string description of the decoder.

type Encoder

type Encoder struct {
	io.WriteCloser
	// contains filtered or unexported fields
}

Encoder describes a base64 encoder.

func EncoderArg

func EncoderArg(c *rt.GoCont, n int) (*Encoder, error)

EncoderArg turns a continuation argument into an *Encoder.

func NewEncoder

func NewEncoder(enc *base64.Encoding, w io.Writer) *Encoder

NewEncoder returns a new base64 encoder, using the encoding enc and wrapping w. A finaliser is set on the returned encoder (via runtime.SetFinalizer) so that it is automatically closed when garbage collected.

func ValueToEncoder

func ValueToEncoder(v rt.Value) (*Encoder, bool)

ValueToEncoder turns a Lua value to an *Encoder if possible.

func (*Encoder) Close

func (e *Encoder) Close() error

Close closes the encoder.

func (*Encoder) Encoding

func (e *Encoder) Encoding() *base64.Encoding

Encoding returns the encoding used.

func (*Encoder) IsClosed

func (e *Encoder) IsClosed() bool

IsClosed returns true iff the encoder is known to be closed.

func (*Encoder) String

func (*Encoder) String() string

String returns a string description of the encoder.

Jump to

Keyboard shortcuts

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