db

package
v0.0.0-...-24cf382 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachMigrationFunc

func AttachMigrationFunc(instanceName string, f func(migrator gorm.Migrator) error) error

AttachMigrationFunc - attach migration function to be called by end user

func GetDb

func GetDb(instanceName string) (*gorm.DB, error)

GetDb - Get *gorm.DB instance from the underlying interfaces

func GetMongoDb

func GetMongoDb(instanceName string) (*mongo.Client, error)

GetMongoDb - Get *mongo.Client instance from the underlying interfaces

func Migrate

func Migrate(instanceName string, models ...interface{}) error

Migrate - migrate models on specific database

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL