Skip to content

Commit

Permalink
codegen
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
  • Loading branch information
eddycharly committed Oct 4, 2023
1 parent c115547 commit 4ba45b4
Show file tree
Hide file tree
Showing 7 changed files with 289 additions and 223 deletions.
1 change: 1 addition & 0 deletions docs/user/commands/kyverno-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ kyverno-json [flags]

* [kyverno-json completion](kyverno-json_completion.md) - Generate the autocompletion script for the specified shell
* [kyverno-json docs](kyverno-json_docs.md) - Generates reference documentation.
* [kyverno-json jp](kyverno-json_jp.md) - Provides a command-line interface to JMESPath, enhanced with custom functions.
* [kyverno-json scan](kyverno-json_scan.md) - scan

24 changes: 24 additions & 0 deletions docs/user/commands/kyverno-json_jp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## kyverno-json jp

Provides a command-line interface to JMESPath, enhanced with custom functions.

### Synopsis

Provides a command-line interface to JMESPath, enhanced with custom functions.

```
kyverno-json jp [flags]
```

### Options

```
-h, --help help for jp
```

### SEE ALSO

* [kyverno-json](kyverno-json.md) - kyverno-json
* [kyverno-json jp function](kyverno-json_jp_function.md) - Provides function informations.
* [kyverno-json jp parse](kyverno-json_jp_parse.md) - Parses jmespath expression and shows corresponding AST.

22 changes: 22 additions & 0 deletions docs/user/commands/kyverno-json_jp_function.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## kyverno-json jp function

Provides function informations.

### Synopsis

Provides function informations.

```
kyverno-json jp function [function_name]... [flags]
```

### Options

```
-h, --help help for function
```

### SEE ALSO

* [kyverno-json jp](kyverno-json_jp.md) - Provides a command-line interface to JMESPath, enhanced with custom functions.

23 changes: 23 additions & 0 deletions docs/user/commands/kyverno-json_jp_parse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## kyverno-json jp parse

Parses jmespath expression and shows corresponding AST.

### Synopsis

Parses jmespath expression and shows corresponding AST.

```
kyverno-json jp parse [-f file|expression]... [flags]
```

### Options

```
-f, --file strings Read input from a JSON or YAML file instead of stdin
-h, --help help for parse
```

### SEE ALSO

* [kyverno-json jp](kyverno-json_jp.md) - Provides a command-line interface to JMESPath, enhanced with custom functions.

3 changes: 2 additions & 1 deletion pkg/commands/jp/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package jp
import (
"github.com/kyverno/kyverno-json/pkg/commands/jp/function"
"github.com/kyverno/kyverno-json/pkg/commands/jp/parse"
"github.com/kyverno/kyverno-json/pkg/commands/jp/query"
"github.com/spf13/cobra"
)

Expand All @@ -20,7 +21,7 @@ func Command() *cobra.Command {
cmd.AddCommand(
function.Command(),
parse.Command(),
// query.Command(),
query.Command(),
)
return cmd
}
Loading

0 comments on commit 4ba45b4

Please sign in to comment.