Update a few dependencies
github.com/go-openapi/* github.com/asaskevich/govalidator
This commit is contained in:
25
vendor/github.com/go-openapi/runtime/interfaces.go
generated
vendored
25
vendor/github.com/go-openapi/runtime/interfaces.go
generated
vendored
@@ -16,17 +16,11 @@ package runtime
|
||||
|
||||
import (
|
||||
"io"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// File represents an uploaded file.
|
||||
type File struct {
|
||||
Data multipart.File
|
||||
Header *multipart.FileHeader
|
||||
}
|
||||
|
||||
// OperationHandlerFunc an adapter for a function to the OperationHandler interface
|
||||
type OperationHandlerFunc func(interface{}) (interface{}, error)
|
||||
|
||||
@@ -85,8 +79,23 @@ type Authenticator interface {
|
||||
Authenticate(interface{}) (bool, interface{}, error)
|
||||
}
|
||||
|
||||
// AuthorizerFunc turns a function into an authorizer
|
||||
type AuthorizerFunc func(*http.Request, interface{}) error
|
||||
|
||||
// Authorize authorizes the processing of the request for the principal
|
||||
func (f AuthorizerFunc) Authorize(r *http.Request, principal interface{}) error {
|
||||
return f(r, principal)
|
||||
}
|
||||
|
||||
// Authorizer represents an authorization strategy
|
||||
// implementations of Authorizer know how to authorize the principal object
|
||||
// using the request data and returns error if unauthorized
|
||||
type Authorizer interface {
|
||||
Authorize(*http.Request, interface{}) error
|
||||
}
|
||||
|
||||
// Validatable types implementing this interface allow customizing their validation
|
||||
// this will be used instead of the reflective valditation based on the spec document.
|
||||
// this will be used instead of the reflective validation based on the spec document.
|
||||
// the implementations are assumed to have been generated by the swagger tool so they should
|
||||
// contain all the validations obtained from the spec
|
||||
type Validatable interface {
|
||||
|
Reference in New Issue
Block a user