1

I am able to successfully deploy following firebase cloud function without issue. What i am trying to accomplish is to deploy multiple functions from within Authentication class.

using System.Threading.Tasks;
using Google.Cloud.Functions.Framework;
using Microsoft.AspNetCore.Http;

namespace CloudFunctions
{
    public class Authentication: IHttpFunction
    {
        public async Task HandleAsync(HttpContext context)
        {
            await context.Response.WriteAsync("Hello World!");
        }
    }
}

I am deploying using gcloud like following which works fine

gcloud functions deploy login --entry-point CloudFunctions.Authentication --runtime dotnet3 --trigger-http --allow-unauthenticated

What i am trying to do is deploy a login and logout function from within Authentication class. I know how to do this in javascript/typescript but haven't found example of how to do this using c#. I would prefer to not have to create a class for each endpoint.

Maxqueue
  • 2,194
  • 2
  • 23
  • 55
  • Can you give the link of javascript/typescript example you are saying? – JM Gelilio Jul 26 '21 at 22:06
  • @JM Gelilio im not using javascript/typescript. I am using c# and i am able to deploy no problem using one class with one method. I want to deploy multiple functions from within one class – Maxqueue Jul 27 '21 at 23:25
  • I understand, what I mean is include the example of your javascript/typescript that you've said in your question to understand and have a basis. – JM Gelilio Jul 28 '21 at 14:08

0 Answers0