-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adding auth * mocking oauth and working on tests * oauth test - missing name * adding auth * mocking oauth and working on tests * oauth test - missing name * Readme, license and contributing --------- Co-authored-by: Nico Bistolfi <[email protected]>
- Loading branch information
1 parent
781d1ee
commit 4df0080
Showing
28 changed files
with
1,097 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# OAuth 2.0 / OpenID Connect Configuration | ||
OIDC_ISSUER=https://accounts.google.com | ||
OAUTH_CLIENT_ID=your_oauth_client_id | ||
OAUTH_CLIENT_SECRET=your_oauth_client_secret | ||
OAUTH_REDIRECT_URL=http://localhost:8080/auth/callback | ||
|
||
# JWT Configuration | ||
JWT_SECRET=your_jwt_secret_key | ||
JWT_EXPIRATION_MINUTES=60 | ||
|
||
# API Key Configuration | ||
VALID_API_KEY=your_api_key | ||
|
||
# Server Configuration | ||
PORT=8080 | ||
|
||
# Database Configuration (if applicable) | ||
# DB_HOST=localhost | ||
# DB_PORT=5432 | ||
# DB_NAME=your_database_name | ||
# DB_USER=your_database_user | ||
# DB_PASSWORD=your_database_password | ||
|
||
# Redis Configuration (if applicable) | ||
# REDIS_HOST=localhost | ||
# REDIS_PORT=6379 | ||
# REDIS_PASSWORD= | ||
|
||
# Logging Configuration | ||
LOG_LEVEL=info | ||
|
||
# Rate Limiting Configuration | ||
RATE_LIMIT_REQUESTS=10 | ||
RATE_LIMIT_DURATION=1s | ||
|
||
# Other Configuration Options | ||
# Add any other environment-specific configurations here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Contributing to Go API Boilerplate | ||
|
||
We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's: | ||
|
||
- Reporting a bug | ||
- Discussing the current state of the code | ||
- Submitting a fix | ||
- Proposing new features | ||
- Becoming a maintainer | ||
|
||
## We Develop with Github | ||
|
||
We use github to host code, to track issues and feature requests, as well as accept pull requests. | ||
|
||
## We Use [Github Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests | ||
|
||
Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests: | ||
|
||
1. Fork the repo and create your branch from `main`. | ||
2. If you've added code that should be tested, add tests. | ||
3. If you've changed APIs, update the documentation. | ||
4. Ensure the test suite passes. | ||
5. Make sure your code lints. | ||
6. Issue that pull request! | ||
|
||
## Any contributions you make will be under the MIT Software License | ||
|
||
In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern. | ||
|
||
## Report bugs using Github's [issues](https://github.com/yourusername/go-api-boilerplate/issues) | ||
|
||
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/yourusername/go-api-boilerplate/issues/new); it's that easy! | ||
|
||
## Write bug reports with detail, background, and sample code | ||
|
||
**Great Bug Reports** tend to have: | ||
|
||
- A quick summary and/or background | ||
- Steps to reproduce | ||
- Be specific! | ||
- Give sample code if you can. | ||
- What you expected would happen | ||
- What actually happens | ||
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work) | ||
|
||
People *love* thorough bug reports. I'm not even kidding. | ||
|
||
## Use a Consistent Coding Style | ||
|
||
* 2 spaces for indentation rather than tabs | ||
* You can try running `go fmt` for style unification | ||
|
||
## License | ||
|
||
By contributing, you agree that your contributions will be licensed under its MIT License. | ||
|
||
## References | ||
|
||
This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 [Your Name or Your Organization's Name] | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.