// Strict is a `martini.Handler` that provides a `Negotiator` instance.
330199
func Strict(r *http.Request, c martini.Context) {
	c.MapTo(&negotiator{r}, (*Negotiator)(nil))
}
650553
func (c *Cors) isMethodAllowed(method string) bool {
	if len(c.allowedMethods) == 0 {
		// If no method allowed, always return false, even for preflight request
		return false
	}
	method = strings.ToUpper(method)
	if method == "OPTIONS" {
		// Always allow preflight requests
		return true
	}
	for _, m := range c.allowedMethods {
		if m == method {
			return true
		}
	}
	return false
}
919650
func Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool {

	interfaceType := reflect.TypeOf(interfaceObject).Elem()

	if !reflect.TypeOf(object).Implements(interfaceType) {
		return Fail(t, fmt.Sprintf("%T must implement %v", object, interfaceType), msgAndArgs...)
	}

	return true

}
260346
func (declarations DeclarationsByProperty) Less(i, j int) bool {
	return declarations[i].Property < declarations[j].Property
}
414448
func All(options ...Options) martini.Handler {
	opt := prepareOptions(options)
	return func(w http.ResponseWriter, r *http.Request, c martini.Context) {
		serveGzip(w, r, c, opt)
	}
}
335817
func (k *Key) StrictUint64s(delim string) ([]uint64, error) {
	return k.parseUint64s(k.Strings(delim), false, true)
}
537095
func Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool {
	if h, ok := t.(tHelper); ok {
		h.Helper()
	}
	interfaceType := reflect.TypeOf(interfaceObject).Elem()

	if object == nil {
		return Fail(t, fmt.Sprintf("Cannot check if nil implements %v", interfaceType), msgAndArgs...)
	}
	if !reflect.TypeOf(object).Implements(interfaceType) {
		return Fail(t, fmt.Sprintf("%T must implement %v", object, interfaceType), msgAndArgs...)
	}

	return true
}
70834
func NewNegotiationHandler(logger logrus.FieldLogger) *NegotiationHandler {
	return &NegotiationHandler{
		json:  NewJSONWriter(logger),
		plain: NewTextWriter(logger, "plain"),
		html:  NewTextWriter(logger, "html"),
		types: []string{
			"application/json",
		},
	}
}
352367
func Middleware(ce *casbin.Enforcer) echo.MiddlewareFunc {
	c := DefaultConfig
	c.Enforcer = ce
	return MiddlewareWithConfig(c)
}
3734
func Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) {
	if h, ok := t.(tHelper); ok {
		h.Helper()
	}
	if assert.Implements(t, interfaceObject, object, msgAndArgs...) {
		return
	}
	t.FailNow()
}
80619
func (e *SyncedEnforcer) Enforce(rvals ...interface{}) bool {
	e.m.RLock()
	defer e.m.RUnlock()
	return e.Enforcer.Enforce(rvals...)
}
85028
func (_ *SigningMethodNone) Sign(_ []byte, _ interface{}) (Signature, error) {
	return nil, nil
}
284966
func (menu *Menu) DeleteConditional(menuID int64) error {
	accessToken, err := menu.GetAccessToken()
	if err != nil {
		return err
	}

	uri := fmt.Sprintf("%s?access_token=%s", menuDeleteConditionalURL, accessToken)
	reqDeleteConditional := &reqDeleteConditional{
		MenuID: menuID,
	}

	response, err := util.PostJSON(uri, reqDeleteConditional)
	if err != nil {
		return err
	}

	return util.DecodeWithCommonError(response, "DeleteConditional")
}
196213
func (asl *AuthServerLdap) Negotiate(c *mysql.Conn, user string, remoteAddr net.Addr) (mysql.Getter, error) {
	// Finish the negotiation.
	password, err := mysql.AuthServerNegotiateClearOrDialog(c, asl.Method)
	if err != nil {
		return nil, err
	}
	return asl.validate(user, password)
}
523426
func StrictTransportSecurity(options StrictTransportSecurityOptions) gear.Middleware {
	return func(ctx *gear.Context) error {
		val := fmt.Sprintf("max-age=%.f;", options.MaxAge.Seconds())
		if options.IncludeSubDomains {
			val += "includeSubDomains;"
		}
		if options.Preload {
			val += "preload;"
		}

		ctx.SetHeader(gear.HeaderStrictTransportSecurity, val)
		return nil
	}
}
9700
func (s *ValidateService) Lenient(lenient bool) *ValidateService {
	s.lenient = &lenient
	return s
}
648553
func (e *Enforcer) Enforce(rvals ...interface{}) bool {
	return enforce(e.Enforcer, e.defaultRole, e.claimsEnforcerFunc, rvals...)
}