diff --git a/domain/gamification/repository/mysql/db.go b/domain/gamification/repository/mysql/db.go new file mode 100644 index 00000000..0082acb0 --- /dev/null +++ b/domain/gamification/repository/mysql/db.go @@ -0,0 +1,11 @@ +package mysql + +import "git.gocasts.ir/ebhomengo/niki/repository/mysql" + +type DB struct { + conn *mysql.DB +} + +func New(db *mysql.DB) *DB { + return &DB{conn: db} +} diff --git a/domain/gamification/repository/mysql/gamification.go b/domain/gamification/repository/mysql/gamification.go new file mode 100644 index 00000000..b0843023 --- /dev/null +++ b/domain/gamification/repository/mysql/gamification.go @@ -0,0 +1 @@ +package mysql diff --git a/domain/gamification/service/gamification.go b/domain/gamification/service/gamification.go new file mode 100644 index 00000000..bcfe155b --- /dev/null +++ b/domain/gamification/service/gamification.go @@ -0,0 +1,8 @@ +package service + +type Service struct { + repo Repo +} + +type Repo interface { +} diff --git a/gamificationapp/app.go b/gamificationapp/app.go new file mode 100644 index 00000000..651d6964 --- /dev/null +++ b/gamificationapp/app.go @@ -0,0 +1,11 @@ +package gamificationapp + +type Application struct { + Config Config +} + +func setUp(cnf Config) *Application { + return &Application{ + cnf, + } +} diff --git a/gamificationapp/config.go b/gamificationapp/config.go new file mode 100644 index 00000000..3fc50ebb --- /dev/null +++ b/gamificationapp/config.go @@ -0,0 +1,4 @@ +package gamificationapp + +type Config struct { +} diff --git a/gamificationapp/delivery/http/gamification/handler.go b/gamificationapp/delivery/http/gamification/handler.go new file mode 100644 index 00000000..f01b3ad6 --- /dev/null +++ b/gamificationapp/delivery/http/gamification/handler.go @@ -0,0 +1,15 @@ +package gamification + +import ( + gamification "git.gocasts.ir/ebhomengo/niki/domain/gamification/service" +) + +type Handler struct { + GamificationSvc gamification.Service +} + +func New(gamificationSvc gamification.Service) *Handler { + return &Handler{ + GamificationSvc: gamificationSvc, + } +} diff --git a/gamificationapp/delivery/http/gamification/route.go b/gamificationapp/delivery/http/gamification/route.go new file mode 100644 index 00000000..dbb139c5 --- /dev/null +++ b/gamificationapp/delivery/http/gamification/route.go @@ -0,0 +1,7 @@ +package gamification + +import "github.com/labstack/echo/v4" + +func (h Handler) SetRoutes(e *echo.Echo) { + +} diff --git a/gamificationapp/delivery/http/server.go b/gamificationapp/delivery/http/server.go new file mode 100644 index 00000000..54117707 --- /dev/null +++ b/gamificationapp/delivery/http/server.go @@ -0,0 +1,13 @@ +package http + +import "git.gocasts.ir/ebhomengo/niki/gamificationapp/delivery/http/gamification" + +type Server struct { + gamificationHandler *gamification.Handler +} + +func New(handler gamification.Handler) *Server { + return &Server{ + gamificationHandler: &handler, + } +}