Merge pull request 'feat: add product domain' (#242) from feature/ISSUE-224-product-app into develop

Reviewed-on: ebhomengo/niki#242
Reviewed-by: hossein <h.nazari1990@gmail.com>
This commit is contained in:
hossein 2026-03-25 06:59:26 +00:00
commit bc6f5727e1
10 changed files with 70 additions and 0 deletions

8
productapp/app.go Normal file
View File

@ -0,0 +1,8 @@
package productapp
import "net/http"
type Application struct {
Config Config
HTTPServer *http.Server
}

4
productapp/config.go Normal file
View File

@ -0,0 +1,4 @@
package productapp
type Config struct {
}

View File

@ -0,0 +1,17 @@
package http
import (
"net/http"
"github.com/labstack/echo/v4"
)
type Handler struct{}
func NewHandler() *Handler {
return &Handler{}
}
func (h Handler) HealthCheck(c echo.Context) error {
return c.JSON(http.StatusOK, map[string]string{"status": "ok"})
}

View File

@ -0,0 +1 @@
package http

View File

@ -0,0 +1,23 @@
package http
import httpserver "git.gocasts.ir/ebhomengo/niki/delivery/http_server"
type Server struct {
HTTPServer *httpserver.Server
Handler *Handler
}
func NewServer(httpserver *httpserver.Server) *Server {
return &Server{
HTTPServer: httpserver,
Handler: NewHandler(),
}
}
func (s *Server) Serve() {
}
func (s *Server) Stop() {}
func (s *Server) RegisterRoutes() {}

View File

@ -0,0 +1,13 @@
package database
import "git.gocasts.ir/ebhomengo/niki/repository/mysql"
type DB struct {
conn *mysql.DB
}
func New(conn *mysql.DB) *DB {
return &DB{
conn: conn,
}
}

View File

@ -0,0 +1 @@
package service

View File

@ -0,0 +1 @@
package service

View File

@ -0,0 +1 @@
package service

View File

@ -0,0 +1 @@
package service