database

package
v0.0.0-...-4bd82ba Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

var GormBankRepositoryPostgresSet = wire.NewSet(new(*repositories2.PostgresBankRepository))

View Source
var GormOauthAccessTokenRepositorySet = wire.NewSet(wire.Struct(new(repositories.OauthAccessTokenRepository), "*"))
View Source
var GormOauthClientRepositorySet = wire.NewSet(wire.Struct(new(repositories.OauthClientRepository), "*"))

Functions

func ProvideDatabaseGorm

func ProvideDatabaseGorm(db *gorm.DB, logger *logrus.Logger, defaultJoins ...string) *gormRepository

Types

type Connection

type Connection map[string]IDB

type Connections

type Connections struct {
	Connection
}

func MakeDatabase

func MakeDatabase(databases config.Databases, log *logrus.Logger) *Connections

func (*Connections) GetConnection

func (c *Connections) GetConnection(connectionName string) *gorm.DB

type IDB

type IDB interface {
	SqlDB() *sql.DB
	DB() *gorm.DB
	GetDsn() string
}

type Repository

type Repository struct {
	TransactionRepository      repositories2.ITransactionRepository
	BaseRepository             repositories2.IRepository
	BankRepository             repositories2.IBankRepository
	OauthClientRepository      repositories2.IOauthClientRepository
	OauthAccessTokenRepository repositories2.IOauthAccessTokenRepository
}

func InjectRepository

func InjectRepository(db *gorm.DB, logger *logrus.Logger, defaultJoins ...string) *Repository

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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