database

package
v0.0.0-...-07366ea Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ContainerID string `yaml:"container_id"`
	Address     string `yaml:"address"`
	User        string `yaml:"user"`
	Password    string `yaml:"password"`
	Database    string `yaml:"database"`
}

type DB

type DB struct {
	*sqlx.DB
}

func Open

func Open(cfg *Config) (*DB, error)

Open get mysql db connection

func (*DB) Seed

func (db *DB) Seed(seedSql string) error

Seed insert rows into database tabel

Jump to

Keyboard shortcuts

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