Categorygithub.com/chenmingyong0423/go-mongox/v2
modulepackage
2.0.0-beta1
Repository: https://github.com/chenmingyong0423/go-mongox.git
Documentation: pkg.go.dev

# README

GitHub Repo stars GitHub issues GitHub License GitHub release (with filter) codecov Go Report Card go.dev reference All Contributors

English | 中文简体

go mongox

go mongox is a generic library for Go Mongo based on the official driver, extending the official framework of MongoDB. Utilizing generic programming, it facilitates the binding of structs to MongoDB collections, aiming to provide type safety and streamlined data operations. go mongox introduces chainable calls for smoother document handling and offers a rich set of BSON builders and built-in functions to simplify the construction of BSON data. Moreover, it supports plugin-based programming and incorporates various hooks, offering flexibility for custom logic before and after database operations, thus enhancing the application's extensibility and maintainability.

Feature Highlights

  • Generic MongoDB Collection
  • Support for constructing BSON data
  • CRUD operations on documents
  • Aggregation operations
  • Built-in basic Model structure for automated updates of default field fields
  • Struct tag validation
  • Hooks
  • Plugin programming support

Install

  • If you are using mongo-driver 1.x version:
    go get github.com/chenmingyong0423/go-mongox
    
  • If you are using mongo-driver 2.x version:
    go get github.com/chenmingyong0423/go-mongox/v2
    

Getting Started

Contributing

With your participation, go-mongox will become even more powerful!

Contributors

Thank you for contributing to the go mongox framework!

License

© Mingyong Chen,2024-now

This project is licensed under the Apache License.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Code generated by MockGen.
No description provided by the author
No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
Model is a base struct which includes the following fields: - ID: the primary key of the document - CreatedAt: the time when the document was created - UpdatedAt: the time when the document was last updated It may be embedded into a struct to provide these fields.
No description provided by the author