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

Side by Side Diff: server/static/rpc/rpc-code.html

Issue 1695893004: RPC Explorer (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@rpcepxlorer-deps
Patch Set: 80 chars Created 4 years, 10 months 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
« no previous file with comments | « server/static/rpc/rpc-client.html ('k') | server/static/rpc/rpc-error.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!--
2 Copyright 2016 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file.
5 -->
6
7 <script>
8 'use strict';
9
10 var luci = (function(luci) {
11
12 var rpc = luci.rpc = luci.rpc || {};
13
14 /**
15 * gRPC response codes.
16 * based on https://github.com/grpc/grpc-go/blob/972dbd2/codes/codes.go#L43
17 * @enum {number}
18 */
19 rpc.Code = {
20 OK: 0,
21 CANCELED: 1,
22 UNKNOWN: 2,
23 INVALID_ARGUMENT: 3,
24 DEADLINE_EXCEEDED: 4,
25 NOT_FOUND: 5,
26 ALREADY_EXISTS: 6,
27 PERMISSION_DENIED: 7,
28 UNAUTHENTICATED: 16,
29 RESOURCE_EXHAUSTED: 8,
30 FAILED_PRECONDITION: 9,
31 ABORTED: 10,
32 OUT_OF_RANGE: 11,
33 UNIMPLEMENTED: 12,
34 INTERNAL: 13,
35 UNAVAILABLE: 14,
36 DATA_LOSS: 15
37 };
38
39 var codeNames = {};
40 for (var name in rpc.Code) {
41 codeNames[rpc.Code[name]] = name;
42 }
43
44 /**
45 * Returns response code name or undefined.
46 */
47 rpc.CodeName = function(code) {
48 return codeNames[code];
49 };
50
51 return luci;
52 }(luci || {}));
53 </script>
OLDNEW
« no previous file with comments | « server/static/rpc/rpc-client.html ('k') | server/static/rpc/rpc-error.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698