Skip to content

Commit

Permalink
初次提交
Browse files Browse the repository at this point in the history
  • Loading branch information
EchoAGI committed Mar 23, 2023
0 parents commit d9c2254
Show file tree
Hide file tree
Showing 377 changed files with 71,750 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @authok/dx-sdks-engineer
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: 🤔 Help & Questions
url: https://community.authok.com/c/sdks/5
about: Ask general support or usage questions in the Authok Community forums
- name: 📖 SDK API Documentation
url: https://pkg.go.dev/github.com/authok/authok-go
about: Read the API documentation for this SDK
50 changes: 50 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: 🚀 Feature Request
description: Suggest an idea or a feature for this SDK
labels: [ "feature" ]

body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request!
- type: checkboxes
id: checklist
attributes:
label: Checklist
options:
- label: I agree to the terms within the [Authok Code of Conduct](https://github.com/authok/open-source-template/blob/master/CODE-OF-CONDUCT.md).
required: true

- type: textarea
id: description
attributes:
label: Describe the problem you'd like to have solved
description: A clear and concise description of what the problem is.
placeholder: My life would be a lot simpler if...
validations:
required: true

- type: textarea
id: ideal-solution
attributes:
label: Describe the ideal solution
description: A clear and concise description of what you want to happen.
validations:
required: true

- type: textarea
id: alternatives-and-workarounds
attributes:
label: Alternatives and current workarounds
description: A clear and concise description of any alternatives you've considered or any workarounds that are currently in place.
validations:
required: false

- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
validations:
required: false
67 changes: 67 additions & 0 deletions .github/ISSUE_TEMPLATE/report_a_bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: 🐛 Report a bug
description: Have you found a bug or issue? Create a bug report for this SDK
labels: [ "bug" ]

body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: markdown
attributes:
value: |
**Please do not report security vulnerabilities here**. The [Responsible Disclosure Program](https://authok.com/responsible-disclosure-policy) details the procedure for disclosing security issues.
- type: checkboxes
id: checklist
attributes:
label: Checklist
options:
- label: I have looked into the [README](https://github.com/authok/authok-go#readme) and have not found a suitable solution or answer.
required: true
- label: I have looked into the [documentation](https://pkg.go.dev/github.com/authok/authok-go) and have not found a suitable solution or answer.
required: true
- label: I have searched the [issues](https://github.com/authok/authok-go/issues) and have not found a suitable solution or answer.
required: true
- label: I have upgraded to the [latest version](https://github.com/authok/authok-go/releases/latest) of this SDK and the issue still persists.
required: true
- label: I have searched the [Authok Community](https://community.authok.com/c/sdks/5) forums and have not found a suitable solution or answer.
required: true
- label: I agree to the terms within the [Authok Code of Conduct](https://github.com/authok/open-source-template/blob/master/CODE-OF-CONDUCT.md).
required: true

- type: textarea
id: description
attributes:
label: Description
description: Provide a clear and concise description of the issue.
validations:
required: true

- type: textarea
id: expectation
attributes:
label: Expectation
description: Tell us about the behavior you expected to see.
validations:
required: true

- type: textarea
id: reproduction
attributes:
label: Reproduction
description: Detail the steps taken to reproduce this error and, ideally, share a repo of a minimal reproducible example. State whether this issue can be reproduced consistently or if it is intermittent.
placeholder: |
1. Given...
2. When...
3. Then...
validations:
required: true

- type: input
id: environment-sdk-version
attributes:
label: Authok Go SDK version
validations:
required: true
42 changes: 42 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!--
❗ For general support or usage questions, use the Authok Community forums or raise a support ticket.
By submitting a pull request to this repository, you agree to the terms within the Authok Code of Conduct: https://github.com/authok/open-source-template/blob/master/CODE-OF-CONDUCT.md.
-->

### 🔧 Changes

<!--
Describe both what is changing and why this is important. Include:
- Types and methods added, deleted, deprecated, or changed
- A summary of usage if this is a new feature or a change to a public API
-->

### 📚 References

<!--
Add relevant links supporting this change, such as:
- GitHub issue/PR number addressed or fixed
- Authok Community post
- StackOverflow answer
- Related pull requests/issues from other repositories
If there are no references, simply delete this section.
-->

### 🔬 Testing

<!--
Describe how this can be tested by reviewers. Be specific about anything not tested and why. Include any manual steps for testing end-to-end, or for testing functionality not covered by unit tests.
-->

### 📝 Checklist

- [ ] All new/changed/fixed functionality is covered by tests (or N/A)
- [ ] I have added documentation for all new/changed functionality (or N/A)

<!--
❗ All the above items are required. Pull requests with an incomplete or missing checklist will be closed.
-->
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
35 changes: 35 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: E2E Tests

concurrency:
group: one-at-time
cancel-in-progress: false

on: [workflow_dispatch]

jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: go.mod
check-latest: true

- name: Run tests
run: make test-e2e
env:
AUTHOK_DOMAIN: ${{ secrets.AUTHOK_DOMAIN }}
AUTHOK_CLIENT_ID: ${{ secrets.AUTHOK_CLIENT_ID }}
AUTHOK_CLIENT_SECRET: ${{ secrets.AUTHOK_CLIENT_SECRET }}

- name: Update codecov report
uses: codecov/codecov-action@v3
with:
files: ./coverage.out
fail_ci_if_error: false
verbose: true
22 changes: 22 additions & 0 deletions .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: govulncheck

on:
pull_request_target: {}
push:
branches: [main]
schedule:
- cron: '30 0 1,15 * *'

jobs:
scan:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@main
- name: Scan for Vulnerabilities in Code
uses: Templum/govulncheck-action@main
with:
go-version: 1.19
vulncheck-version: latest
package: ./...
fail-on-vuln: true
56 changes: 56 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Main Workflow

on:
push:
branches:
- main
pull_request:

jobs:
checks:
name: Checks
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: go.mod
check-latest: true

- name: Check that files were correctly generated
run: make check-getters

- name: Check that the packages can be built
run: go build ./...

- name: Check for linting errors
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: -v -c .golangci.yml

tests:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: go.mod
check-latest: true

- name: Run tests
run: make test

- name: Update codecov report
uses: codecov/codecov-action@v3
with:
files: ./coverage.out
fail_ci_if_error: false
verbose: true
25 changes: 25 additions & 0 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: semgrep

on:
pull_request_target: {}

push:
branches: [master]

schedule:
- cron: '30 0 1,15 * *'

jobs:
scan:
runs-on: ubuntu-latest
container:
image: returntocorp/semgrep

# Skip any PR created by dependabot to avoid permission issues
if: (github.actor != 'dependabot[bot]')
steps:
- uses: actions/checkout@main
- name: Run Semgrep to check for vulnerabilities
run: semgrep ci
env:
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_TOKEN }}
44 changes: 44 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
### Go ###

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out
*.log

# Dependency directories (remove the comment below to include it)
vendor/

### Intellij ###

# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm,
# CLion, Android Studio and WebStorm.
#
# See: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
*.iml
*.ipr
.idea/

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

### Local .env file
.env
Loading

0 comments on commit d9c2254

Please sign in to comment.