seed superuser on migrate
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user