-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: migrate transform grok to dynamic properties * refactor: migrate transform json to dynamic properties
- Loading branch information
Showing
12 changed files
with
124 additions
and
120 deletions.
There are no files selected for viewing
24 changes: 8 additions & 16 deletions
24
plugin-transform-grok/src/main/java/io/kestra/plugin/transform/grok/GrokInterface.java
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 |
---|---|---|
@@ -1,51 +1,43 @@ | ||
package io.kestra.plugin.transform.grok; | ||
|
||
import io.kestra.core.models.annotations.PluginProperty; | ||
import io.kestra.core.models.property.Property; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public interface GrokInterface { | ||
|
||
@PluginProperty | ||
@Schema(title = "The Grok pattern to match.") | ||
String getPattern(); | ||
Property<String> getPattern(); | ||
|
||
@PluginProperty | ||
@Schema(title = "The list of Grok patterns to match.") | ||
List<String> getPatterns(); | ||
Property<List<String>> getPatterns(); | ||
|
||
@PluginProperty | ||
@Schema( | ||
title = "List of user-defined pattern directories.", | ||
description = "Directories must be paths relative to the working directory." | ||
) | ||
List<String> getPatternsDir(); | ||
Property<List<String>> getPatternsDir(); | ||
|
||
@PluginProperty | ||
@Schema( | ||
title = "Custom pattern definitions.", | ||
description = "A map of pattern-name and pattern pairs defining custom patterns to be used by the current tasks. Patterns matching existing names will override the pre-existing definition. " | ||
) | ||
Map<String, String> getPatternDefinitions(); | ||
Property<Map<String, String>> getPatternDefinitions(); | ||
|
||
@PluginProperty | ||
@Schema(title = "If `true`, only store named captures from grok.") | ||
boolean isNamedCapturesOnly(); | ||
Property<Boolean> getNamedCapturesOnly(); | ||
|
||
@PluginProperty | ||
@Schema( | ||
title = "If `true`, break on first match.", | ||
description = "The first successful match by grok will result in the task being finished. Set to `false` if you want the task to try all configured patterns." | ||
) | ||
boolean isBreakOnFirstMatch(); | ||
Property<Boolean> getBreakOnFirstMatch(); | ||
|
||
@PluginProperty | ||
@Schema( | ||
title = "If `true`, keep empty captures.", | ||
description = "When an optional field cannot be captured, the empty field is retained in the output. Set `false` if you want empty optional fields to be filtered out." | ||
) | ||
boolean isKeepEmptyCaptures(); | ||
Property<Boolean> getKeepEmptyCaptures(); | ||
} |
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
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
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
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
Oops, something went wrong.