mongopb

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: Apache-2.0 Imports: 7 Imported by: 1

README

MongoPB

PkgGoDev Build Status Go Report Card Discord

MongoPB is a library for writing structpb-typed data to a MongoDB collection using the official MongoDB Go Driver.

Installation

go get github.com/alpstable/mongopb@latest

Usage

The type structpb types supported by this package are

See the gidari library to learn how to write to a MongoDB collection from a web API.

Contributing

Follow this guide for information on contributing.

Documentation

Overview

package mongopb streams structpb-typed data to a MongoDB collection using the official MongoDB Go Driver.

Index

Constants

View Source
const Version = "0.1.1"

Version is the version of the mongopb package.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListWriter

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

ListWriter is used to write a structpb.ListValue to a MongoDB collection.

func NewListWriter

func NewListWriter(coll *mongo.Collection) *ListWriter

NewListWriter creates a new ListWriter for writing a structpb.ListValue to a MongoDB collection.

func (*ListWriter) Write

func (w *ListWriter) Write(ctx context.Context, list *structpb.ListValue) error

Write writes the ListValue to a MongoDB collection.

Jump to

Keyboard shortcuts

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