Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into jeff-tls-reloading
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferai committed Feb 25, 2021
2 parents 9402d90 + 72aa110 commit 042ca18
Show file tree
Hide file tree
Showing 71 changed files with 613 additions and 961 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ Canonical reference for changes, improvements, and bugfixes for Boundary.

## Next (Unreleased)

### Changes/Deprecations

All of these changes are from [PR
962](https://github.com/hashicorp/boundary/pull/962):

* api: A few functions have changed places. Notably, instead of `ResponseMap()`
and `ResponseBody()`, resources simply expose `Response()`. This higher-level
response object contains the map and body, and also exposes `StatusCode()` in
place of indivdidual resources.
* cli: In `json` output format, a resource item is now an object under the
top-level key `item`; a list of resource items is now an list of objects under
the top-level key `items`. This preserves the top level for putting in other
useful information later on (and the HTTP status code is included now).
* cli: In `json` output format, errors are now serialized as a JSON object with
an `error` key instead of outputting normal text
* cli: All errors, including API errors, are now written to `stderr`. Previously
in the default table format, API errors would be written to `stdout`.

### New and Improved

* server: Officially support reloading TLS parameters on `SIGHUP`. (This likely
Expand Down
37 changes: 6 additions & 31 deletions api/accounts/account.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion api/apierror.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,10 @@ func (e *Error) Error() string {
// Errors are considered the same iff they are both api.Errors and their statuses are the same.
func (e *Error) Is(target error) bool {
tApiErr := AsServerError(target)
return tApiErr != nil && tApiErr.Kind == e.Kind && e.ResponseStatus() == tApiErr.ResponseStatus()
return tApiErr != nil && tApiErr.Kind == e.Kind && e.Response().StatusCode() == tApiErr.Response().StatusCode()
}

// Response returns the API response associated with the error
func (e *Error) Response() *Response {
return e.response
}
37 changes: 6 additions & 31 deletions api/authmethods/authmethods.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 6 additions & 31 deletions api/authtokens/authtokens.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions api/error.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ go 1.15
require (
github.com/fatih/structs v1.1.0
github.com/hashicorp/boundary/sdk v0.0.3
github.com/hashicorp/go-cleanhttp v0.5.1
github.com/hashicorp/go-kms-wrapping v0.5.16
github.com/hashicorp/go-retryablehttp v0.6.7
github.com/hashicorp/go-cleanhttp v0.5.2
github.com/hashicorp/go-kms-wrapping v0.6.1
github.com/hashicorp/go-retryablehttp v0.6.8
github.com/hashicorp/go-rootcerts v1.0.2
github.com/stretchr/testify v1.6.1
github.com/stretchr/testify v1.7.0
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e
google.golang.org/grpc v1.32.0
google.golang.org/grpc v1.35.0
)
Loading

0 comments on commit 042ca18

Please sign in to comment.