yq
Yq runtime
Installation
dagger install github.com/Dudesons/daggerverse/yq@v0.2.1
Entrypoint
Return Type
Yq !
Arguments
Name | Type | Description |
---|---|---|
image | String | The image to use for yq |
version | String | The version of the image to use |
source | Directory ! | The source where yaml files are stored |
Example
dagger -m github.com/Dudesons/daggerverse/yq@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
--source DIR_PATH
func (m *myModule) example(source *Directory) *Yq {
return dag.
Yq(source)
}
@function
def example(source: dagger.Directory) -> dag.Yq:
return (
dag.yq(source)
)
@func()
example(source: Directory): Yq {
return dag
.yq(source)
}
Types
Yq 🔗
set() 🔗
Edit a yaml file following the given expression
Return Type
Yq !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
expr | String ! | - | The yq expression to execute |
yamlFilePath | String ! | - | The yaml file path to edit |
Example
dagger -m github.com/Dudesons/daggerverse/yq@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
--source DIR_PATH set --expr string --yaml-file-path string
func (m *myModule) example(source *Directory, expr string, yamlFilePath string) *Yq {
return dag.
Yq(source).
Set(expr, yamlFilePath)
}
@function
def example(source: dagger.Directory, expr: str, yaml_file_path: str) -> dag.Yq:
return (
dag.yq(source)
.set(expr, yaml_file_path)
)
@func()
example(source: Directory, expr: string, yamlFilePath: string): Yq {
return dag
.yq(source)
.set(expr, yamlFilePath)
}
get() 🔗
Fetch a value from a yaml file
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
expr | String ! | - | The yq expression to execute |
yamlFilePath | String ! | - | The yaml file path to read |
Example
dagger -m github.com/Dudesons/daggerverse/yq@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
--source DIR_PATH get --expr string --yaml-file-path string
func (m *myModule) example(ctx context.Context, source *Directory, expr string, yamlFilePath string) string {
return dag.
Yq(source).
Get(ctx, expr, yamlFilePath)
}
@function
async def example(source: dagger.Directory, expr: str, yaml_file_path: str) -> str:
return await (
dag.yq(source)
.get(expr, yaml_file_path)
)
@func()
async example(source: Directory, expr: string, yamlFilePath: string): Promise<string> {
return dag
.yq(source)
.get(expr, yamlFilePath)
}
withDirectory() 🔗
Override the source directory
Return Type
Yq !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | The source where yaml files are stored |
Example
dagger -m github.com/Dudesons/daggerverse/yq@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
--source DIR_PATH with-directory --source DIR_PATH
func (m *myModule) example(source *Directory, source1 *Directory) *Yq {
return dag.
Yq(source).
WithDirectory(source1)
}
@function
def example(source: dagger.Directory, source1: dagger.Directory) -> dag.Yq:
return (
dag.yq(source)
.with_directory(source1)
)
@func()
example(source: Directory, source1: Directory): Yq {
return dag
.yq(source)
.withDirectory(source1)
}
state() 🔗
Get the directory given to Yq
Return Type
Directory !
Example
dagger -m github.com/Dudesons/daggerverse/yq@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
--source DIR_PATH state
func (m *myModule) example(source *Directory) *Directory {
return dag.
Yq(source).
State()
}
@function
def example(source: dagger.Directory) -> dagger.Directory:
return (
dag.yq(source)
.state()
)
@func()
example(source: Directory): Directory {
return dag
.yq(source)
.state()
}
container() 🔗
Get the yq container
Return Type
Container !
Example
dagger -m github.com/Dudesons/daggerverse/yq@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
--source DIR_PATH container
func (m *myModule) example(source *Directory) *Container {
return dag.
Yq(source).
Container()
}
@function
def example(source: dagger.Directory) -> dagger.Container:
return (
dag.yq(source)
.container()
)
@func()
example(source: Directory): Container {
return dag
.yq(source)
.container()
}
shell() 🔗
Open a shell in the current container
Return Type
Container !
Example
dagger -m github.com/Dudesons/daggerverse/yq@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
--source DIR_PATH shell
func (m *myModule) example(source *Directory) *Container {
return dag.
Yq(source).
Shell()
}
@function
def example(source: dagger.Directory) -> dagger.Container:
return (
dag.yq(source)
.shell()
)
@func()
example(source: Directory): Container {
return dag
.yq(source)
.shell()
}