making lint happy

This commit is contained in:
David Lawrence 2015-04-21 15:28:57 -07:00
parent 70b749bb46
commit 9df0215cfb
2 changed files with 5 additions and 5 deletions

View File

@ -10,7 +10,7 @@ type Scope interface {
Compare(Scope) bool Compare(Scope) bool
} }
// IAuthorizer is an interfaces to authorize a scope // Authorizer is an interfaces to authorize a scope
type Authorizer interface { type Authorizer interface {
// Authorize is expected to set the Authorization on the Context. If // Authorize is expected to set the Authorization on the Context. If
// Authorization fails, an error should be returned, but additionally, // Authorization fails, an error should be returned, but additionally,
@ -19,7 +19,7 @@ type Authorizer interface {
Authorize(Context, ...Scope) error Authorize(Context, ...Scope) error
} }
// IAuthorization is an interface to determine whether // Authorization is an interface to determine whether
// an object has a scope // an object has a scope
type Authorization interface { type Authorization interface {
HasScope(Scope) bool HasScope(Scope) bool

View File

@ -5,7 +5,7 @@ import (
"net/http" "net/http"
) )
// IContext defines an interface for managing authorizations. // Context defines an interface for managing authorizations.
type Context interface { type Context interface {
// TODO: define a set of standard getters. Using getters // TODO: define a set of standard getters. Using getters
// will allow us to easily and transparently cache // will allow us to easily and transparently cache
@ -29,7 +29,7 @@ type Context interface {
Trust() signed.TrustService 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 type ContextFactory func(*http.Request, signed.TrustService) Context
// Context represents an authorization context for a resource. // Context represents an authorization context for a resource.
@ -39,7 +39,7 @@ type context struct {
trust signed.TrustService 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. // given HTTP request path as the resource.
func NewContext(r *http.Request, trust signed.TrustService) Context { func NewContext(r *http.Request, trust signed.TrustService) Context {
return &context{ return &context{