internal

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrepareDataForBSONStorage

func PrepareDataForBSONStorage(value interface{}) (map[string]interface{}, error)

PrepareDataForBSONStorage takes the given value and converts it to the type expected by the MongoDB driver for inserting documents. The value must be a struct with exported fields and proper json tags or a map. To use the MongoDB primary key (_id), you must have an _id field in either the struct or map. Alternatively, add it to the map returned by this function. If no _id field is set, then MongoDB will generate one for you.

Types

This section is empty.

Jump to

Keyboard shortcuts

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