Help us shape the future of Go! Take the 2026 Go Developer Survey

baseMySQL

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, wg *sync.WaitGroup, logger logrus.FieldLogger, dbCfg *Config) (*sqlx.DB, error)

New will return new mysql connection and will start ping goroutine to monitor connection state On ctx.Done() db object will be automatically closed

Types

type Config

type Config struct {
	Secret, Username, Host, Database string
}

Config is used to pass connection settings to NewDatabase

type NullTime

type NullTime mysqlDrv.NullTime

NullTime is wrapper for mysql.NullTime Implements json.Marshaler and sql.Scanner

func (*NullTime) MarshalJSON

func (nt *NullTime) MarshalJSON() ([]byte, error)

MarshalJSON for NullTime

Jump to

Keyboard shortcuts

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