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

Unified Diff: go/src/infra/gae/epservice/example/service.go

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « go/src/infra/gae/epservice/example/model.go ('k') | go/src/infra/gae/epservice/example/service_add.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: go/src/infra/gae/epservice/example/service.go
diff --git a/go/src/infra/gae/epservice/example/service.go b/go/src/infra/gae/epservice/example/service.go
new file mode 100644
index 0000000000000000000000000000000000000000..8a06e2fa36f4273d40c594bd904d26af1799f246
--- /dev/null
+++ b/go/src/infra/gae/epservice/example/service.go
@@ -0,0 +1,32 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Package example is an example Google Cloud Endpoints service, which is
+// compatible with the automatic client generation code in infra/gae/epclient.
+//
+// It implements a really dumb named persistant counter.
+package example
+
+import (
+ "infra/gae/libs/ephelper"
+
+ "github.com/GoogleCloudPlatform/go-endpoints/endpoints"
+)
+
+// Example is the example service type.
+type Example struct{}
+
+var mi = ephelper.MethodInfoMap{}
+
+var si = &endpoints.ServiceInfo{
+ Name: "dumb_counter",
+ Version: "v1",
+ Description: "A hideously stupid persistant counter service.",
+}
+
+// RegisterEndpointsService allows appengine apps (and epclient's `go generate`
+// functionality) to register this stupid dumb_counter service.
+func RegisterEndpointsService(s *endpoints.Server) error {
+ return ephelper.Register(s, Example{}, si, mi)
+}
« no previous file with comments | « go/src/infra/gae/epservice/example/model.go ('k') | go/src/infra/gae/epservice/example/service_add.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698