Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"fmt"

"github.com/fprofit/EffectiveMobile/internal/entry"
"github.com/fprofit/testTask/internal/entry"
)

func main() {
Expand Down
19 changes: 11 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
version: "3.8"

services:
app:
container_name: app
build: "."
build: .
ports:
- "${APP_PORT}:${APP_PORT}"
restart: always
env_file:
- .env
depends_on:
- "postgres"
- postgres
networks:
- app

postgres:
container_name: postgres
image:
postgres:15.2-alpine
image: postgres:15.2-alpine
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
PGDATA: "/var/lib/postgresql/data/pgdata"
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- .:/var/lib/postgresql/data
- pgdata:/var/lib/postgresql/data
ports:
- "${DB_PORT}:${DB_PORT}"
- "${DB_PORT}:5432"
env_file:
- .env
networks:
- app

networks:
app:
app:

volumes:
pgdata:
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/fprofit/EffectiveMobile
module github.com/fprofit/testTask

go 1.21

Expand Down
6 changes: 3 additions & 3 deletions internal/entry/entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"os"
"os/signal"

"github.com/fprofit/EffectiveMobile/internal/handler"
"github.com/fprofit/EffectiveMobile/internal/repository"
"github.com/fprofit/EffectiveMobile/internal/service"
"github.com/fprofit/testTask/internal/handler"
"github.com/fprofit/testTask/internal/repository"
"github.com/fprofit/testTask/internal/service"

"github.com/sirupsen/logrus"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/entry/webServer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"time"

"github.com/fprofit/EffectiveMobile/internal/handler"
"github.com/fprofit/testTask/internal/handler"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
Expand Down
6 changes: 3 additions & 3 deletions internal/handler/addPerson.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package handler
import (
"net/http"

"github.com/fprofit/EffectiveMobile/internal/errorResponse"
"github.com/fprofit/EffectiveMobile/internal/models"
"github.com/fprofit/EffectiveMobile/internal/utils"
"github.com/fprofit/testTask/internal/errorResponse"
"github.com/fprofit/testTask/internal/models"
"github.com/fprofit/testTask/internal/utils"

"github.com/gin-gonic/gin"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/handler/delPerson.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"
"strconv"

"github.com/fprofit/EffectiveMobile/internal/errorResponse"
"github.com/fprofit/testTask/internal/errorResponse"

"github.com/gin-gonic/gin"
)
Expand Down
6 changes: 3 additions & 3 deletions internal/handler/getPerson.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package handler
import (
"net/http"

"github.com/fprofit/EffectiveMobile/internal/errorResponse"
"github.com/fprofit/EffectiveMobile/internal/models"
"github.com/fprofit/EffectiveMobile/internal/utils"
"github.com/fprofit/testTask/internal/errorResponse"
"github.com/fprofit/testTask/internal/models"
"github.com/fprofit/testTask/internal/utils"
"github.com/gin-gonic/gin"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/handler/handler.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package handler

import (
_ "github.com/fprofit/EffectiveMobile/docs"
"github.com/fprofit/EffectiveMobile/internal/models"
_ "github.com/fprofit/testTask/docs"
"github.com/fprofit/testTask/internal/models"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
Expand Down
6 changes: 3 additions & 3 deletions internal/handler/updPerson.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"net/http"
"strconv"

"github.com/fprofit/EffectiveMobile/internal/errorResponse"
"github.com/fprofit/EffectiveMobile/internal/models"
"github.com/fprofit/EffectiveMobile/internal/utils"
"github.com/fprofit/testTask/internal/errorResponse"
"github.com/fprofit/testTask/internal/models"
"github.com/fprofit/testTask/internal/utils"

"github.com/gin-gonic/gin"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/handler/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"strings"

"github.com/fprofit/EffectiveMobile/internal/models"
"github.com/fprofit/EffectiveMobile/internal/utils"
"github.com/fprofit/testTask/internal/models"
"github.com/fprofit/testTask/internal/utils"
)

func checkJSONAddPerson(person models.Person) error {
Expand Down
4 changes: 2 additions & 2 deletions internal/repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"database/sql"
"fmt"

"github.com/fprofit/EffectiveMobile/internal/models"
"github.com/fprofit/EffectiveMobile/internal/utils"
"github.com/fprofit/testTask/internal/models"
"github.com/fprofit/testTask/internal/utils"
"github.com/jmoiron/sqlx"
"github.com/sirupsen/logrus"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/repository/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/fprofit/EffectiveMobile/internal/models"
"github.com/fprofit/testTask/internal/models"
)

func createFilterQuery(filter models.PersonFilter) string {
Expand Down
2 changes: 1 addition & 1 deletion internal/service/service.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package service

import (
"github.com/fprofit/EffectiveMobile/internal/models"
"github.com/fprofit/testTask/internal/models"
"github.com/sirupsen/logrus"
)

Expand Down
Loading