bschema

package
v0.0.0-...-6120cfb Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BSchema

type BSchema interface {
	Key() []byte
	// ValueCopy returns a copy of the value of the item from the value bytes, writing it to dst slice.
	// If nil is passed, or capacity of dst isn't sufficient, a new slice would be allocated and
	// returned.
	ValueCopy(bytes []byte) ([]byte, error)
}

type Field

type Field interface {
	Type() bsontype.Type
	Name() []byte
	GetDefaultValue() []byte
}

type Reader

type Reader interface {
	Field(string) int
	FieldAt(pos int) Field
	FieldsLen() int
}

type ReaderWriter

type ReaderWriter interface {
	Writer
	Reader
}

func NewReaderWriteFromReader

func NewReaderWriteFromReader(r Reader) ReaderWriter

func NewReaderWriter

func NewReaderWriter() ReaderWriter

type Writer

type Writer interface {
	Append(typ bsontype.Type, name []byte, defaultValue []byte)
	AppendFromField(f Field)
}

Jump to

Keyboard shortcuts

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