Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bonsai API Client for Go #11

Merged
merged 49 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
6ea321b
initial commit
momer May 1, 2024
9ff9475
Update README installation instructions
momer May 1, 2024
a4f0471
Housekeeping; organize Client methods
momer May 1, 2024
e888ddb
Adding testing for Client funcs, some Client refactoring; resolve bra…
momer May 1, 2024
2b6cf42
Merge pull request #1 from omc/feat/client-tests
momer May 2, 2024
3dedf76
Refactoring due to aggressive linting; add golanglint-ci github action
momer May 2, 2024
fc37fed
Merge pull request #2 from omc/feat/add-aggressive-linter-and-ci
momer May 2, 2024
09f52c3
Lint resolutions
momer May 2, 2024
0fe0cf5
List tests pass
momer May 2, 2024
1f2d7dc
Spaces API complete
momer May 2, 2024
0864672
Update pre-commit only run when go.mod changes
momer May 2, 2024
c96e91c
Merge pull request #3 from omc/feat/spaces-client
momer May 2, 2024
7d53860
Plan API client
momer May 3, 2024
b6758db
Go mod tidy
momer May 3, 2024
07ee910
CRLF -> LF separators
momer May 3, 2024
b0c00b9
Release Client; remove go.cmp
momer May 3, 2024
e063e61
Merge pull request #7 from omc/feat/release-client
momer May 3, 2024
fdb0a9e
Cluster Client; switch to a different router to allow
momer May 3, 2024
7372fc0
Merge pull request #8 from omc/feat/cluster-client
momer May 3, 2024
0370eca
Switch to chi for the router for all test suites
momer May 3, 2024
81908a0
Remove old test vestige
momer May 3, 2024
96850a6
Merge pull request #9 from omc/chore/update-test-handlefuncs
momer May 3, 2024
db06a85
Suppress unmarshal errors in the unexpected event that API doesn't re…
momer May 3, 2024
cac4273
Merge pull request #10 from omc/dx/gracefully-return-empty-http-err-r…
momer May 3, 2024
e1312f6
Merge with empty main branch history
momer May 3, 2024
0f70ce6
All provisioning calls are rate limited per config. Default is 5 requ…
momer May 3, 2024
25724fc
Merge pull request #12 from omc/feat/add-provisioning-rate-limiter
momer May 3, 2024
e9da3ed
Update project title in README
momer May 3, 2024
eb85e45
Merge pull request #13 from omc/doc/update-project-title-readme
momer May 3, 2024
c0aad80
Patch golang/protobuf; addressing CVE-2024-24786
momer May 3, 2024
815b3e5
Merge pull request #14 from omc/sec/patch-CVE-2024-24786-protobuf
momer May 3, 2024
966083c
Add link to documentation (lve when public; self-hostable)
momer May 3, 2024
0aba3f0
Merge pull request #15 from omc/doc/add-note-godoc
momer May 3, 2024
c57c131
Add link to documentation (lve when public; self-hostable)
momer May 3, 2024
b57b49f
Add integration tests, recordings, with VCR.
momer May 4, 2024
5b61eb4
Set integration tests behind an env var flag
momer May 4, 2024
783bbbc
Merge pull request #16 from omc/qa/add-vcr-compare-integration
momer May 4, 2024
8c3637d
This commit is essentially a no-op, as the impacted endpoints don't c…
momer May 4, 2024
aa0928e
Merge pull request #19 from omc/fix/pagination-completion
momer May 4, 2024
199c60c
Allow safe recording of fixture HTTP requests/responses (remove risky…
momer May 4, 2024
2063d57
Merge pull request #20 from omc/qa/allow-recording-requests-fixtures-…
momer May 4, 2024
83ae2a1
LICENSE was copy pasted as I knew Hashicorp had a markdown version of…
momer May 4, 2024
6c3d66c
Merge pull request #21 from omc/license/remove-accidental-copyright-f…
momer May 4, 2024
46f3092
Add clusters demo; update imports for v1 - will need to add back in v…
momer May 6, 2024
9429d87
Merge pull request #22 from omc/doc/augment-usage-docs
momer May 6, 2024
422c2a9
Add TESTING.md with details on running/adding to the test suite
momer May 6, 2024
7941692
Merge pull request #23 from omc/doc/add-doc-around-integration-testin…
momer May 6, 2024
6c8397b
Move README#Contributing to CONTRIBUTING.md
momer May 6, 2024
f434c96
Merge pull request #24 from omc/doc/extract-contributing-to-contribut…
momer May 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: golangci-lint
on:
push:
branches:
- '**' # Run on all branches
pull_request:

permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
go-version: '1.22'
- name: golangci-lint
uses: golangci/golangci-lint-action@v5
with:
version: v1.57
skip-cache: true
args: --timeout=5m

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
go-version: '1.22'
- name: Test all
run: go test ./...
111 changes: 111 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# via https://github.com/github/gitignore
# License/attribution not required, CC0

###
#
# 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

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

# Go workspace file
go.work

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

# We'll ignore the entire idea folder
.idea/
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
Loading
Loading