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

Unified Diff: appengine/apigen_examples/dumb_counter/dumbCounter/service_list.go

Issue 1750143003: Remove ephelper and other endpoints code. (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: appengine/apigen_examples/dumb_counter/dumbCounter/service_list.go
diff --git a/appengine/apigen_examples/dumb_counter/dumbCounter/service_list.go b/appengine/apigen_examples/dumb_counter/dumbCounter/service_list.go
deleted file mode 100644
index 8e92e73036b3d79a861c959def3c34a0cb3802fa..0000000000000000000000000000000000000000
--- a/appengine/apigen_examples/dumb_counter/dumbCounter/service_list.go
+++ /dev/null
@@ -1,36 +0,0 @@
-// 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 dumbCounter
-
-import (
- "github.com/GoogleCloudPlatform/go-endpoints/endpoints"
- dstore "github.com/luci/gae/service/datastore"
- "golang.org/x/net/context"
-)
-
-// ListRsp is the response from the 'List' RPC. It contains a list of Counters
-// including their IDs and Values.
-type ListRsp struct {
- Counters []Counter
-}
-
-// List returns a list of all the counters. Note that it's very poorly
-// implemented! It's completely unpaged. I don't care :).
-func (e *Example) List(c context.Context) (rsp *ListRsp, err error) {
- c, err = e.Use(c, listMethodInfo)
- if err != nil {
- return
- }
-
- ds := dstore.Get(c)
- rsp = &ListRsp{}
- err = ds.GetAll(dstore.NewQuery("Counter"), &rsp.Counters)
- return
-}
-
-var listMethodInfo = &endpoints.MethodInfo{
- Path: "counter",
- Desc: "Returns all of the available counters",
-}

Powered by Google App Engine
This is Rietveld 408576698