-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Azure functions deploy changes (#119)
Co-authored-by: Sabrina Juarez Garcia <[email protected]>
- Loading branch information
Showing
9 changed files
with
327 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using GeneXus.Deploy.AzureFunctions.BlobHandler; | ||
using GeneXus.Deploy.AzureFunctions.Handlers.Helpers; | ||
using Microsoft.Azure.Functions.Worker; | ||
using System.IO; | ||
|
||
namespace BlobTriggerFunctions | ||
{ | ||
$classes:{class | | ||
public class $class.className$ | ||
{ | ||
private ICallMappings _callmappings; | ||
public $class.className$(ICallMappings callMappings) | ||
{ | ||
_callmappings = callMappings; | ||
\} | ||
|
||
[Function("$class.functionName$")] | ||
public void Run([BlobTrigger("$class.blobPath$", Connection = "$class.connectionName$")] Stream blobItem, FunctionContext context) | ||
{ | ||
BlobTriggerHandler function = new BlobTriggerHandler(_callmappings); | ||
function.Run(blobItem, context); | ||
\} | ||
|
||
\} | ||
}$ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using GeneXus.Deploy.AzureFunctions.CosmosDBHandler; | ||
using GeneXus.Deploy.AzureFunctions.Handlers.Helpers; | ||
using Microsoft.Azure.Functions.Worker; | ||
using System.Collections.Generic; | ||
|
||
namespace CosmosDBTriggerFunctions | ||
{ | ||
$classes:{class | | ||
public class $class.className$ | ||
{ | ||
private ICallMappings _callmappings; | ||
public $class.className$(ICallMappings callMappings) | ||
{ | ||
_callmappings = callMappings; | ||
\} | ||
|
||
[Function("$class.functionName$")] | ||
public void Run([CosmosDBTrigger(databaseName:"$class.databaseName$", containerName:"$class.containerName$", Connection = "$class.connectionName$", LeaseContainerName ="$class.leaseContainerName$",LeaseContainerPrefix ="$class.leaseContainerPrefix$",LeaseDatabaseName ="$class.leaseDatabaseName$",LeaseConnection ="$class.leaseConnection$")] IReadOnlyList<Dictionary<string, object>> doc, FunctionContext context) | ||
{ | ||
CosmosDBTriggerHandler function = new CosmosDBTriggerHandler(_callmappings); | ||
function.Run(doc, context); | ||
\} | ||
|
||
\} | ||
}$ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Azure.Messaging.EventGrid; | ||
using GeneXus.Deploy.AzureFunctions.EventGridHandler; | ||
using GeneXus.Deploy.AzureFunctions.Handlers.Helpers; | ||
using Microsoft.Azure.Functions.Worker; | ||
|
||
namespace EventGridAzureSchemaFunctions | ||
{ | ||
$classes:{class | | ||
public class $class.className$ | ||
{ | ||
private ICallMappings _callmappings; | ||
public $class.className$(ICallMappings callMappings) | ||
{ | ||
_callmappings = callMappings; | ||
\} | ||
|
||
[Function("$class.functionName$")] | ||
public void Run([EventGridTrigger(IsBatched =true)] EventGridEvent[] events, FunctionContext context) | ||
{ | ||
EventGridTriggerHandlerAzure function = new EventGridTriggerHandlerAzure(_callmappings); | ||
function.Run(events, context); | ||
\} | ||
|
||
\} | ||
}$ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Azure.Messaging; | ||
using GeneXus.Deploy.AzureFunctions.EventGridHandler; | ||
using GeneXus.Deploy.AzureFunctions.Handlers.Helpers; | ||
using Microsoft.Azure.Functions.Worker; | ||
|
||
namespace EventGridCloudEventFunctions | ||
{ | ||
$classes:{class | | ||
public class $class.className$ | ||
{ | ||
private ICallMappings _callmappings; | ||
public $class.className$(ICallMappings callMappings) | ||
{ | ||
_callmappings = callMappings; | ||
\} | ||
|
||
[Function("$class.functionName$")] | ||
public void Run([EventGridTrigger(IsBatched = true)] CloudEvent[] events, FunctionContext context) | ||
{ | ||
EventGridTriggerHandlerCloud function = new EventGridTriggerHandlerCloud(_callmappings); | ||
function.Run(events, context); | ||
\} | ||
|
||
\} | ||
}$ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Azure.Storage.Queues.Models; | ||
using GeneXus.Deploy.AzureFunctions.Handlers.Helpers; | ||
using GeneXus.Deploy.AzureFunctions.QueueHandler; | ||
using Microsoft.Azure.Functions.Worker; | ||
|
||
namespace QueueTriggerFunctions | ||
{ | ||
$classes:{class | | ||
public class $class.className$ | ||
{ | ||
private ICallMappings _callmappings; | ||
public $class.className$(ICallMappings callMappings) | ||
{ | ||
_callmappings = callMappings; | ||
\} | ||
|
||
[Function("$class.functionName$")] | ||
public void Run([QueueTrigger("$class.queueName$", Connection = "$class.connectionName$")] QueueMessage queueMessage, FunctionContext context) | ||
{ | ||
QueueTriggerHandler function = new QueueTriggerHandler(_callmappings); | ||
function.Run(queueMessage, context); | ||
\} | ||
|
||
\} | ||
}$ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System.Threading.Tasks; | ||
using Azure.Messaging.ServiceBus; | ||
using GeneXus.Deploy.AzureFunctions.Handlers.Helpers; | ||
using GeneXus.Deploy.AzureFunctions.ServiceBusHandler; | ||
using Microsoft.Azure.Functions.Worker; | ||
|
||
namespace ServiceBusQueueFunctions | ||
{ | ||
$classes:{class | | ||
public class $class.className$ | ||
{ | ||
private ICallMappings _callmappings; | ||
public $class.className$(ICallMappings callMappings) | ||
{ | ||
_callmappings = callMappings; | ||
\} | ||
|
||
[Function("$class.functionName$")] | ||
public async Task Run([ServiceBusTrigger("$class.queueName$", Connection = "$class.connectionName$", IsBatched = true, IsSessionsEnabled=$class.sessionEnabled$)] ServiceBusReceivedMessage[] receivedMessages, FunctionContext context) | ||
{ | ||
ServiceBusTriggerHandler function = new ServiceBusTriggerHandler(_callmappings); | ||
await function.Run(receivedMessages, context); | ||
\} | ||
|
||
\} | ||
}$ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System.Threading.Tasks; | ||
using Azure.Messaging.ServiceBus; | ||
using GeneXus.Deploy.AzureFunctions.Handlers.Helpers; | ||
using GeneXus.Deploy.AzureFunctions.ServiceBusHandler; | ||
using Microsoft.Azure.Functions.Worker; | ||
|
||
namespace ServiceBusQueueFunctions | ||
{ | ||
$classes:{class | | ||
public class $class.className$ | ||
{ | ||
private ICallMappings _callmappings; | ||
|
||
public $class.className$(ICallMappings callMappings) | ||
{ | ||
_callmappings = callMappings; | ||
\} | ||
|
||
[Function("$class.functionName$")] | ||
public async Task Run([ServiceBusTrigger("$class.topicName$","$class.subscriptionName$", Connection = "$class.connectionName$", IsBatched = true, IsSessionsEnabled=$class.sessionEnabled$)] ServiceBusReceivedMessage[] receivedMessages, FunctionContext context) | ||
{ | ||
ServiceBusTriggerHandler function = new ServiceBusTriggerHandler(_callmappings); | ||
await function.Run(receivedMessages, context); | ||
\} | ||
\} | ||
}$ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Microsoft.Azure.Functions.Worker; | ||
using GeneXus.Deploy.AzureFunctions.Handlers.Helpers; | ||
using GeneXus.Deploy.AzureFunctions.TimerHandler; | ||
|
||
namespace TimerTriggerFunctions | ||
{ | ||
$classes:{class | | ||
public class $class.className$ | ||
{ | ||
private ICallMappings _callmappings; | ||
public $class.className$(ICallMappings callMappings) | ||
{ | ||
_callmappings = callMappings; | ||
\} | ||
|
||
[Function("$class.functionName$")] | ||
|
||
public void Run([TimerTrigger("$class.timerSchedule$")] TimerInfo timerInfo, FunctionContext context) | ||
{ | ||
TimerTriggerHandler function = new TimerTriggerHandler(_callmappings); | ||
function.Run(timerInfo, context); | ||
\} | ||
|
||
\} | ||
}$ | ||
} |
Oops, something went wrong.