debefix_mongodb

package module
v0.19.3 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 6 Imported by: 1

README

debefix-mongodb

License

MIT

Author

Rangel Reale (rangelreale@gmail.com)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(ctx context.Context, fileProvider debefix.FileProvider, db *mongo.Database,
	options ...debefix.GenerateOption) (*debefix.Data, error)

Generate loads files and inserts records in the database, returning the resolved data.

func GenerateDirectory

func GenerateDirectory(ctx context.Context, rootDir string, db *mongo.Database,
	options ...debefix.GenerateOption) (*debefix.Data, error)

GenerateDirectory is a version of Generate that loads from a directory name, returning the resolved data.

func GenerateFS

func GenerateFS(ctx context.Context, fs fs.FS, db *mongo.Database,
	options ...debefix.GenerateOption) (*debefix.Data, error)

GenerateFS is a version of Generate that loads from a fs.FS, returning the resolved data.

func Resolve

func Resolve(ctx context.Context, db *mongo.Database, data *debefix.Data, options ...debefix.ResolveOption) (*debefix.Data, error)

Resolve inserts data on the MongoDB database, and returns the resolved data.

func ResolverDBCallback

func ResolverDBCallback(ctx context.Context, db *mongo.Database) db.ResolverDBCallback

ResolverDBCallback is a db.ResolverDBCallback to generate MongoDB collection records.

func ResolverFunc

func ResolverFunc(ctx context.Context, mdb *mongo.Database) debefix.ResolveCallback

ResolverFunc is the debefix.ResolveCallback used by Resolve.

Types

This section is empty.

Jump to

Keyboard shortcuts

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