Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCollection ¶
func GetCollection[A any](db *GoodmDatabase) (*mongo.Collection, error)
func GetCollectionName ¶
Types ¶
type GoodmClient ¶
func NewGoodmClient ¶
func NewGoodmClient(client *mongo.Client) *GoodmClient
func (*GoodmClient) UseDatabase ¶
func (odmClient *GoodmClient) UseDatabase(databaseName string, ctx *context.Context, opts ...*options.DatabaseOptions) *GoodmDatabase
type GoodmDatabase ¶
type GoodmDatabase struct { *mongo.Database Context *context.Context // contains filtered or unexported fields }
func GetGoodmDatabase ¶
func GetGoodmDatabase() *GoodmDatabase
func NewGoodmDatabase ¶
func NewGoodmDatabase(odmClient *GoodmClient, databaseName string, ctx *context.Context, opts ...*options.DatabaseOptions) *GoodmDatabase
func (*GoodmDatabase) GetCurrenCollection ¶
func (odmDatabase *GoodmDatabase) GetCurrenCollection() *mongo.Collection
func (*GoodmDatabase) UseCollection ¶
func (odmDatabase *GoodmDatabase) UseCollection(collection string) *mongo.Collection
Click to show internal directories.
Click to hide internal directories.