This project is a Golang-based API using the Echo framework and Postgres database for managing and serving Blogs and News content.
Swagger UI - http://135.181.88.180:8000/swagger/index.html
- Features
- Prerequisites
- Tools & Technologies
- Installation
- Configuration
- Usage
- API Endpoints
- License
- Feedback and Support
- Create, read, update, and delete blogs and news articles.
- Postgres yordamida doimiy saqlash.
- Swagger UI.
- Docker.
- CI/CD by Github Actions.
- Test coverage
100%
in repository100%
in UseCases78.9%
in Handlers
- Golang - Installation Guide
- Docker - Installation Guide
List of tools and technologies used:
- echo - Web framework
- swag - Swagger
- sqlx - Extensions to database/sql.
- pgx - PostgreSQL driver and toolkit for Go
- viper - Go configuration with fangs
- zap - Logger
- validator - Go Struct and Field validation
- migrate - Database migrations. CLI and Golang library.
- gomock - Mocking framework
- testing - Testing
- require - Checking test result
- Docker - Docker
- Database - PostgreSQL
git clone https://github.com/realtemirov/task-for-dell.git
cd task-for-dell
go mod download
Before running the application, configure the necessary environment variables. Enter the configuration folder and configure the environment you want.
cd config
nano config-local.yml
docker compose up -d // run containers with docker-compose
make start // run postgres container and migration-up
make run // run app
go run cmd/main.go // equal -> make run
make test
http://localhost:8000/swagger/index.html
-
POST
/v1/blogs{ "title": "Sample Title", "content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }
POST
/v1/news{ "title": "Sample Title", "content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }
-
PUT
/v1/blogs/:id{ "title": "Sample Title", "content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }
PUT
/v1/news/:id{ "title": "Sample Title", "content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }
-
DELETE
/v1/blogs/:idDELETE
/v1/news/:id -
GET
/v1/blogs/:idGET
/v1/news/:id -
GET
/v1/blogsGET
/v1/news
This project is licensed under the MIT License.
For any issues, feedback, or support, please open an issue on GitHub.