You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vanus Functions are a series of pre-built functions worked within Vanus transformer. By choosing a function, users can specify the way that events will be changed.
It will be a good start if you decide to contribute to Vanus codes.
Details
This function is used to find a sub-string by specifying the starting position and the ending position of an existed json element, and then replace it with a specific new string.
Description
Function name: replace_between_positions
Function args:
path: the json path of the string which needs to be replaced.
startPosition: the starting position of the string. The position of the first letter of a string should be 0.
endPosition: the ending position of the string. The position of the first letter of a string should be 0.
targetValue: the string used to replace the old one.
Function description: Find a sub-string by specifying the starting position and the ending position of an existed json element, and then replace it with a specific new string. The previous value of the json object will be replaced.
Example
For example, if users' original event looks like this:
Create a branch function-replace-between-positions
Create replace_between_positions.go under internal/primitive/transform/action/strings, and then implement the function.
Create replace_between_positions_test.go under internal/primitive/transform/action/strings for unit test.
Register your function in internal/primitive/transform/runtime/init.go.
Submit your PR
Contribution points
Each issue counts specific points based on its difficulty. Contributors earn the corresponding points if they solve that issue. Contribution points are used to describe the contributions contributors have made. They can also be used to get rewards when there are community events.
This issue counts 8 points.
How to claim to solve the issue
If you want to implement this function, please leave a comment in this issue like:
I'd like to implement this function, please assign this issue to me.
Vanus community will assign the issue to you on time.
The text was updated successfully, but these errors were encountered:
I'm not that experience in writing with Golang but after looking through previous PR and other string related functions, I'd like to implement this function, please assign this issue to me.
I'm not that experience in writing with Golang but after looking through previous PR and other string related functions, I'd like to implement this function, please assign this issue to me.
I'm not that experience in writing with Golang but after looking through previous PR and other string related functions, I'd like to implement this function, please assign this issue to me.
You may have some questions during implementation, Join the Slack channel to discuss with other developers. Also there you can know details about how to get contribution rewards.
I'm not that experience in writing with Golang but after looking through previous PR and other string related functions, I'd like to implement this function, please assign this issue to me.
You may have some questions during implementation, Join the Slack channel to discuss with other developers. Also there you can know details about how to get contribution rewards.
Motivation
Vanus Functions are a series of pre-built functions worked within Vanus transformer. By choosing a function, users can specify the way that events will be changed.
It will be a good start if you decide to contribute to Vanus codes.
Details
This function is used to find a sub-string by specifying the starting position and the ending position of an existed json element, and then replace it with a specific new string.
Description
Function name: replace_between_positions
Function args:
Function description: Find a sub-string by specifying the starting position and the ending position of an existed json element, and then replace it with a specific new string. The previous value of the json object will be replaced.
Example
For example, if users' original event looks like this:
After the function "replace_between_positions":
The transformed event should look like:
How to implement
function-replace-between-positions
replace_between_positions.go
underinternal/primitive/transform/action/strings
, and then implement the function.replace_between_positions_test.go
underinternal/primitive/transform/action/strings
for unit test.internal/primitive/transform/runtime/init.go
.Contribution points
Each issue counts specific points based on its difficulty. Contributors earn the corresponding points if they solve that issue. Contribution points are used to describe the contributions contributors have made. They can also be used to get rewards when there are community events.
This issue counts 8 points.
How to claim to solve the issue
If you want to implement this function, please leave a comment in this issue like:
Vanus community will assign the issue to you on time.
The text was updated successfully, but these errors were encountered: