package
module
Version:
v0.0.2
Opens a new window with list of versions in this module.
Published: Jul 31, 2020
License: Apache-2.0
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
mgd-proto
This is extension for officional MongoDB Go driver adds support for Google protocol buffers types.
Description
It contains set of BSON marshal/unmarshal codecs for Google protocol buffers type json listvalue, value, wrappers, Timestamp and MongoDB ObjectID:
BoolValue
BytesValue
DoubleValue
FloatValue
Int32Value
Int64Value
StringValue
Uint32Value
Uint64Value
Timestamp
ObjectID
ListValue
Value
Links
Requirements
- Google protocol buffers version
proto3
- Official MongoDB Go Driver RC1 or higher
Installation
Installing using go get
:
go get -u github.com/bit-one/mgd-proto
or you don't need to do anything manually if you are using Go modules. Go modules installs necessary packages automatically.
Usage example
First install protoc-gen-gotag
to make available Go language tags
for proto messages
go get -u github.com/amsokol/protoc-gen-gotag
Next
- Create free Altas mini MongoDB instance
- Create
experiments
database
- Create
proto
collection into experiments
database
- Run this example
Documentation
¶
Register registers Google protocol buffers types codecs
Source Files
¶
Directories
¶
examples
|
|
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.