Categorygithub.com/trapcodeio/gmongo
modulepackage
0.1.16
Repository: https://github.com/trapcodeio/gmongo.git
Documentation: pkg.go.dev

# README

gmongo

My personal MongoDB Util package for Go.

Installation

go get github.com/trapcodeio/gmongo

Usage

For now, see the tests for usage examples.

Test

Make sure you have a MongoDB instance running on localhost:27017K

go test -v

# Functions

No description provided by the author
No description provided by the author
CreateModel - Create a new model with default values Note: Created model will not have a collection and will throw an error if `.Native()` is called.
DateTimeNow - Get the current date and time.
GetModelHelper - Get a model helper for a model instance.
IsFindOneError - Check if the error exists but is not a mongo.ErrNoDocuments error.
IsNoDocumentsError - Check if the error exists and is a mongo.ErrNoDocuments error.
LinkModel - Link model to a database.
MakeModel - Create a new model with a database connection.
NewId - Generate a new ID.
NewUUid - Generate a new UUID.

# Variables

No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
ModelHelper - A helper for models, this struct includes all the functions for a model instance.
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author