seed superuser on migrate

This commit is contained in:
2026-05-31 20:51:41 -05:00
parent 9103078b5a
commit 8b71f581c9
5 changed files with 58 additions and 2 deletions
+7
View File
@@ -6,12 +6,19 @@ import (
"github.com/spf13/viper"
)
type User struct {
Name string `mapstructure:"name"`
Email string `mapstructure:"email"`
Password string `mapstructure:"password"`
}
type Config struct {
DBDriver string `mapstructure:"db_driver"`
DBConnString string `mapstructure:"db_conn_string"`
JWTSecret string `mapstructure:"jwt_secret"`
SessionSecret string `mapstructure:"session_secret"`
ServerPort int `mapstructure:"server_port"`
SuperUser User `mapstructure:"superuser"`
}
func Load(path string) (*Config, error) {