Initial import

This commit is contained in:
George Suntres
2026-03-29 11:38:57 -04:00
commit 38265c15d1
25 changed files with 1763 additions and 0 deletions

26
types.go Normal file
View File

@@ -0,0 +1,26 @@
package mongo
// TODO(me): Place it in find.go?
type FindRequest struct {
Entity string
Limit int
Skip int
Filter map[string]any
}
// TODO(me): Remove it in favor of [FindResult]?
type DataResults struct {
Data []map[string]any
}
// TODO(me): Remove it in favor of [FindResult]?
type Metadata struct {
Total int64 `bson:"total"`
}
// TODO(me): Remove it in favor of [FindResult]?
type PaginatedResponse struct {
Metadata []Metadata `bson:"metadata" json:"metadata"`
// Initializing this as an empty slice literal []User{}
// prevents "null" in your JSON output.
Data []map[string]any `bson:"data" json:"data"`
}