func getUserQuota(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	allowed := permission.Check(t, permission.PermUserUpdateQuota)
	if !allowed {
		return permission.ErrUnauthorized
	}
	email := r.URL.Query().Get(":email")
	user, err := auth.GetUserByEmail(email)
	if err == authTypes.ErrUserNotFound {
		return &errors.HTTP{
			Code:    http.StatusNotFound,
			Message: err.Error(),
		}
	}
	if err != nil {
		return err
	}
	w.Header().Set("Content-Type", "application/json")
	return json.NewEncoder(w).Encode(user.Quota)
}
func getUserQuota(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	allowed := permission.Check(t, permission.PermUserUpdateQuota)
	if !allowed {
		return permission.ErrUnauthorized
	}
	email := r.URL.Query().Get(":email")
	user, err := auth.GetUserByEmail(email)
	if err == authTypes.ErrUserNotFound {
		return &errors.HTTP{
			Code:    http.StatusNotFound,
			Message: err.Error(),
		}
	}
	if err != nil {
		return err
	}
	w.Header().Set("Content-Type", "application/json")
	return json.NewEncoder(w).Encode(user.Quota)
}
func getUserQuota ( w http . ResponseWriter , r * http . Request , t auth . Token ) error { allowed := permission . Check ( t , permission . PermUserUpdateQuota ) if ! allowed { return permission . ErrUnauthorized } email := r . URL . Query ( ) . Get ( " " ) user , err := auth . GetUserByEmail ( email ) if err == authTypes . ErrUserNotFound { return & errors . HTTP { Code : http . StatusNotFound , Message : err . Error ( ) , } } if err != nil { return err } w . Header ( ) . Set ( " " , " " ) return json . NewEncoder ( w ) . Encode ( user . Quota ) }
// title: user quota
// path: /users/{email}/quota
// method: GET
// produce: application/json
// responses:
//   200: OK
//   401: Unauthorized
//   404: User not found
title : user quota path : / users / { email } / quota method : GET produce : application / json responses : 200 : OK 401 : Unauthorized 404 : User not found