mysql

package
v0.0.0-...-20002e4 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package mysql init db connection

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDB

func InitDB(c Config) (*gorm.DB, error)

Types

type Config

type Config struct {
	Host     string `mapstructure:"host" json:"host"`
	Port     int    `mapstructure:"port" json:"port"`
	Name     string `mapstructure:"db" json:"db"`
	User     string `mapstructure:"user" json:"user"`
	Password string `mapstructure:"password" json:"password"`
	Salt     string `mapstructure:"salt" json:"salt"`
}

Jump to

Keyboard shortcuts

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