jq
No long description provided.
Installation
dagger install github.com/sagikazarmark/daggerverse/jq@v0.1.0Entrypoint
Return Type
Arg !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String ! | - | The name of the argument. |
| value | String ! | - | The value of the argument. |
Example
Function Arg.Constructor is not accessible from the jq moduleFunction Arg.Constructor is not accessible from the jq moduleFunction Arg.Constructor is not accessible from the jq moduleFunction Arg.Constructor is not accessible from the jq moduleEntrypoint
Return Type
Result !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| file | File ! | - | The processed JSON output as a file. |
Example
Function Result.Constructor is not accessible from the jq moduleFunction Result.Constructor is not accessible from the jq moduleFunction Result.Constructor is not accessible from the jq moduleFunction Result.Constructor is not accessible from the jq moduleEntrypoint
Return Type
Jq !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String | - | Version (image tag) to use from the official image repository as a base container. |
| container | Container | - | Custom container to use as a base container. |
Example
dagger -m github.com/sagikazarmark/daggerverse/jq@ff27cd50f6b4eed2e3753c520632cd6099e1ce52 call \
func (m *MyModule) Example() *dagger.Jq {
return dag.
Jq()
}@function
def example() -> dagger.Jq:
return (
dag.jq()
)@func()
example(): Jq {
return dag
.jq()
}Types
Arg 🔗
Arg to pass to the jq expression.
name() 🔗
The name of the argument.
Return Type
String ! Example
dagger -m github.com/sagikazarmark/daggerverse/jq@ff27cd50f6b4eed2e3753c520632cd6099e1ce52 call \
arg --name string --value string \
namefunc (m *MyModule) Example(ctx context.Context, name string, value string) string {
return dag.
Jq().
Arg(name, value).
Name(ctx)
}@function
async def example(name: str, value: str) -> str:
return await (
dag.jq()
.arg(name, value)
.name()
)@func()
async example(name: string, value: string): Promise<string> {
return dag
.jq()
.arg(name, value)
.name()
}value() 🔗
The value of the argument.
Return Type
String ! Example
dagger -m github.com/sagikazarmark/daggerverse/jq@ff27cd50f6b4eed2e3753c520632cd6099e1ce52 call \
arg --name string --value string \
valuefunc (m *MyModule) Example(ctx context.Context, name string, value string) string {
return dag.
Jq().
Arg(name, value).
Value(ctx)
}@function
async def example(name: str, value: str) -> str:
return await (
dag.jq()
.arg(name, value)
.value()
)@func()
async example(name: string, value: string): Promise<string> {
return dag
.jq()
.arg(name, value)
.value()
}Result 🔗
The result of a jq evaluation, including the processed JSON output as a file and its contents as a string.
file() 🔗
The processed JSON output as a file.
Return Type
File ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(expr string) *dagger.File {
return dag.
Jq().
Eval(expr).
File()
}@function
def example(expr: str) -> dagger.File:
return (
dag.jq()
.eval(expr)
.file()
)@func()
example(expr: string): File {
return dag
.jq()
.eval(expr)
.file()
}contents() 🔗
The contents of the processed JSON output as a string.
Return Type
String ! Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context, expr string) string {
return dag.
Jq().
Eval(expr).
Contents(ctx)
}@function
async def example(expr: str) -> str:
return await (
dag.jq()
.eval(expr)
.contents()
)@func()
async example(expr: string): Promise<string> {
return dag
.jq()
.eval(expr)
.contents()
}Jq 🔗
container() 🔗
A container that provides the jq command-line tool for JSON processing.
Return Type
Container ! Example
dagger -m github.com/sagikazarmark/daggerverse/jq@ff27cd50f6b4eed2e3753c520632cd6099e1ce52 call \
containerfunc (m *MyModule) Example() *dagger.Container {
return dag.
Jq().
Container()
}@function
def example() -> dagger.Container:
return (
dag.jq()
.container()
)@func()
example(): Container {
return dag
.jq()
.container()
}eval() 🔗
Evaluates a jq expression on the input JSON data.
Return Type
Result !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| expr | String ! | - | Evaluates a jq expression on the input JSON data. |
| input | File | - | The input JSON data to process. |
| nullInput | Boolean | - | Use `null` as the single input value. |
| args | [Arg ! ] | - | Arguments to pass to the jq expression. |
| slurp | Boolean | - | Read all inputs into an array and use it as the single input value. |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(expr string) *dagger.JqResult {
return dag.
Jq().
Eval(expr)
}@function
def example(expr: str) -> dagger.JqResult:
return (
dag.jq()
.eval(expr)
)@func()
example(expr: string): JqResult {
return dag
.jq()
.eval(expr)
}arg() 🔗
Create an arg to pass to the jq expression.
Return Type
Arg !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String ! | - | No description provided |
| value | String ! | - | No description provided |
Example
dagger -m github.com/sagikazarmark/daggerverse/jq@ff27cd50f6b4eed2e3753c520632cd6099e1ce52 call \
arg --name string --value stringfunc (m *MyModule) Example(name string, value string) *dagger.JqArg {
return dag.
Jq().
Arg(name, value)
}@function
def example(name: str, value: str) -> dagger.JqArg:
return (
dag.jq()
.arg(name, value)
)@func()
example(name: string, value: string): JqArg {
return dag
.jq()
.arg(name, value)
}