Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: pkg/appengine/lib/src/client_context.dart

Issue 804973002: Add appengine/gcloud/mustache dependencies. (Closed) Base URL: git@github.com:dart-lang/pub-dartlang-dart.git@master
Patch Set: Added AUTHORS/LICENSE/PATENTS files Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 library appengine.client_context;
6
7 import 'dart:async';
8
9 import 'package:gcloud/db.dart';
10 import 'package:gcloud/storage.dart';
11 import 'package:memcache/memcache.dart';
12
13 import '../api/logging.dart';
14 import '../api/modules.dart';
15 import '../api/remote_api.dart';
16 import '../api/users.dart';
17
18 abstract class ClientContext {
19 /// Whether the application is currently running in the development
20 /// environment.
21 bool get isDevelopmentEnvironment;
22 /// Whether the application is currently running in the production
23 /// environment.
24 bool get isProductionEnvironment;
25
26 Services get services;
27 Assets get assets;
28 }
29
30 abstract class Services {
31 DatastoreDB get db;
32
33 /// Access the gcloud package storage API. This will autumatically be
34 /// available on deployed App Engine applications. For local testing this
35 /// will be `null` unless the environemnt variable
36 /// `STORAGE_SERVICE_ACCOUNT_FILE` is passed in `app.yaml`. This environment
37 /// variable should point to a private key for a service account in JSON
38 /// format.
39 Storage get storage;
40 Logging get logging;
41 Memcache get memcache;
42 ModulesService get modules;
43 RemoteApi get remoteApi;
44 UserService get users;
45 }
46
47 class AssetError implements Exception {
48 final String message;
49
50 AssetError(this.message);
51
52 String toString() => "AssetError: $message";
53 }
54
55 abstract class Assets {
56 /**
57 * Read an asset. If [path] is not specified the path
58 * from the active request is used.
59 */
60 Future<Stream<List<int>>> read([String path]);
61
62 /**
63 * Serve a asset to the active response. If [path]
64 * is not specified the path from the active request is used.
65 */
66 void serve([String path]);
67 }
OLDNEW
« no previous file with comments | « pkg/appengine/lib/src/appengine_internal.dart ('k') | pkg/appengine/lib/src/protobuf_api/build_protoc.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698