- Development of Web Applications on Go, following the REST API design.
- Working with the framework gin-gonic/gin.
- The Pure Architecture approach in building the application structure. Dependency injection technique.
- Working with the PostgreSQL database.
- Application configuration using the library spf13/viper. Working with environment variables.
- Working with the database using the library sqlx.
- Writing SQL queries.
go run cmd/main.go
If the application is launched for the first time, you need to apply migrations to the database:
migrate -path ./schema -database 'postgres://postgres:password@host:5436/postgres?sslmode=disable' up
goBooksApi
├── cmd
│ └── main.go
├── config
│ └── config.yml
├── pkg
│ ├── handler
│ │ ├── books.go
│ │ ├── handler.go
│ │ └── response.go
│ ├── repository
│ │ ├── books_postgres.go
│ │ ├── postgres.go
│ │ └── repository.go
│ └── service
│ ├── bookService.go
│ ├── booksService.go
│ └── service.go
├── schema
│ ├── 000001_init.down.sql
│ └── 000001_init.up.sql
├── .env
├── .gitignore
├── book.go
├── go.mod
├── go.sum
├── LICENSE
└── server.go