Documentation ¶
Index ¶
- func BinaryToUuid(id interface{}) uuid.UUID
- func ProvideMongoClient(lc fx.Lifecycle, logger *zap.Logger, cfg *MongoConfig) (*mongo.Client, error)
- func ProvideMongoDatabase(client *mongo.Client, cfg *MongoConfig) *mongo.Database
- func SetRegistryForUuids(opts *options.ClientOptions) *options.ClientOptions
- type MongoConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinaryToUuid ¶
func ProvideMongoClient ¶
func ProvideMongoDatabase ¶
func ProvideMongoDatabase( client *mongo.Client, cfg *MongoConfig, ) *mongo.Database
func SetRegistryForUuids ¶
func SetRegistryForUuids( opts *options.ClientOptions, ) *options.ClientOptions
SetRegistryForUuids sets the registry for mongodb such that it can encode and decode primitive.Binary UUIDs into google/uuid.UUID type
Types ¶
type MongoConfig ¶
type MongoConfig struct { MongoUri string `mapstructure:"MONGO_URI"` MongoDB string `mapstructure:"MONGO_DB"` }
func ProvideMongoConfig ¶
func ProvideMongoConfig(cl *utils.ConfigLocation) (*MongoConfig, error)
Click to show internal directories.
Click to hide internal directories.