bsonutil

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RawArrayToDocuments

func RawArrayToDocuments(arr bson.RawArray) []bson.Raw

RawArrayToDocuments converts an array of documents to []bson.Raw.

func RawToInterfaces

func RawToInterfaces(docs ...bson.Raw) []interface{}

RawToInterfaces takes one or many bson.Raw documents and returns them as a []interface{}.

func StringSliceFromRawValue

func StringSliceFromRawValue(name string, val bson.RawValue) ([]string, error)

StringSliceFromRawValue decodes the provided BSON value into a []string. This function returns an error if the value is not an array or any of the elements in the array are not strings. The name parameter is used to add context to error messages.

Types

This section is empty.

Jump to

Keyboard shortcuts

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