apache-avro-tools
This module provides a set of functions to work with Apache Avro Tools.Shorthand avro tools functions provided by this module are:
- `idl2schemata`: a helper function to Convert an Avro IDL file to Avro schema files in the provided directory
- `idl`: a helper function to Convert an Avro IDL file to an Avro schema file
For more advanced usage, you can use the avro-tools function to get a container with Apache Avro Tools installed.
- `avro-tools`: Get a container with Apache Avro Tools installed for running other functions
Example:
dagger call --version=1.11.3 avro-tools with-file --path /app/file --source .vro-file.avdl with-exec --args idl,/app/file,/output file --path /output contents
Installation
dagger install github.com/pjmagee/dagger-apache-avro-tools@v0.1.0
Entrypoint
Return Type
ApacheAvroTools !
Arguments
Name | Type | Description |
---|---|---|
version | String ! | The version of Apache Avro Tools to use, retrieved from Maven |
Example
dagger -m github.com/pjmagee/dagger-apache-avro-tools@859483b4acbc17423f6ca56f1f179fa2232c458c call \
--version string
func (m *myModule) example(version string) *ApacheAvroTools {
return dag.
ApacheAvroTools(version)
}
@function
def example(version: str) -> dag.ApacheAvroTools:
return (
dag.apache_avro_tools(version)
)
@func()
example(version: string): ApacheAvroTools {
return dag
.apacheAvroTools(version)
}
Types
ApacheAvroTools 🔗
A module for Apache Avro Tools
idl2Schemata() 🔗
Convert an Avro IDL file to Avro schema files in the provided directory
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
file | File ! | - | The Avro IDL file to convert to Avro schema files |
Example
dagger -m github.com/pjmagee/dagger-apache-avro-tools@859483b4acbc17423f6ca56f1f179fa2232c458c call \
--version string idl-2-schemata --file file:path
func (m *myModule) example(version string, file *File) *Directory {
return dag.
ApacheAvroTools(version).
Idl2Schemata(file)
}
@function
def example(version: str, file: dagger.File) -> dagger.Directory:
return (
dag.apache_avro_tools(version)
.idl2_schemata(file)
)
@func()
example(version: string, file: File): Directory {
return dag
.apacheAvroTools(version)
.idl2Schemata(file)
}
idl() 🔗
Convert an Avro IDL file to Avro schema file
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
file | File ! | - | The Avro IDL file to convert |
Example
dagger -m github.com/pjmagee/dagger-apache-avro-tools@859483b4acbc17423f6ca56f1f179fa2232c458c call \
--version string idl --file file:path
func (m *myModule) example(version string, file *File) *File {
return dag.
ApacheAvroTools(version).
Idl(file)
}
@function
def example(version: str, file: dagger.File) -> dagger.File:
return (
dag.apache_avro_tools(version)
.idl(file)
)
@func()
example(version: string, file: File): File {
return dag
.apacheAvroTools(version)
.idl(file)
}
avroTools() 🔗
Get a container with Apache Avro Tools installed
Return Type
Container !
Example
dagger -m github.com/pjmagee/dagger-apache-avro-tools@859483b4acbc17423f6ca56f1f179fa2232c458c call \
--version string avro-tools
func (m *myModule) example(version string) *Container {
return dag.
ApacheAvroTools(version).
AvroTools()
}
@function
def example(version: str) -> dagger.Container:
return (
dag.apache_avro_tools(version)
.avro_tools()
)
@func()
example(version: string): Container {
return dag
.apacheAvroTools(version)
.avroTools()
}