vari

package
v0.0.0-...-b92f783 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Config = model.Config{Version: 1, Language: "en"}
	DB     *gorm.DB

	WorkDir      string
	CurrFilePath string

	CfgFile      string
	LogDir       string
	ScreenWidth  int
	ScreenHeight int

	RequestType string
	Verbose     bool
	Interpreter string

	CacheParam string

	DefType string

	ProtoCls string

	JsonResp = "[]"
	Port     int

	ResLoading = false
	Res        = map[string]map[string][]string{}

	CacheResFileToMap  = map[string]map[string][]string{}
	CacheResFileToName = map[string]string{}

	AgentLogDir string
)
View Source
var (
	GlobalVars = GenVarType{
		DefData:      domain.DefData{},
		OutputFormat: consts.FormatText,
		TopFieldMap:  map[string]domain.DefField{},

		CacheResFileToMap:                  map[string]map[string][]interface{}{},
		RandFieldSectionPathToValuesMap:    map[int]map[string]interface{}{},
		RandFieldSectionShortKeysToPathMap: map[int]string{},

		FieldNameToValuesMap: map[string][]interface{}{},
		FieldNameToFieldMap:  map[string]domain.DefField{},

		RunMode: consts.RunModeGen,
	}
)

Functions

This section is empty.

Types

type DBDsnData

type DBDsnData struct {
	Driver   string
	User     string
	Password string
	Host     string
	Port     string
	DbName   string
	Code     string
}

parsing from DBDsn [added by Leo 2022/5/5]

type GenVarType

type GenVarType struct {
	RunMode consts.RunMode
	Total   int

	Output           string
	OutputFormat     string
	TopFieldMap      map[string]domain.DefField
	ExportFields     []string
	ExportChildField string
	ColIsNumArr      []bool

	Table        string
	DBType       string // database type
	DBDsn        string
	DBDsnParsing DBDsnData
	DBClear      bool
	MockDir      string

	Human     bool
	Trim      bool
	Recursive bool

	ConfigFileDir string

	DefData domain.DefData
	ResData map[string]map[string][]interface{}

	CacheResFileToMap                  map[string]map[string][]interface{}
	RandFieldSectionPathToValuesMap    map[int]map[string]interface{}
	RandFieldSectionShortKeysToPathMap map[int]string

	FieldNameToValuesMap map[string][]interface{}
	FieldNameToFieldMap  map[string]domain.DefField

	StartTime time.Time
	EndTime   time.Time
}

Jump to

Keyboard shortcuts

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