Add user management and improve code organization with context structs
This commit is contained in:
8
internal/AppContext.go
Normal file
8
internal/AppContext.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package internal
|
||||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
|
||||
type AppContext struct {
|
||||
Db *gorm.DB
|
||||
}
|
7
internal/AppWebContext.go
Normal file
7
internal/AppWebContext.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package internal
|
||||
|
||||
import "github.com/gin-gonic/gin"
|
||||
|
||||
type AppWebContext struct {
|
||||
GinEngine *gin.Engine
|
||||
}
|
10
internal/models/comUser.go
Normal file
10
internal/models/comUser.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package models
|
||||
|
||||
// Funny you are
|
||||
type ComUser struct {
|
||||
Id string
|
||||
Username string
|
||||
Password string
|
||||
Email string
|
||||
IsVerified bool
|
||||
}
|
1
internal/repositories/userRepo.go
Normal file
1
internal/repositories/userRepo.go
Normal file
@@ -0,0 +1 @@
|
||||
package repositories
|
1
internal/services/userService.go
Normal file
1
internal/services/userService.go
Normal file
@@ -0,0 +1 @@
|
||||
package services
|
Reference in New Issue
Block a user