A simple Open API project written in Go.
- Simple API endpoints
- Basic CRUD operations
Before you begin, ensure you have met the following requirements:
Requirement | Description |
---|---|
Go | Install Go from the official website. |
Docker | Install Docker from the official website. |
Docker Compose | Install Docker Compose from the official website. |
golang-migrate | Install golang-migrate from the official documentation. |
air | Install air command line tool by running go install github.com/air-verse/air@latest . |
swag | Install swag command line tool by running go install github.com/swaggo/swag/cmd/swag@latest . |
- Build the application:
make build
- Run the application:
Seed the database:
make up
make migrate/up
- Access logs:
make logs
- Restart the application:
make restart
- Stop the application:
make down
- Open your browser and go to
http://localhost:8080/swagger/index.html
Here are some sample tenants with their respective API keys and secrets for authentication:
Tenant Name | API Key | API Secret | Scopes |
---|---|---|---|
Default Tenant | KRY2oikKQ4DEgG5VOC57 | CJxNmBP07PfH1GYZqu1O | MANAGE_USER, MANAGE_MESSAGE |
Tenant 1 | 6yDd4PnFH9MMIdGgOOkf | NWHZUUiqTqbIBGMfcLyS | MANAGE_USER |
Tenant 2 | 4b7Ph2hsJP4ohC0tlw5J | 2UF9c2jvKsUfamAeISli | NONE |
- Fork the repository
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request