yq
Yq runtime
Installation
dagger install github.com/Dudesons/daggerverse/yq@v0.2.1Entrypoint
Return Type
Yq !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| image | String | "mikefarah/yq" | The image to use for yq | 
| version | String | "4.35.2" | 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_PATHfunc (m *MyModule) Example(source *dagger.Directory) *dagger.Yq  {
	return dag.
			Yq(source)
}@function
def example(source: dagger.Directory) -> dagger.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 stringfunc (m *MyModule) Example(source *dagger.Directory, expr string, yamlFilePath string) *dagger.Yq  {
	return dag.
			Yq(source).
			Set(expr, yamlFilePath)
}@function
def example(source: dagger.Directory, expr: str, yaml_file_path: str) -> dagger.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 stringfunc (m *MyModule) Example(ctx context.Context, source *dagger.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_PATHfunc (m *MyModule) Example(source *dagger.Directory, source1 *dagger.Directory) *dagger.Yq  {
	return dag.
			Yq(source).
			WithDirectory(source1)
}@function
def example(source: dagger.Directory, source1: dagger.Directory) -> dagger.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 statefunc (m *MyModule) Example(source *dagger.Directory) *dagger.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 containerfunc (m *MyModule) Example(source *dagger.Directory) *dagger.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 shellfunc (m *MyModule) Example(source *dagger.Directory) *dagger.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()
}