Documentation ¶
Overview ¶
Copyright © 2023 Codoworks Author: Dexter Codo Contact: dexter.codo@gmail.com
Copyright © 2023 Codoworks Author: Dexter Codo Contact: dexter.codo@gmail.com
Copyright © 2023 Codoworks Author: Dexter Codo Contact: dexter.codo@gmail.com
Copyright © 2023 Codoworks Author: Dexter Codo Contact: dexter.codo@gmail.com
Index ¶
- Variables
- type Adapter
- func (a *Adapter) AppendAdapter(name string, adapter IAdapter)
- func (a *Adapter) GetDSN() (string, error)
- func (a *Adapter) GetDbCreateStatement() (string, error)
- func (a *Adapter) GetDbDropStatement() (string, error)
- func (a *Adapter) GetDriver() (gorm.Dialector, error)
- func (a *Adapter) GetServerDSN() (string, error)
- func (a *Adapter) GetServerDriver() (gorm.Dialector, error)
- func (a *Adapter) SetConfig(config features.DatabaseConfig)
- func (a *Adapter) ValidateConfig() error
- type IAdapter
- type MySQLAdapter
- func (a *MySQLAdapter) GetDSN() (string, error)
- func (a *MySQLAdapter) GetDbCreateStatement() (string, error)
- func (a *MySQLAdapter) GetDbDropStatement() (string, error)
- func (a *MySQLAdapter) GetDriver() (gorm.Dialector, error)
- func (a *MySQLAdapter) GetServerDSN() (string, error)
- func (a *MySQLAdapter) GetServerDriver() (gorm.Dialector, error)
- func (a *MySQLAdapter) SetConfig(config features.DatabaseConfig)
- func (a *MySQLAdapter) ValidateConfig() error
- type PostgresAdapter
- func (a *PostgresAdapter) GetDSN() (string, error)
- func (a *PostgresAdapter) GetDbCreateStatement() (string, error)
- func (a *PostgresAdapter) GetDbDropStatement() (string, error)
- func (a *PostgresAdapter) GetDriver() (gorm.Dialector, error)
- func (a *PostgresAdapter) GetServerDSN() (string, error)
- func (a *PostgresAdapter) GetServerDriver() (gorm.Dialector, error)
- func (a *PostgresAdapter) SetConfig(config features.DatabaseConfig)
- func (a *PostgresAdapter) ValidateConfig() error
- type SQLiteAdapter
- func (a *SQLiteAdapter) GetDSN() (string, error)
- func (a *SQLiteAdapter) GetDbCreateStatement() (string, error)
- func (a *SQLiteAdapter) GetDbDropStatement() (string, error)
- func (a *SQLiteAdapter) GetDriver() (gorm.Dialector, error)
- func (a *SQLiteAdapter) GetServerDSN() (string, error)
- func (a *SQLiteAdapter) GetServerDriver() (gorm.Dialector, error)
- func (a *SQLiteAdapter) SetConfig(config features.DatabaseConfig)
- func (a *SQLiteAdapter) ValidateConfig() error
Constants ¶
This section is empty.
Variables ¶
View Source
var Adapters = &Adapter{ defaultPlatform: constants.DEFAULT_DB_PLATFORM, currentPlatform: constants.DEFAULT_DB_PLATFORM, adapters: make(map[string]IAdapter), }
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct { IAdapter // contains filtered or unexported fields }
func (*Adapter) AppendAdapter ¶
func (*Adapter) GetDbCreateStatement ¶
func (*Adapter) GetDbDropStatement ¶
func (*Adapter) GetServerDSN ¶
func (*Adapter) SetConfig ¶
func (a *Adapter) SetConfig(config features.DatabaseConfig)
func (*Adapter) ValidateConfig ¶
type IAdapter ¶
type IAdapter interface { SetConfig(config features.DatabaseConfig) GetDriver() (gorm.Dialector, error) GetServerDriver() (gorm.Dialector, error) GetDSN() (string, error) GetServerDSN() (string, error) GetDbCreateStatement() (string, error) GetDbDropStatement() (string, error) ValidateConfig() error }
type MySQLAdapter ¶
type MySQLAdapter struct { IAdapter // contains filtered or unexported fields }
func (*MySQLAdapter) GetDSN ¶
func (a *MySQLAdapter) GetDSN() (string, error)
func (*MySQLAdapter) GetDbCreateStatement ¶
func (a *MySQLAdapter) GetDbCreateStatement() (string, error)
func (*MySQLAdapter) GetDbDropStatement ¶
func (a *MySQLAdapter) GetDbDropStatement() (string, error)
func (*MySQLAdapter) GetServerDSN ¶
func (a *MySQLAdapter) GetServerDSN() (string, error)
func (*MySQLAdapter) GetServerDriver ¶
func (a *MySQLAdapter) GetServerDriver() (gorm.Dialector, error)
func (*MySQLAdapter) SetConfig ¶
func (a *MySQLAdapter) SetConfig(config features.DatabaseConfig)
func (*MySQLAdapter) ValidateConfig ¶
func (a *MySQLAdapter) ValidateConfig() error
type PostgresAdapter ¶
type PostgresAdapter struct { IAdapter // contains filtered or unexported fields }
func (*PostgresAdapter) GetDSN ¶
func (a *PostgresAdapter) GetDSN() (string, error)
func (*PostgresAdapter) GetDbCreateStatement ¶
func (a *PostgresAdapter) GetDbCreateStatement() (string, error)
func (*PostgresAdapter) GetDbDropStatement ¶
func (a *PostgresAdapter) GetDbDropStatement() (string, error)
func (*PostgresAdapter) GetServerDSN ¶
func (a *PostgresAdapter) GetServerDSN() (string, error)
func (*PostgresAdapter) GetServerDriver ¶
func (a *PostgresAdapter) GetServerDriver() (gorm.Dialector, error)
func (*PostgresAdapter) SetConfig ¶
func (a *PostgresAdapter) SetConfig(config features.DatabaseConfig)
func (*PostgresAdapter) ValidateConfig ¶
func (a *PostgresAdapter) ValidateConfig() error
type SQLiteAdapter ¶
type SQLiteAdapter struct { IAdapter // contains filtered or unexported fields }
func (*SQLiteAdapter) GetDSN ¶
func (a *SQLiteAdapter) GetDSN() (string, error)
func (*SQLiteAdapter) GetDbCreateStatement ¶
func (a *SQLiteAdapter) GetDbCreateStatement() (string, error)
func (*SQLiteAdapter) GetDbDropStatement ¶
func (a *SQLiteAdapter) GetDbDropStatement() (string, error)
func (*SQLiteAdapter) GetServerDSN ¶
func (a *SQLiteAdapter) GetServerDSN() (string, error)
func (*SQLiteAdapter) GetServerDriver ¶
func (a *SQLiteAdapter) GetServerDriver() (gorm.Dialector, error)
func (*SQLiteAdapter) SetConfig ¶
func (a *SQLiteAdapter) SetConfig(config features.DatabaseConfig)
func (*SQLiteAdapter) ValidateConfig ¶
func (a *SQLiteAdapter) ValidateConfig() error
Click to show internal directories.
Click to hide internal directories.