Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

Commit c665f35

Browse files
committed
Update codegen
Signed-off-by: Cody Soyland <[email protected]>
1 parent 295f8a5 commit c665f35

File tree

14 files changed

+84
-704
lines changed

14 files changed

+84
-704
lines changed

third_party/VENDOR-LICENSE/github.com/go-jose/go-jose/v3/LICENSE

Lines changed: 0 additions & 202 deletions
This file was deleted.

third_party/VENDOR-LICENSE/github.com/go-jose/go-jose/v3/json/LICENSE

Lines changed: 0 additions & 27 deletions
This file was deleted.

third_party/VENDOR-LICENSE/github.com/hashicorp/vault/api/client.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,6 +1467,12 @@ START:
14671467
}
14681468

14691469
if outputCurlString {
1470+
// Note that although we're building this up here and returning it as an error object, the Error()
1471+
// interface method on it only gets called in a context where the actual string returned from that
1472+
// method is irrelevant, because it gets swallowed by an error buffer that's never output to the user.
1473+
// That's on purpose, not a bug, because in this case, OutputStringError is not really an _error_, per se.
1474+
// It's just a way of aborting the control flow so that requests don't actually execute, and instead,
1475+
// we can detect what's happened back in the CLI machinery and show the actual curl string to the user.
14701476
LastOutputStringError = &OutputStringError{
14711477
Request: req,
14721478
TLSSkipVerify: c.config.HttpClient.Transport.(*http.Transport).TLSClientConfig.InsecureSkipVerify,

third_party/VENDOR-LICENSE/github.com/hashicorp/vault/api/output_string.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"net/http"
99
"strings"
1010

11-
retryablehttp "github.com/hashicorp/go-retryablehttp"
11+
"github.com/hashicorp/go-retryablehttp"
1212
)
1313

1414
const (
@@ -25,6 +25,10 @@ type OutputStringError struct {
2525
finalCurlString string
2626
}
2727

28+
// Error is here so that we can return this struct as an error from client.rawRequestWithContext(). Note that
29+
// the ErrOutputStringRequest constant is never actually used and is completely irrelevant to how this all functions.
30+
// We could've just as easily returned an empty string. What matters is the machinery that happens before then where
31+
// the curl string is built. So yes, this is confusing, but yes, this is also on purpose, and it is not incorrect.
2832
func (d *OutputStringError) Error() string {
2933
if d.finalCurlString == "" {
3034
cs, err := d.buildCurlString()

third_party/VENDOR-LICENSE/github.com/hashicorp/vault/api/secret.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package api
66
import (
77
"bytes"
88
"encoding/json"
9+
"errors"
910
"fmt"
1011
"io"
1112
"reflect"
@@ -380,7 +381,7 @@ func ParseSecret(r io.Reader) (*Secret, error) {
380381
if err := json.Unmarshal(errBytes, &errStrArray); err != nil {
381382
return nil, err
382383
}
383-
return nil, fmt.Errorf(strings.Join(errStrArray, " "))
384+
return nil, errors.New(strings.Join(errStrArray, " "))
384385
}
385386

386387
// if any raw data is present in resp.Body, add it to secret

third_party/VENDOR-LICENSE/github.com/hashicorp/vault/api/sys_health.go

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ func (c *Sys) HealthWithContext(ctx context.Context) (*HealthResponse, error) {
2525
r.Params.Add("standbycode", "299")
2626
r.Params.Add("drsecondarycode", "299")
2727
r.Params.Add("performancestandbycode", "299")
28+
r.Params.Add("removedcode", "299")
29+
r.Params.Add("haunhealthycode", "299")
2830

2931
resp, err := c.c.rawRequestWithContext(ctx, r)
3032
if err != nil {
@@ -38,19 +40,22 @@ func (c *Sys) HealthWithContext(ctx context.Context) (*HealthResponse, error) {
3840
}
3941

4042
type HealthResponse struct {
41-
Initialized bool `json:"initialized"`
42-
Sealed bool `json:"sealed"`
43-
Standby bool `json:"standby"`
44-
PerformanceStandby bool `json:"performance_standby"`
45-
ReplicationPerformanceMode string `json:"replication_performance_mode"`
46-
ReplicationDRMode string `json:"replication_dr_mode"`
47-
ServerTimeUTC int64 `json:"server_time_utc"`
48-
Version string `json:"version"`
49-
ClusterName string `json:"cluster_name,omitempty"`
50-
ClusterID string `json:"cluster_id,omitempty"`
51-
LastWAL uint64 `json:"last_wal,omitempty"`
52-
Enterprise bool `json:"enterprise"`
53-
EchoDurationMillis int64 `json:"echo_duration_ms"`
54-
ClockSkewMillis int64 `json:"clock_skew_ms"`
55-
ReplicationPrimaryCanaryAgeMillis int64 `json:"replication_primary_canary_age_ms"`
43+
Initialized bool `json:"initialized"`
44+
Sealed bool `json:"sealed"`
45+
Standby bool `json:"standby"`
46+
PerformanceStandby bool `json:"performance_standby"`
47+
ReplicationPerformanceMode string `json:"replication_performance_mode"`
48+
ReplicationDRMode string `json:"replication_dr_mode"`
49+
ServerTimeUTC int64 `json:"server_time_utc"`
50+
Version string `json:"version"`
51+
ClusterName string `json:"cluster_name,omitempty"`
52+
ClusterID string `json:"cluster_id,omitempty"`
53+
LastWAL uint64 `json:"last_wal,omitempty"`
54+
Enterprise bool `json:"enterprise"`
55+
EchoDurationMillis int64 `json:"echo_duration_ms"`
56+
ClockSkewMillis int64 `json:"clock_skew_ms"`
57+
ReplicationPrimaryCanaryAgeMillis int64 `json:"replication_primary_canary_age_ms"`
58+
RemovedFromCluster *bool `json:"removed_from_cluster,omitempty"`
59+
HAConnectionHealthy *bool `json:"ha_connection_healthy,omitempty"`
60+
LastRequestForwardingHeartbeatMillis int64 `json:"last_request_forwarding_heartbeat_ms,omitempty"`
5661
}

0 commit comments

Comments
 (0)