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

Side by Side Diff: go/src/infra/gae/epclient/dumb_counter/v1/dumb_counter-api.json

Issue 1153473008: A client/server helper wrapper for endpoints in Go. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: rm newline Created 5 years, 6 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
OLDNEW
(Empty)
1 {
2 "kind": "discovery#restDescription",
3 "etag": "\"u_zXkMELIlX4ktyNbM2XKD4vK8E/rJUrs9Jz3NBAGyCFAalnzbr2I7M\"",
4 "discoveryVersion": "v1",
5 "id": "dumb_counter:v1",
6 "name": "dumb_counter",
7 "version": "v1",
8 "description": "A hideously stupid persistant counter service.",
9 "icons": {
10 "x16": "http://www.google.com/images/icons/product/search-16.gif",
11 "x32": "http://www.google.com/images/icons/product/search-32.gif"
12 },
13 "protocol": "rest",
14 "baseUrl": "http://localhost:8080/_ah/api/dumb_counter/v1/",
15 "basePath": "/_ah/api/dumb_counter/v1/",
16 "rootUrl": "http://localhost:8080/_ah/api/",
17 "servicePath": "dumb_counter/v1/",
18 "batchPath": "batch",
19 "parameters": {
20 "alt": {
21 "type": "string",
22 "description": "Data format for the response.",
23 "default": "json",
24 "enum": [
25 "json"
26 ],
27 "enumDescriptions": [
28 "Responses with Content-Type of application/json"
29 ],
30 "location": "query"
31 },
32 "fields": {
33 "type": "string",
34 "description": "Selector specifying which fields to include in a partial resp onse.",
35 "location": "query"
36 },
37 "key": {
38 "type": "string",
39 "description": "API key. Your API key identifies your project and provides yo u with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
40 "location": "query"
41 },
42 "oauth_token": {
43 "type": "string",
44 "description": "OAuth 2.0 token for the current user.",
45 "location": "query"
46 },
47 "prettyPrint": {
48 "type": "boolean",
49 "description": "Returns response with indentations and line breaks.",
50 "default": "true",
51 "location": "query"
52 },
53 "quotaUser": {
54 "type": "string",
55 "description": "Available to use for quota purposes for server-side applicati ons. Can be any arbitrary string assigned to a user, but should not exceed 40 ch aracters. Overrides userIp if both are provided.",
56 "location": "query"
57 },
58 "userIp": {
59 "type": "string",
60 "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
61 "location": "query"
62 }
63 },
64 "schemas": {
65 "AddReq": {
66 "id": "AddReq",
67 "type": "object",
68 "properties": {
69 "Delta": {
70 "type": "string",
71 "format": "int64"
72 },
73 "Name": {
74 "type": "string"
75 }
76 }
77 },
78 "AddRsp": {
79 "id": "AddRsp",
80 "type": "object",
81 "properties": {
82 "Cur": {
83 "type": "string",
84 "format": "int64"
85 },
86 "Prev": {
87 "type": "string",
88 "format": "int64"
89 }
90 }
91 },
92 "CASReq": {
93 "id": "CASReq",
94 "type": "object",
95 "properties": {
96 "Name": {
97 "type": "string"
98 },
99 "NewVal": {
100 "type": "string",
101 "format": "int64"
102 },
103 "OldVal": {
104 "type": "string",
105 "format": "int64"
106 }
107 }
108 },
109 "Counter": {
110 "id": "Counter",
111 "type": "object",
112 "properties": {
113 "ID": {
114 "type": "string"
115 },
116 "Val": {
117 "type": "string",
118 "format": "int64"
119 }
120 }
121 },
122 "CurrentValueRsp": {
123 "id": "CurrentValueRsp",
124 "type": "object",
125 "properties": {
126 "Val": {
127 "type": "string",
128 "format": "int64"
129 }
130 }
131 },
132 "ListRsp": {
133 "id": "ListRsp",
134 "type": "object",
135 "properties": {
136 "Counters": {
137 "type": "array",
138 "items": {
139 "$ref": "Counter"
140 }
141 }
142 }
143 }
144 },
145 "methods": {
146 "add": {
147 "id": "dumb_counter.add",
148 "path": "counter/{Name}",
149 "httpMethod": "POST",
150 "description": "Add an an amount to a particular counter",
151 "parameters": {
152 "Name": {
153 "type": "string",
154 "required": true,
155 "location": "path"
156 }
157 },
158 "parameterOrder": [
159 "Name"
160 ],
161 "request": {
162 "$ref": "AddReq",
163 "parameterName": "resource"
164 },
165 "response": {
166 "$ref": "AddRsp"
167 }
168 },
169 "cas": {
170 "id": "dumb_counter.cas",
171 "path": "counter/{Name}/cas",
172 "httpMethod": "POST",
173 "description": "Compare and swap a counter value",
174 "parameters": {
175 "Name": {
176 "type": "string",
177 "required": true,
178 "location": "path"
179 }
180 },
181 "parameterOrder": [
182 "Name"
183 ],
184 "request": {
185 "$ref": "CASReq",
186 "parameterName": "resource"
187 }
188 },
189 "currentvalue": {
190 "id": "dumb_counter.currentvalue",
191 "path": "counter/{Name}",
192 "httpMethod": "GET",
193 "description": "Returns the current value held by the named counter",
194 "parameters": {
195 "Name": {
196 "type": "string",
197 "required": true,
198 "location": "path"
199 }
200 },
201 "parameterOrder": [
202 "Name"
203 ],
204 "response": {
205 "$ref": "CurrentValueRsp"
206 }
207 },
208 "list": {
209 "id": "dumb_counter.list",
210 "path": "counter",
211 "httpMethod": "GET",
212 "description": "Returns all of the available counters",
213 "response": {
214 "$ref": "ListRsp"
215 }
216 }
217 }
218 }
OLDNEW
« no previous file with comments | « go/src/infra/gae/epclient/api-list.json ('k') | go/src/infra/gae/epclient/dumb_counter/v1/dumb_counter-gen.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698