enc

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 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 BsonEncoder

type BsonEncoder struct{}

BsonEncoder is a BSON Encoder implementation for EncodedConn. This encoder will use the mongo bson encoder to Marshal and Unmarshal most types, including structs.

func (*BsonEncoder) Decode

func (be *BsonEncoder) Decode(data []byte, vPtr interface{}) (err error)

Decode

func (*BsonEncoder) Encode

func (be *BsonEncoder) Encode(msg interface{}) ([]byte, error)

Encode

type JsonEncoder

type JsonEncoder struct{}

JsonEncoder is a JSON Encoder implementation for EncodedConn. This encoder will use the builtin encoding/json to Marshal and Unmarshal most types, including structs.

func (*JsonEncoder) Decode

func (je *JsonEncoder) Decode(data []byte, vPtr interface{}) (err error)

Decode

func (*JsonEncoder) Encode

func (je *JsonEncoder) Encode(msg interface{}) ([]byte, error)

Encode

Jump to

Keyboard shortcuts

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