This commit is contained in:
@@ -5,7 +5,7 @@ const Version = "0.0.1"
|
||||
|
||||
const (
|
||||
// App is the name of the application
|
||||
Name = "app"
|
||||
Name = "gosqldump"
|
||||
|
||||
// DescriptionShort short description of the app
|
||||
DescriptionShort = Name + " description"
|
||||
|
||||
@@ -2,7 +2,7 @@ package config
|
||||
|
||||
import (
|
||||
"github.com/spf13/viper"
|
||||
"hub.cybercinch.nz/guisea/go-template/internal/config/key"
|
||||
"hub.cybercinch.nz/guisea/gosqldump/internal/config/key"
|
||||
)
|
||||
|
||||
// fields is the config fields with their default values and descriptions
|
||||
@@ -25,6 +25,26 @@ fatal, error, warn, info, debug`,
|
||||
false,
|
||||
"Whether the logger should report the caller location.",
|
||||
},
|
||||
{
|
||||
Key: key.MySQLHost,
|
||||
DefaultValue: "localhost",
|
||||
Description: "The MySQL/MariaDB hostname",
|
||||
},
|
||||
{
|
||||
Key: key.MySQLPort,
|
||||
DefaultValue: 3306,
|
||||
Description: "The MySQL/MariaDB Port to Connect to",
|
||||
},
|
||||
{
|
||||
Key: key.MySQLUser,
|
||||
DefaultValue: "~",
|
||||
Description: "The MySQL/MariaDB Username to connect with",
|
||||
},
|
||||
{
|
||||
Key: key.MySQLPassword,
|
||||
DefaultValue: "~",
|
||||
Description: "The MySQL/MariaDB Password to connect with",
|
||||
},
|
||||
//{
|
||||
// key.TenantId,
|
||||
// "some_client_id",
|
||||
|
||||
@@ -11,9 +11,9 @@ import (
|
||||
|
||||
"github.com/samber/lo"
|
||||
"github.com/spf13/viper"
|
||||
"hub.cybercinch.nz/guisea/go-template/internal/app"
|
||||
"hub.cybercinch.nz/guisea/gosqldump/internal/app"
|
||||
|
||||
"hub.cybercinch.nz/guisea/go-template/internal/color"
|
||||
"hub.cybercinch.nz/guisea/gosqldump/internal/color"
|
||||
)
|
||||
|
||||
type Field struct {
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
"hub.cybercinch.nz/guisea/go-template/internal/app"
|
||||
"hub.cybercinch.nz/guisea/go-template/internal/filesystem"
|
||||
"hub.cybercinch.nz/guisea/go-template/internal/where"
|
||||
"hub.cybercinch.nz/guisea/gosqldump/internal/app"
|
||||
"hub.cybercinch.nz/guisea/gosqldump/internal/filesystem"
|
||||
"hub.cybercinch.nz/guisea/gosqldump/internal/where"
|
||||
)
|
||||
|
||||
// ConfigFormat is the format of the config file
|
||||
|
||||
@@ -4,4 +4,8 @@ const (
|
||||
LogsWrite = "logs.write"
|
||||
LogsLevel = "logs.level"
|
||||
LogsReportCaller = "logs.show_caller"
|
||||
MySQLUser = "mysql.user"
|
||||
MySQLPassword = "mysql.password"
|
||||
MySQLHost = "mysql.host"
|
||||
MySQLPort = "mysql.port"
|
||||
)
|
||||
|
||||
@@ -5,14 +5,14 @@ import (
|
||||
"fmt"
|
||||
"github.com/charmbracelet/log"
|
||||
"github.com/spf13/viper"
|
||||
"hub.cybercinch.nz/guisea/go-template/internal/config/key"
|
||||
"hub.cybercinch.nz/guisea/gosqldump/internal/config/key"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/samber/lo"
|
||||
"hub.cybercinch.nz/guisea/go-template/internal/filesystem"
|
||||
"hub.cybercinch.nz/guisea/go-template/internal/where"
|
||||
"hub.cybercinch.nz/guisea/gosqldump/internal/filesystem"
|
||||
"hub.cybercinch.nz/guisea/gosqldump/internal/where"
|
||||
)
|
||||
|
||||
func Init() error {
|
||||
|
||||
@@ -2,7 +2,7 @@ package style
|
||||
|
||||
import (
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"hub.cybercinch.nz/guisea/go-template/internal/color"
|
||||
"hub.cybercinch.nz/guisea/gosqldump/internal/color"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -3,7 +3,7 @@ package where
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"hub.cybercinch.nz/guisea/go-template/internal/app"
|
||||
"hub.cybercinch.nz/guisea/gosqldump/internal/app"
|
||||
)
|
||||
|
||||
// EnvConfigPath is the environment variable name for the config path
|
||||
|
||||
@@ -2,7 +2,7 @@ package where
|
||||
|
||||
import (
|
||||
"github.com/samber/lo"
|
||||
"hub.cybercinch.nz/guisea/go-template/internal/filesystem"
|
||||
"hub.cybercinch.nz/guisea/gosqldump/internal/filesystem"
|
||||
"os"
|
||||
)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
|
||||
"hub.cybercinch.nz/guisea/go-template/internal/app"
|
||||
"hub.cybercinch.nz/guisea/gosqldump/internal/app"
|
||||
)
|
||||
|
||||
func home() string {
|
||||
|
||||
Reference in New Issue
Block a user