| | 1 | | // AUTOGENERATED, DO NOT EDIT |
| | 2 | | // Type definitions for server implementations of ports. |
| | 3 | | // package: decentraland.bff |
| | 4 | | // file: decentraland/bff/http_endpoints.proto |
| | 5 | | using System.Collections.Generic; |
| | 6 | | using System.Threading; |
| | 7 | | using Cysharp.Threading.Tasks; |
| | 8 | | using Google.Protobuf; |
| | 9 | | using rpc_csharp.protocol; |
| | 10 | | using rpc_csharp; |
| | 11 | | using Google.Protobuf.WellKnownTypes; |
| | 12 | | namespace Decentraland.Bff { |
| | 13 | | public interface IHttpEndpoints<Context> |
| | 14 | | { |
| | 15 | |
|
| | 16 | | UniTask<AboutResponse> About(Empty request, Context context, CancellationToken ct); |
| | 17 | |
|
| | 18 | | } |
| | 19 | |
|
| | 20 | | public static class HttpEndpointsCodeGen |
| | 21 | | { |
| | 22 | | public const string ServiceName = "HttpEndpoints"; |
| | 23 | |
|
| | 24 | | public static void RegisterService<Context>(RpcServerPort<Context> port, IHttpEndpoints<Context> service) |
| | 25 | | { |
| 0 | 26 | | var result = new ServerModuleDefinition<Context>(); |
| | 27 | |
|
| 0 | 28 | | result.definition.Add("About", async (payload, context, ct) => { var res = await service.About(Empty.Parser.ParseFro |
| | 29 | |
|
| 0 | 30 | | port.RegisterModule(ServiceName, (port) => UniTask.FromResult(result)); |
| 0 | 31 | | } |
| | 32 | | } |
| | 33 | | } |