add eventgrid support
This commit is contained in:
Родитель
4ddb58a858
Коммит
d124f2133a
|
@ -0,0 +1,20 @@
|
|||
/**
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*/
|
||||
|
||||
package com.microsoft.azure.serverless.functions.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.PARAMETER})
|
||||
public @interface EventGridTrigger {
|
||||
String name();
|
||||
|
||||
String dataType() default "";
|
||||
}
|
|
@ -15,7 +15,7 @@ public final class BindingDefinition {
|
|||
boolean isOutput() { return this.direction == BindingInfo.Direction.out || this.direction == BindingInfo.Direction.inout; }
|
||||
|
||||
enum BindingType {
|
||||
TIMER, HTTP, QUEUE, TABLE, BLOB, SERVICEBUS, EVENTHUB, NOTIFICATIONHUB, MANUAL, MOBILETABLE, DOCUMENTDB, TWILIOSMS, SENDGRID, UNKNOWN;
|
||||
TIMER, HTTP, QUEUE, TABLE, BLOB, SERVICEBUS, EVENTHUB, NOTIFICATIONHUB, MANUAL, MOBILETABLE, DOCUMENTDB, TWILIOSMS, SENDGRID, EVENTGRID, UNKNOWN;
|
||||
|
||||
private static BindingType parse(String type) {
|
||||
switch (type) {
|
||||
|
@ -32,6 +32,7 @@ public final class BindingDefinition {
|
|||
case "documentDB": return DOCUMENTDB;
|
||||
case "twilioSms": return TWILIOSMS;
|
||||
case "sendGrid": return SENDGRID;
|
||||
case "eventGridTrigger": return EVENTGRID;
|
||||
default: return UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче