bsonfile

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxBSONSize = 16 * 1024 * 1024 // 16MB - maximum BSON document size
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BSONFile

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

func OpenFile

func OpenFile(filename string) (*BSONFile, error)

Open opens a bson file for reading

func (*BSONFile) Close

func (b *BSONFile) Close() error

func (*BSONFile) Read

func (b *BSONFile) Read(buf []byte) (int, error)

func (*BSONFile) ReadNext

func (b *BSONFile) ReadNext() ([]byte, error)

func (*BSONFile) UnmarshalNext

func (b *BSONFile) UnmarshalNext(dest interface{}) error

type BSONReader

type BSONReader interface {
	ReadNext() ([]byte, error)
	UnmarshalNext(interface{}) error
}

func NewBSONReader

func NewBSONReader(r io.Reader) (BSONReader, error)

Jump to

Keyboard shortcuts

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