mongodb.go

module
v0.0.193 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT

README

mongodb.go

CI License Issues PRs Dependabot

Generic MongoDB access layer for sweetrpg's Go services: connection setup/teardown and Get/Query/Insert/Update/Delete functions parametrized over any model type.

Install

go get github.com/sweetrpg/mongodb.go

Packages

  • database - SetupDatabase/TeardownDatabase (connection lifecycle, configured via DB_URI or the individual DB_HOST/DB_USER/DB_PW/etc. environment variables), and generic Get[T]/Query[T]/Insert[T]/Update[T]/Delete[T] functions
  • constants - environment variable names and query-paging defaults

Documentation

Package documentation: pkg.go.dev/github.com/sweetrpg/mongodb.go. Test coverage reports are published to sweetrpg.github.io/mongodb.go on every merge to develop.

Contributing

See CONTRIBUTING.md for the development workflow (including running the MongoDB-backed test suite locally) and RELEASE.md for how versions get cut.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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