This is a Golang-based API for managing users, supporting operations such as user creation, retrieval, and health checks.
The API is defined using OpenAPI 3.0 specifications, making it easy to understand, extend, and integrate with.
- API Version: 1.0.0
- Description: The User Service allows for managing users in a structured, RESTful manner.
- OpenAPI Specification:
api/openapi/user-service.yaml
- Language: Go
-
Clone the repository:
git clone https://github.com/maslechkin86/go-api-example.git cd user-service
-
Install dependencies:
go mod download
-
Download tools:
make tools-install
-
Generate API code from the OpenAPI spec:
make gen
-
Run the service:
make go-run
```text
user-service/
├── api/ # API specifications (e.g., OpenAPI)
├── cmd/ # Main application entry points
├── internal/ # Private application code (business logic, handlers)
├── pkg/ # Public packages
└── Makefile # Build, test, and generate commands
```
Run unit and integration tests using:
make test