https://github.com/meyiapir/books-api
REST API for managing book lists
https://github.com/meyiapir/books-api
api gin go go-api go-examples golang-api golang-examples golang-rest rest-api sql sqlx
Last synced: 11 months ago
JSON representation
REST API for managing book lists
- Host: GitHub
- URL: https://github.com/meyiapir/books-api
- Owner: meyiapir
- License: apache-2.0
- Created: 2023-03-10T10:13:03.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-21T19:21:00.000Z (almost 3 years ago)
- Last Synced: 2025-03-24T13:21:25.924Z (12 months ago)
- Topics: api, gin, go, go-api, go-examples, golang-api, golang-examples, golang-rest, rest-api, sql, sqlx
- Language: Go
- Homepage:
- Size: 81.1 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# REST API for managing books
## The project uses skills:
- 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.
### Для запуска приложения:
```bash
go run cmd/main.go
```
If the application is launched for the first time, you need to apply migrations to the database:
```bash
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
```