Bump sdk and vendoring

This commit is contained in:
Jeff Mitchell 2019-09-17 11:38:03 -04:00
parent f72bc5acb2
commit 86d14691f4
8 changed files with 27 additions and 19 deletions

3
go.mod
View File

@ -82,7 +82,7 @@ require (
github.com/hashicorp/vault-plugin-secrets-gcpkms v0.5.2-0.20190814210149-315cdbf5de6e
github.com/hashicorp/vault-plugin-secrets-kv v0.5.2-0.20190814210155-e060c2a001a8
github.com/hashicorp/vault/api v1.0.5-0.20190904164530-82f8309ab640
github.com/hashicorp/vault/sdk v0.1.14-0.20190904164450-29f2490f986b
github.com/hashicorp/vault/sdk v0.1.14-0.20190917153655-ea21a2a1bf3f
github.com/influxdata/influxdb v0.0.0-20190411212539-d24b7ba8c4c4
github.com/jackc/fake v0.0.0-20150926172116-812a484cc733 // indirect
github.com/jackc/pgx v3.3.0+incompatible // indirect
@ -91,7 +91,6 @@ require (
github.com/joyent/triton-go v0.0.0-20190112182421-51ffac552869
github.com/keybase/go-crypto v0.0.0-20190403132359-d65b6b94177f
github.com/kr/pretty v0.1.0
github.com/kr/pty v1.1.3 // indirect
github.com/kr/text v0.1.0
github.com/lib/pq v1.2.0
github.com/mattn/go-colorable v0.1.2

2
go.sum
View File

@ -327,8 +327,6 @@ github.com/hashicorp/raft v1.0.1/go.mod h1:DVSAWItjLjTOkVbSpWQ0j0kUADIvDaCtBxIcb
github.com/hashicorp/raft v1.1.1 h1:HJr7UE1x/JrJSc9Oy6aDBHtNHUUBHjcQjTgvUVihoZs=
github.com/hashicorp/raft v1.1.1/go.mod h1:vPAJM8Asw6u8LxC3eJCUZmRP/E4QmUGE1R7g7k8sG/8=
github.com/hashicorp/raft-boltdb v0.0.0-20171010151810-6e5ba93211ea/go.mod h1:pNv7Wc3ycL6F5oOWn+tPGo2gWD4a5X+yp/ntwdKLjRk=
github.com/hashicorp/raft-snapshot v1.0.1 h1:cx002JsTEAfAP0pIuANlDtTXg/pi2Db6YbRRmLQTQKw=
github.com/hashicorp/raft-snapshot v1.0.1/go.mod h1:5sL9eUn72lH5DzsFIJ9jaysITbHksSSszImWSOTC8Ic=
github.com/hashicorp/raft-snapshot v1.0.2-0.20190827162939-8117efcc5aab h1:WzGMwlO1DvaC93SvVOBOKtn+nXGEDXapyJuaRV3/VaY=
github.com/hashicorp/raft-snapshot v1.0.2-0.20190827162939-8117efcc5aab/go.mod h1:5sL9eUn72lH5DzsFIJ9jaysITbHksSSszImWSOTC8Ic=
github.com/hashicorp/serf v0.8.2 h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0=

View File

@ -23,6 +23,17 @@ type Snapshot struct {
index uint64
}
// Size returns the file size of the snapshot archive.
func (s *Snapshot) Size() (int64, error) {
info, err := s.file.Stat()
if err != nil {
return 0, err
}
return info.Size(), nil
}
// Sealer is used to seal and open the SHASUM file inside the archive.
type Sealer interface {
Seal(context.Context, []byte) ([]byte, error)
Open(context.Context, []byte) ([]byte, error)

View File

@ -140,8 +140,8 @@ func DefaultConfig() *Config {
config := &Config{
Address: "https://127.0.0.1:8200",
HttpClient: cleanhttp.DefaultPooledClient(),
Timeout: time.Second * 60,
}
config.HttpClient.Timeout = time.Second * 60
transport := config.HttpClient.Transport.(*http.Transport)
transport.TLSHandshakeTimeout = 10 * time.Second

View File

@ -2,7 +2,7 @@ package logical
import (
"fmt"
"io"
"net/http"
"strings"
"time"
)
@ -173,9 +173,9 @@ type Request struct {
// we can delete it before sending off to plugins
ClientTokenSource ClientTokenSource
// RequestReader if set can be used to read the full request body from the
// http request that generated this logical.Request object.
RequestReader io.ReadCloser `json:"-" sentinel:""`
// HTTPRequest, if set, can be used to access fields from the HTTP request
// that generated this logical.Request object, such as the request body.
HTTPRequest *http.Request `json:"-" sentinel:""`
// ResponseWriter if set can be used to stream a response value to the http
// request that generated this logical.Request object.

View File

@ -4,7 +4,7 @@ import (
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"sync/atomic"
"github.com/hashicorp/vault/sdk/helper/wrapping"
@ -187,15 +187,15 @@ func RespondWithStatusCode(resp *Response, req *Request, code int) (*Response, e
// HTTPResponseWriter is optionally added to a request object and can be used to
// write directly to the HTTP response writter.
type HTTPResponseWriter struct {
writer io.Writer
http.ResponseWriter
written *uint32
}
// NewHTTPResponseWriter creates a new HTTPRepoinseWriter object that wraps the
// provided io.Writer.
func NewHTTPResponseWriter(w io.Writer) *HTTPResponseWriter {
func NewHTTPResponseWriter(w http.ResponseWriter) *HTTPResponseWriter {
return &HTTPResponseWriter{
writer: w,
ResponseWriter: w,
written: new(uint32),
}
}
@ -204,7 +204,7 @@ func NewHTTPResponseWriter(w io.Writer) *HTTPResponseWriter {
func (rw *HTTPResponseWriter) Write(bytes []byte) (int, error) {
atomic.StoreUint32(rw.written, 1)
return rw.writer.Write(bytes)
return rw.ResponseWriter.Write(bytes)
}
// Written tells us if the writer has been written to yet.

View File

@ -8,7 +8,7 @@ var (
// Whether cgo is enabled or not; set at build time
CgoEnabled bool
Version = "1.2.2"
VersionPrerelease = ""
Version = "1.3.0"
VersionPrerelease = "dev"
VersionMetadata = ""
)

4
vendor/modules.txt vendored
View File

@ -327,7 +327,7 @@ github.com/hashicorp/nomad/api
github.com/hashicorp/nomad/api/contexts
# github.com/hashicorp/raft v1.1.1
github.com/hashicorp/raft
# github.com/hashicorp/raft-snapshot v1.0.1
# github.com/hashicorp/raft-snapshot v1.0.2-0.20190827162939-8117efcc5aab
github.com/hashicorp/raft-snapshot
# github.com/hashicorp/serf v0.8.2
github.com/hashicorp/serf/coordinate
@ -375,7 +375,7 @@ github.com/hashicorp/vault-plugin-secrets-gcpkms
github.com/hashicorp/vault-plugin-secrets-kv
# github.com/hashicorp/vault/api v1.0.5-0.20190904164530-82f8309ab640 => ./api
github.com/hashicorp/vault/api
# github.com/hashicorp/vault/sdk v0.1.14-0.20190904164450-29f2490f986b => ./sdk
# github.com/hashicorp/vault/sdk v0.1.14-0.20190917153655-ea21a2a1bf3f => ./sdk
github.com/hashicorp/vault/sdk/helper/salt
github.com/hashicorp/vault/sdk/helper/strutil
github.com/hashicorp/vault/sdk/helper/wrapping