Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

22 Commits

Folders and files

Repository files navigation

Test task for «hitalent»
Google Doc with the brief

Requirements

  • Go 1.26 (older versions may work but not tested)
  • Docker

Quick start

git clone https://github.com/dima69/hitalent-test-task
cd hitalent-test-task
docker compose up --build

Server starts at http://localhost:8080

How to run tests

  1. Make sure Docker is running (testcontainers-go starts PostgreSQL automatically).
  2. Run:
go test -count=1 ./...

Project structure

.
├── cmd/
│   └── server/
│       └── main.go                    # Entry point
├── internal/
│   ├── config/
│   │   └── config.go                  # Environment config
│   ├── department/                    # Department entity
│   │   ├── handler.go                 # HTTP handlers
│   │   ├── service.go                 # Business logic
│   │   ├── repository.go              # GORM repository
│   │   ├── model.go                   # Department + DepartmentTree
│   │   ├── response.go                # JSON helpers
│   │   ├── handler_test.go
│   │   ├── service_test.go
│   │   ├── repository_test.go
│   │   ├── mock_test.go
│   │   └── testutil_test.go
│   ├── employee/                      # Employee entity
│   │   ├── handler.go                 # HTTP handlers
│   │   ├── service.go                 # Business logic
│   │   ├── repository.go              # GORM repository
│   │   ├── model.go                   # Employee model
│   │   ├── response.go                # JSON helpers
│   │   ├── handler_test.go
│   │   ├── service_test.go
│   │   └── repository_test.go
│   └── testutil/
│       └── testdb.go                  # testcontainers setup
├── migrations/                        # Goose SQL migrations
├── Dockerfile
├── docker-compose.yml
├── go.mod
├── go.sum
└── README.md

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages