Update a few dependencies
github.com/go-openapi/* github.com/asaskevich/govalidator
This commit is contained in:
51
vendor/github.com/go-openapi/runtime/client_request.go
generated
vendored
51
vendor/github.com/go-openapi/runtime/client_request.go
generated
vendored
@@ -15,7 +15,9 @@
|
||||
package runtime
|
||||
|
||||
import (
|
||||
"os"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/strfmt"
|
||||
@@ -45,9 +47,54 @@ type ClientRequest interface {
|
||||
|
||||
SetPathParam(string, string) error
|
||||
|
||||
SetFileParam(string, *os.File) error
|
||||
GetQueryParams() url.Values
|
||||
|
||||
SetFileParam(string, ...NamedReadCloser) error
|
||||
|
||||
SetBodyParam(interface{}) error
|
||||
|
||||
SetTimeout(time.Duration) error
|
||||
|
||||
GetMethod() string
|
||||
|
||||
GetPath() string
|
||||
|
||||
GetBody() []byte
|
||||
|
||||
GetBodyParam() interface{}
|
||||
|
||||
GetFileParam() map[string][]NamedReadCloser
|
||||
}
|
||||
|
||||
// NamedReadCloser represents a named ReadCloser interface
|
||||
type NamedReadCloser interface {
|
||||
io.ReadCloser
|
||||
Name() string
|
||||
}
|
||||
|
||||
// NamedReader creates a NamedReadCloser for use as file upload
|
||||
func NamedReader(name string, rdr io.Reader) NamedReadCloser {
|
||||
rc, ok := rdr.(io.ReadCloser)
|
||||
if !ok {
|
||||
rc = ioutil.NopCloser(rdr)
|
||||
}
|
||||
return &namedReadCloser{
|
||||
name: name,
|
||||
cr: rc,
|
||||
}
|
||||
}
|
||||
|
||||
type namedReadCloser struct {
|
||||
name string
|
||||
cr io.ReadCloser
|
||||
}
|
||||
|
||||
func (n *namedReadCloser) Close() error {
|
||||
return n.cr.Close()
|
||||
}
|
||||
func (n *namedReadCloser) Read(p []byte) (int, error) {
|
||||
return n.cr.Read(p)
|
||||
}
|
||||
func (n *namedReadCloser) Name() string {
|
||||
return n.name
|
||||
}
|
||||
|
Reference in New Issue
Block a user