adapters

package
v0.0.0-...-d9b5379 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MySqlAdapter

type MySqlAdapter struct {
	// contains filtered or unexported fields
}

func (*MySqlAdapter) GetDB

func (m *MySqlAdapter) GetDB() (*gorm.DB, error)

func (*MySqlAdapter) Migrate

func (m *MySqlAdapter) Migrate(tables ...interface{}) error

func (*MySqlAdapter) Ping

func (m *MySqlAdapter) Ping() error

type MySqlAdapterConfig

type MySqlAdapterConfig struct {
	Host     string
	Port     int16
	Username string
	Password string
	Database string
}

type SqlDataAdapter

type SqlDataAdapter interface {
	GetDB() (*gorm.DB, error)
	Migrate(...interface{}) error
	Ping() error
}

func NewMySqlAdapter

func NewMySqlAdapter(config MySqlAdapterConfig) (SqlDataAdapter, error)

Jump to

Keyboard shortcuts

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