Documentation ¶
Index ¶
Constants ¶
View Source
const DriversClassName = "gorm-db-drivers"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Driver ¶
type Driver interface {
Open(cfg *Configuration) (Source, error)
}
type DriverRegistrar ¶
type DriverRegistrar struct {
// contains filtered or unexported fields
}
func (*DriverRegistrar) GetDriverByName ¶
func (inst *DriverRegistrar) GetDriverByName(name string) (Driver, error)
func (*DriverRegistrar) Open ¶
func (inst *DriverRegistrar) Open(cfg *Configuration) (Source, error)
func (*DriverRegistrar) Register ¶
func (inst *DriverRegistrar) Register(name string, driver Driver)
type Drivers ¶
type Drivers interface { GetDriverByName(name string) (Driver, error) Open(cfg *Configuration) (Source, error) }
Drivers class='gorm-db-drivers'
type GormDataSource ¶
type GormDataSource struct {
// contains filtered or unexported fields
}
func (*GormDataSource) Close ¶
func (inst *GormDataSource) Close() error
func (*GormDataSource) Config ¶
func (inst *GormDataSource) Config(cfg *GormStarterConfig) error
func (*GormDataSource) Configuration ¶
func (inst *GormDataSource) Configuration() *Configuration
func (*GormDataSource) DB ¶
func (inst *GormDataSource) DB() *gorm.DB
func (*GormDataSource) Name ¶
func (inst *GormDataSource) Name() string
func (*GormDataSource) Open ¶
func (inst *GormDataSource) Open() error
type GormDataSourceBuilder ¶
type GormDataSourceBuilder struct { // DSN string Dialector gorm.Dialector Config1 *Configuration Config2 *gorm.Config }
func (*GormDataSourceBuilder) Create ¶
func (inst *GormDataSourceBuilder) Create() (Source, error)
type GormStarterConfig ¶
type GormStarterConfig struct { DataSourceName string Context application.Context }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.