Masood Malekghassemi | 743c10c | 2015-06-16 18:05:27 -0700 | [diff] [blame] | 1 | # Copyright 2015, Google Inc. |
| 2 | # All rights reserved. |
| 3 | # |
| 4 | # Redistribution and use in source and binary forms, with or without |
| 5 | # modification, are permitted provided that the following conditions are |
| 6 | # met: |
| 7 | # |
| 8 | # * Redistributions of source code must retain the above copyright |
| 9 | # notice, this list of conditions and the following disclaimer. |
| 10 | # * Redistributions in binary form must reproduce the above |
| 11 | # copyright notice, this list of conditions and the following disclaimer |
| 12 | # in the documentation and/or other materials provided with the |
| 13 | # distribution. |
| 14 | # * Neither the name of Google Inc. nor the names of its |
| 15 | # contributors may be used to endorse or promote products derived from |
| 16 | # this software without specific prior written permission. |
| 17 | # |
| 18 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 19 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 20 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 21 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 22 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 23 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 | |
| 30 | |
| 31 | # Adapter from grpc._cython.types to the surface expected by |
| 32 | # grpc._adapter._intermediary_low. |
| 33 | # |
| 34 | # TODO(atash): Once this is plugged into grpc._adapter._intermediary_low, remove |
| 35 | # both grpc._adapter._intermediary_low and this file. The fore and rear links in |
Masood Malekghassemi | aed42a8 | 2015-12-07 16:35:40 -0800 | [diff] [blame] | 36 | # grpc._adapter should be able to use grpc._cython.cygrpc directly. |
Masood Malekghassemi | 743c10c | 2015-06-16 18:05:27 -0700 | [diff] [blame] | 37 | |
| 38 | from grpc._adapter import _types as type_interfaces |
| 39 | from grpc._cython import cygrpc |
| 40 | |
| 41 | |
| 42 | class ClientCredentials(object): |
| 43 | def __init__(self): |
| 44 | raise NotImplementedError() |
| 45 | |
| 46 | @staticmethod |
| 47 | def google_default(): |
| 48 | raise NotImplementedError() |
| 49 | |
| 50 | @staticmethod |
| 51 | def ssl(): |
| 52 | raise NotImplementedError() |
| 53 | |
| 54 | @staticmethod |
| 55 | def composite(): |
| 56 | raise NotImplementedError() |
| 57 | |
| 58 | @staticmethod |
| 59 | def compute_engine(): |
| 60 | raise NotImplementedError() |
| 61 | |
| 62 | @staticmethod |
Masood Malekghassemi | 743c10c | 2015-06-16 18:05:27 -0700 | [diff] [blame] | 63 | def jwt(): |
| 64 | raise NotImplementedError() |
| 65 | |
| 66 | @staticmethod |
| 67 | def refresh_token(): |
| 68 | raise NotImplementedError() |
| 69 | |
| 70 | @staticmethod |
Masood Malekghassemi | 743c10c | 2015-06-16 18:05:27 -0700 | [diff] [blame] | 71 | def iam(): |
| 72 | raise NotImplementedError() |
| 73 | |
| 74 | |
| 75 | class ServerCredentials(object): |
| 76 | def __init__(self): |
| 77 | raise NotImplementedError() |
| 78 | |
| 79 | @staticmethod |
| 80 | def ssl(): |
| 81 | raise NotImplementedError() |
| 82 | |
Masood Malekghassemi | 743c10c | 2015-06-16 18:05:27 -0700 | [diff] [blame] | 83 | |
| 84 | class CompletionQueue(type_interfaces.CompletionQueue): |
| 85 | def __init__(self): |
| 86 | raise NotImplementedError() |
| 87 | |
| 88 | |
| 89 | class Call(type_interfaces.Call): |
| 90 | def __init__(self): |
| 91 | raise NotImplementedError() |
| 92 | |
| 93 | |
| 94 | class Channel(type_interfaces.Channel): |
| 95 | def __init__(self): |
| 96 | raise NotImplementedError() |
| 97 | |
| 98 | |
| 99 | class Server(type_interfaces.Server): |
| 100 | def __init__(self): |
| 101 | raise NotImplementedError() |
| 102 | |