mirror of https://github.com/docker/docs.git
making lint happy
This commit is contained in:
parent
70b749bb46
commit
9df0215cfb
|
@ -10,7 +10,7 @@ type Scope interface {
|
|||
Compare(Scope) bool
|
||||
}
|
||||
|
||||
// IAuthorizer is an interfaces to authorize a scope
|
||||
// Authorizer is an interfaces to authorize a scope
|
||||
type Authorizer interface {
|
||||
// Authorize is expected to set the Authorization on the Context. If
|
||||
// Authorization fails, an error should be returned, but additionally,
|
||||
|
@ -19,7 +19,7 @@ type Authorizer interface {
|
|||
Authorize(Context, ...Scope) error
|
||||
}
|
||||
|
||||
// IAuthorization is an interface to determine whether
|
||||
// Authorization is an interface to determine whether
|
||||
// an object has a scope
|
||||
type Authorization interface {
|
||||
HasScope(Scope) bool
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// IContext defines an interface for managing authorizations.
|
||||
// Context defines an interface for managing authorizations.
|
||||
type Context interface {
|
||||
// TODO: define a set of standard getters. Using getters
|
||||
// will allow us to easily and transparently cache
|
||||
|
@ -29,7 +29,7 @@ type Context interface {
|
|||
Trust() signed.TrustService
|
||||
}
|
||||
|
||||
// IContextFactory creates a IContext from an http request.
|
||||
// ContextFactory creates a IContext from an http request.
|
||||
type ContextFactory func(*http.Request, signed.TrustService) Context
|
||||
|
||||
// Context represents an authorization context for a resource.
|
||||
|
@ -39,7 +39,7 @@ type context struct {
|
|||
trust signed.TrustService
|
||||
}
|
||||
|
||||
// ContextFactory creates a new authorization context with the
|
||||
// NewContext creates a new authorization context with the
|
||||
// given HTTP request path as the resource.
|
||||
func NewContext(r *http.Request, trust signed.TrustService) Context {
|
||||
return &context{
|
||||
|
|
Loading…
Reference in New Issue