mysqlcfg

package
v0.0.0-...-5fb5118 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Code generated by "gogen cfggen"; DO NOT EDIT. Exec: gogen cfggen -n Config -o gen_configs.go Version: 0.0.1

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMysqlClient

func NewMysqlClient(cfg *Config) (*sqlx.DB, error)

Types

type Config

type Config struct {
	DB        string `json:"db,omitempty"`
	User      string `json:"user,omitempty"`
	Pass      string `json:"pass,omitempty"`
	Addr      string `json:"addr,omitempty"`
	Charset   string `json:"charset,omitempty"`
	Collation string `json:"collation,omitempty"`
	// contains filtered or unexported fields
}

Config config generate by gogen cfggen.

func NewConfig

func NewConfig(prefix string) *Config

func NewDefaultConfig

func NewDefaultConfig(prefix string) *Config

func (*Config) AddNotifyFunc

func (cfg *Config) AddNotifyFunc(f func(*Config))

add notify func

func (*Config) RefreshValue

func (cfg *Config) RefreshValue(cc configcentra.ConfigCentra) error

impl configcentra.ConfigValue

func (*Config) SetDefaultValue

func (cfg *Config) SetDefaultValue(cc configcentra.ConfigCentra)

impl configcentra.ConfigValue

Jump to

Keyboard shortcuts

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