spantypes

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Custom types used by the encoding package.

Named types for encoding / decoding extensions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinData

type BinData []byte

BinData is used to hold raw binary blob information for structs that need to support encoding to and from JSON / BSON. The json encoder will hexify this data for transport, while BSON will transform it to a BSON Binary primitive.

func (BinData) MarshalBSONValue

func (data BinData) MarshalBSONValue() (bsontype.Type, []byte, error)

Marshal bson value.

func (BinData) MarshalText

func (data BinData) MarshalText() ([]byte, error)

Marshal to text value for json and others that implement this interface.

func (*BinData) UnmarshalBSONValue

func (data *BinData) UnmarshalBSONValue(
	valueType bsontype.Type, incomingData []byte,
) error

Unmarshal bson value.

func (*BinData) UnmarshalText

func (data *BinData) UnmarshalText(incomingData []byte) error

UnMarshal from text value for json and others that implement this interface.

Jump to

Keyboard shortcuts

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