Alex Klein | 54e38e3 | 2019-06-21 14:54:17 -0600 | [diff] [blame^] | 1 | # -*- coding: utf-8 -*- |
| 2 | # Copyright 2019 The Chromium OS 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 | """API information controller.""" |
| 7 | |
| 8 | from __future__ import print_function |
| 9 | |
| 10 | from chromite.api import router as router_lib |
| 11 | |
| 12 | |
| 13 | def GetMethods(_input_proto, output_proto): |
| 14 | """List all of the registered methods.""" |
| 15 | router = router_lib.GetRouter() |
| 16 | for method in router.ListMethods(): |
| 17 | output_proto.methods.add().method = method |