Documentation
¶
Index ¶
- Constants
- Variables
- func BlueString(text string) string
- func Clean(props map[string]string, line string) string
- func CleanTableName(tableName string) string
- func CleanWindowsPath(path string) string
- func CyanString(text string) string
- func DarkGrayString(text string) string
- func GetEnvFilePath(dir string) string
- func GetHomeDirConnsMap() (connsMap map[string]map[string]any, err error)
- func GetTempFolder() string
- func GreenString(text string) string
- func HomeBinDir() string
- func InitLogger()
- func LogSQL(props map[string]string, query string, args ...any)
- func MagentaString(text string) string
- func Print(text string)
- func Println(text string)
- func RedString(text string) string
- func RemoveAllLocalTempFile(localPath string)
- func RemoveLocalTempFile(localPath string)
- func SetHomeDir(name string) string
- func SetLogger()
- func SetTelVal(key string, value any)
- func Vars() (vars map[string]string)
- func WriteTempSQL(sql string, filePrefix ...string) (sqlPath string, err error)
- type EnvFile
Constants ¶
View Source
const ( DdlDefDecLength = 20 DdlMinDecLength = 24 DdlMaxDecScale = 24 DdlMaxDecLength = 38 DdlMinDecScale = 6 )
Variables ¶
View Source
var ( HomeDir = os.Getenv("SLING_HOME_DIR") HomeDirEnvFile = "" Env = &EnvFile{} PlausibleURL = "" SentryDsn = "" NoColor = g.In(os.Getenv("SLING_LOGGING"), "NO_COLOR", "JSON") LogSink func(*g.LogLine) TelMap = g.M("begin_time", time.Now().UnixMicro()) TelMux = sync.Mutex{} HomeDirs = map[string]string{} NoDebugKey = " /* nD */" Executable = "" )
Functions ¶
func BlueString ¶ added in v1.1.8
func CleanTableName ¶ added in v1.2.22
func CleanWindowsPath ¶ added in v1.2.19
func CyanString ¶ added in v1.1.15
func DarkGrayString ¶ added in v1.1.15
func GetEnvFilePath ¶ added in v1.2.4
func GetHomeDirConnsMap ¶ added in v1.2.4
func GetTempFolder ¶ added in v1.2.4
func GetTempFolder() string
func GreenString ¶ added in v1.1.8
func HomeBinDir ¶ added in v1.2.4
func HomeBinDir() string
func MagentaString ¶ added in v1.2.2
func RemoveAllLocalTempFile ¶ added in v1.2.16
func RemoveAllLocalTempFile(localPath string)
RemoveAllLocalTempFile deletes the local folder
func RemoveLocalTempFile ¶ added in v1.2.16
func RemoveLocalTempFile(localPath string)
RemoveLocalTempFile deletes the local file
func SetHomeDir ¶ added in v1.2.4
Types ¶
type EnvFile ¶ added in v0.86.56
type EnvFile struct { Connections map[string]map[string]interface{} `json:"connections,omitempty" yaml:"connections,omitempty"` Variables map[string]interface{} `json:"variables,omitempty" yaml:"variables,omitempty"` Path string `json:"-" yaml:"-"` TopComment string `json:"-" yaml:"-"` Body string `json:"-" yaml:"-"` }
func LoadEnvFile ¶ added in v0.86.56
func LoadSlingEnvFile ¶ added in v0.86.56
func LoadSlingEnvFile() (ef EnvFile)
func LoadSlingEnvFileBody ¶ added in v1.2.15
func (*EnvFile) WriteEnvFile ¶ added in v1.2.4
Click to show internal directories.
Click to hide internal directories.