conf

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(path string) (err error)

InitConfig 初始化读取配置文件

Types

type AllConfig

type AllConfig struct {
	Connection string `mapstructure:"connection"`

	TableNameSuffix    string `mapstructure:"table_name_suffix"`
	TableNamePrefix    string `mapstructure:"table_name_prefix"`
	TableCommentSuffix string `mapstructure:"table_comment_suffix"`

	EveryTplGenPath map[string]string `mapstructure:"every_tpl_gen_path"`
	OneTplGenPath   map[string]string `mapstructure:"one_tpl_gen_path"`

	GenFileSuffix    bool `mapstructure:"gen_file_suffix"`
	AutoImport       bool `mapstructure:"auto_import"`
	IsLowerCamelName bool `mapstructure:"table_field_name_is_lower_camel_name"`

	ORMName ORM `mapstructure:"orm_name"`

	SpecialMapping []string `mapstructure:"mapping"`
}

AllConfig 全部配置文件

var All *AllConfig

All 全部配置索引

type ORM

type ORM string

ORM 框架的名称枚举

var (
	// XORMName xrom名称
	XORMName ORM = "xorm"
	// GORMName xrom名称
	GORMName ORM = "gorm"
)

Jump to

Keyboard shortcuts

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