pickle

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: May 21, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

A Writer is capable writing out the opcodes required by the pickle format. Note that this is a very limited implementation of pickling; just enough for us to implement the opcodes required by graphite /render.

func NewWriter

func NewWriter(w io.Writer) *Writer

NewWriter creates a new pickle writer.

func (*Writer) BeginDict

func (p *Writer) BeginDict()

BeginDict starts marshalling a python dict.

func (*Writer) BeginList

func (p *Writer) BeginList()

BeginList begins writing a new python list.

func (*Writer) Close

func (p *Writer) Close() error

Close closes the writer, marking the end of the stream and flushing any pending values.

func (*Writer) EndDict

func (p *Writer) EndDict()

EndDict ends marshalling a python dict.

func (*Writer) EndList

func (p *Writer) EndList()

EndList ends writing a python list.

func (*Writer) WriteDictKey

func (p *Writer) WriteDictKey(s string)

WriteDictKey writes a dictionary key.

func (*Writer) WriteFloat64

func (p *Writer) WriteFloat64(v float64)

WriteFloat64 writes a float64 value. NaNs are converted in `None`.

func (*Writer) WriteInt

func (p *Writer) WriteInt(n int)

WriteInt writes an int value.

func (*Writer) WriteNone

func (p *Writer) WriteNone()

WriteNone writes a python `None`.

func (*Writer) WriteString

func (p *Writer) WriteString(s string)

WriteString writes a python string.

Jump to

Keyboard shortcuts

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