1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

Adds notes to functions (#5824) (#5826)

* added notes

Signed-off-by: Vishal Choudhary <contactvishaltech@gmail.com>

* changes stated in chart.yaml

Signed-off-by: Vishal Choudhary <contactvishaltech@gmail.com>

* undo

Signed-off-by: Vishal Choudhary <contactvishaltech@gmail.com>

Signed-off-by: Vishal Choudhary <contactvishaltech@gmail.com>

Signed-off-by: Vishal Choudhary <contactvishaltech@gmail.com>
Co-authored-by: Vishal Choudhary <contactvishaltech@gmail.com>
This commit is contained in:
gcp-cherry-pick-bot[bot] 2023-01-02 08:35:54 +00:00 committed by GitHub
parent 8eca0d9658
commit 32a755f989
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -129,6 +129,7 @@ func GetFunctions() []*FunctionEntry {
Handler: jpfCompare,
},
ReturnType: []JpType{JpNumber},
Note: "compares two strings lexicographically",
},
{
Entry: &gojmespath.FunctionEntry{
@ -140,6 +141,7 @@ func GetFunctions() []*FunctionEntry {
Handler: jpfEqualFold,
},
ReturnType: []JpType{JpBool},
Note: "allows comparing two strings for equivalency where the only differences are letter cases",
},
{
Entry: &gojmespath.FunctionEntry{
@ -153,6 +155,7 @@ func GetFunctions() []*FunctionEntry {
Handler: jpfReplace,
},
ReturnType: []JpType{JpString},
Note: "replaces a specified number of instances of the source string with the replacement string in a parent ",
},
{
Entry: &gojmespath.FunctionEntry{
@ -165,6 +168,7 @@ func GetFunctions() []*FunctionEntry {
Handler: jpfReplaceAll,
},
ReturnType: []JpType{JpString},
Note: "replace all instances of one string with another in an overall parent string",
},
{
Entry: &gojmespath.FunctionEntry{
@ -175,6 +179,7 @@ func GetFunctions() []*FunctionEntry {
Handler: jpfToUpper,
},
ReturnType: []JpType{JpString},
Note: "takes in a string and outputs the same string with all upper-case letters",
},
{
Entry: &gojmespath.FunctionEntry{
@ -185,6 +190,7 @@ func GetFunctions() []*FunctionEntry {
Handler: jpfToLower,
},
ReturnType: []JpType{JpString},
Note: "takes in a string and outputs the same string with all lower-case letters",
},
{
Entry: &gojmespath.FunctionEntry{
@ -196,6 +202,7 @@ func GetFunctions() []*FunctionEntry {
Handler: jpfTrim,
},
ReturnType: []JpType{JpString},
Note: "trims both ends of the source string by characters appearing in the second string",
},
{
Entry: &gojmespath.FunctionEntry{
@ -207,6 +214,7 @@ func GetFunctions() []*FunctionEntry {
Handler: jpfSplit,
},
ReturnType: []JpType{JpArrayString},
Note: "splits the first string when the second string is found and converts it into an array ",
},
{
Entry: &gojmespath.FunctionEntry{
@ -244,6 +252,7 @@ func GetFunctions() []*FunctionEntry {
Handler: jpRegexMatch,
},
ReturnType: []JpType{JpBool},
Note: "first string is the regular exression which is compared with second input which can be a number or string",
},
{
Entry: &gojmespath.FunctionEntry{
@ -280,6 +289,7 @@ func GetFunctions() []*FunctionEntry {
Handler: jpAdd,
},
ReturnType: []JpType{JpAny},
Note: "does arithmetic addition of two specified values of numbers, quantities, and durations",
},
{
Entry: &gojmespath.FunctionEntry{
@ -291,6 +301,7 @@ func GetFunctions() []*FunctionEntry {
Handler: jpSubtract,
},
ReturnType: []JpType{JpAny},
Note: "does arithmetic subtraction of two specified values of numbers, quantities, and durations",
},
{
Entry: &gojmespath.FunctionEntry{
@ -302,6 +313,7 @@ func GetFunctions() []*FunctionEntry {
Handler: jpMultiply,
},
ReturnType: []JpType{JpAny},
Note: "does arithmetic multiplication of two specified values of numbers, quantities, and durations",
},
{
Entry: &gojmespath.FunctionEntry{
@ -336,6 +348,7 @@ func GetFunctions() []*FunctionEntry {
Handler: jpBase64Decode,
},
ReturnType: []JpType{JpString},
Note: "decodes a base 64 string",
},
{
Entry: &gojmespath.FunctionEntry{
@ -346,6 +359,7 @@ func GetFunctions() []*FunctionEntry {
Handler: jpBase64Encode,
},
ReturnType: []JpType{JpString},
Note: "encodes a regular, plaintext and unencoded string to base64",
},
{
Entry: &gojmespath.FunctionEntry{
@ -358,6 +372,7 @@ func GetFunctions() []*FunctionEntry {
Handler: jpTimeSince,
},
ReturnType: []JpType{JpString},
Note: "calculate the difference between a start and end period of time where the end may either be a static definition or the then-current time",
},
{
Entry: &gojmespath.FunctionEntry{
@ -368,6 +383,7 @@ func GetFunctions() []*FunctionEntry {
Handler: jpPathCanonicalize,
},
ReturnType: []JpType{JpString},
Note: "normalizes or canonicalizes a given path by removing excess slashes",
},
{
Entry: &gojmespath.FunctionEntry{
@ -391,6 +407,7 @@ func GetFunctions() []*FunctionEntry {
Handler: jpSemverCompare,
},
ReturnType: []JpType{JpBool},
Note: "compares two strings which comply with the semantic versioning schema and outputs a boolean response as to the position of the second relative to the first",
},
{
Entry: &gojmespath.FunctionEntry{