mysql

package
v0.0.0-...-7c35933 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ProviderName = "mysql"
)

Variables

Functions

func Factory

func Factory(logger *slog.Logger, cfg *Config) (*sqlx.DB, error)

Types

type Config

type Config struct {
	Host     string `hcl:"host"`
	Port     int    `hcl:"port"`
	Username string `hcl:"username"`
	Password string `hcl:"password"`
	Database string `hcl:"database"`
}

func ConfigProvider

func ConfigProvider(cfg *fabric.Configuration) (*Config, error)

func (*Config) FormatDSN

func (c *Config) FormatDSN() string

type Provider

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

func NewProvider

func NewProvider(db *sqlx.DB) *Provider

func (*Provider) Name

func (p *Provider) Name() string

func (*Provider) Priority

func (p *Provider) Priority() int

func (*Provider) Start

func (p *Provider) Start() error

func (*Provider) Stop

func (p *Provider) Stop() error

Jump to

Keyboard shortcuts

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