Browse Source

Session/db user structure

Vova Tkach 6 years ago
parent
commit
7438eabaa6
2 changed files with 11 additions and 1 deletions
  1. 2 1
      engine/wrapper/wrapper.go
  2. 9 0
      utils/mysql_struct_users.go

+ 2 - 1
engine/wrapper/wrapper.go

@@ -35,7 +35,8 @@ type Wrapper struct {
 	UrlArgs         []string
 	UrlArgs         []string
 	CurrModule      string
 	CurrModule      string
 
 
-	DB *sql.DB
+	DB   *sql.DB
+	User *utils.MySql_user
 }
 }
 
 
 func New(l *logger.Logger, w http.ResponseWriter, r *http.Request, s *session.Session, host, port, dirConfig, dirHtdocs, dirLogs, dirTemplate, dirTmp string) *Wrapper {
 func New(l *logger.Logger, w http.ResponseWriter, r *http.Request, s *session.Session, host, port, dirConfig, dirHtdocs, dirLogs, dirTemplate, dirTmp string) *Wrapper {

+ 9 - 0
utils/mysql_struct_users.go

@@ -0,0 +1,9 @@
+package utils
+
+type MySql_user struct {
+	A_id         int
+	A_first_name string
+	A_last_name  string
+	A_email      string
+	A_password   string
+}