mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
remove ccirrelo/supervisor, update
everything seems to work even though sirupsen is upper case? :cyfap:
This commit is contained in:
19
vendor/github.com/go-openapi/runtime/interfaces.go
generated
vendored
19
vendor/github.com/go-openapi/runtime/interfaces.go
generated
vendored
@@ -15,8 +15,10 @@
|
||||
package runtime
|
||||
|
||||
import (
|
||||
"github.com/go-openapi/strfmt"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// OperationHandlerFunc an adapter for a function to the OperationHandler interface
|
||||
@@ -77,6 +79,21 @@ 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.
|
||||
// the implementations are assumed to have been generated by the swagger tool so they should
|
||||
|
||||
Reference in New Issue
Block a user