config

package
v0.0.0-...-815cda6 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Set Dependency injection target in config

Functions

func GetMySQLClient

func GetMySQLClient(config DBConfig) *ent.Client

Types

type DBConfig

type DBConfig struct {
	Username string `mapstructure:"DB_USERNAME"`
	Password string `mapstructure:"DB_PASSWORD"`
	Host     string `mapstructure:"DB_HOST"`
	Port     int    `mapstructure:"DB_PORT"`
	Database string `mapstructure:"DB_DATABASE"`
}

func NewDBConfig

func NewDBConfig() (value DBConfig)

func (*DBConfig) CreateURL

func (db *DBConfig) CreateURL() string

Jump to

Keyboard shortcuts

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