Documentation ¶
Overview ¶
Package mongolib is for encapsulating go.mongodb.org/mongo-driver any operations
As a quick start:
ctx := context.Background() mgo, err := mongolib.NewMongoDriver(ctx, mongolib.Config{ AppName: "test", URL: "mongodb://localhost:27017", Database: "golang", }, nil) if err != nil { panic(err) } collection := mgo.Database.Collection("example") collection.find(...)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoDriver ¶
func NewMongoDriver ¶
func NewMongoDriver(ctx context.Context, cfg Config, opts ...*options.ClientOptions) (*MongoDriver, error)
Click to show internal directories.
Click to hide internal directories.