cue-schemas
A module for vendoring, publishing and exporting CUE schemas
Installation
dagger install github.com/piwaka/daggerverse/cue-schemas@1a458a05916ba5bd428e13093a8c46c01c8a76d3Entrypoint
Return Type
CueSchemas !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| cueVersion | String | "latest" | the cue version to use |
| timoniVersion | String | "latest" | the timoni version to use |
| golangImage | String | "golang:latest" | the golang image to use |
Example
dagger -m github.com/piwaka/daggerverse/cue-schemas@1a458a05916ba5bd428e13093a8c46c01c8a76d3 call \
func (m *MyModule) Example() *dagger.CueSchemas {
return dag.
CueSchemas()
}@function
def example() -> dagger.CueSchemas:
return (
dag.cue_schemas()
)@func()
example(): CueSchemas {
return dag
.cueSchemas()
}Types
CueSchemas 🔗
container() 🔗
container with the cue and timoni binaries
Return Type
Container ! Example
dagger -m github.com/piwaka/daggerverse/cue-schemas@1a458a05916ba5bd428e13093a8c46c01c8a76d3 call \
containerfunc (m *MyModule) Example() *dagger.Container {
return dag.
CueSchemas().
Container()
}@function
def example() -> dagger.Container:
return (
dag.cue_schemas()
.container()
)@func()
example(): Container {
return dag
.cueSchemas()
.container()
}vendorKubernetes() 🔗
vendor kubernetes api schemas
Return Type
CueSchemasVendoredSchema !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String ! | - | the kubernetes version to vendor |
Example
dagger -m github.com/piwaka/daggerverse/cue-schemas@1a458a05916ba5bd428e13093a8c46c01c8a76d3 call \
vendor-kubernetes --version stringfunc (m *MyModule) Example(version string) *dagger.CueSchemasVendoredSchema {
return dag.
CueSchemas().
VendorKubernetes(version)
}@function
def example(version: str) -> dagger.CueSchemasVendoredSchema:
return (
dag.cue_schemas()
.vendor_kubernetes(version)
)@func()
example(version: string): CueSchemasVendoredSchema {
return dag
.cueSchemas()
.vendorKubernetes(version)
}vendorTimoni() 🔗
vendor timoni schemas for the current version
Return Type
CueSchemasVendoredSchema ! Example
dagger -m github.com/piwaka/daggerverse/cue-schemas@1a458a05916ba5bd428e13093a8c46c01c8a76d3 call \
vendor-timonifunc (m *MyModule) Example() *dagger.CueSchemasVendoredSchema {
return dag.
CueSchemas().
VendorTimoni()
}@function
def example() -> dagger.CueSchemasVendoredSchema:
return (
dag.cue_schemas()
.vendor_timoni()
)@func()
example(): CueSchemasVendoredSchema {
return dag
.cueSchemas()
.vendorTimoni()
}vendorGithub() 🔗
vendor kubernetes crd schemas from github
Return Type
[CueSchemasVendoredSchema ! ] !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| tag | String ! | - | the desired tag |
| ref | String | - | the github ref |
| owner | String ! | - | the github owner |
| repo | String ! | - | the github repo |
| file | [String ! ] | - | the repo files to vendor |
| dir | [String ! ] | - | the repo directories to vendor |
| asset | [String ! ] | - | the repo release assets to vendor |
Example
dagger -m github.com/piwaka/daggerverse/cue-schemas@1a458a05916ba5bd428e13093a8c46c01c8a76d3 call \
vendor-github --tag string --owner string --repo stringfunc (m *MyModule) Example(tag string, owner string, repo string) []*dagger.CueSchemasVendoredSchema {
return dag.
CueSchemas().
VendorGithub(tag, owner, repo)
}@function
def example(tag: str, owner: str, repo: str) -> List[dagger.CueSchemasVendoredSchema]:
return (
dag.cue_schemas()
.vendor_github(tag, owner, repo)
)@func()
example(tag: string, owner: string, repo: string): CueSchemasVendoredSchema[] {
return dag
.cueSchemas()
.vendorGithub(tag, owner, repo)
}validate() 🔗
validate a sources.yaml file
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| file | File ! | - | path to the sources.yaml file |
Example
dagger -m github.com/piwaka/daggerverse/cue-schemas@1a458a05916ba5bd428e13093a8c46c01c8a76d3 call \
validate --file file:pathfunc (m *MyModule) Example(ctx context.Context, file *dagger.File) {
return dag.
CueSchemas().
Validate(ctx, file)
}@function
async def example(file: dagger.File) -> None:
return await (
dag.cue_schemas()
.validate(file)
)@func()
async example(file: File): Promise<void> {
return dag
.cueSchemas()
.validate(file)
}vendor() 🔗
vendor schemas from a sources.yaml file
Return Type
[CueSchemasVendoredSchema ! ] !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| file | File ! | - | path to the sources.yaml file |
Example
dagger -m github.com/piwaka/daggerverse/cue-schemas@1a458a05916ba5bd428e13093a8c46c01c8a76d3 call \
vendor --file file:pathfunc (m *MyModule) Example(file *dagger.File) []*dagger.CueSchemasVendoredSchema {
return dag.
CueSchemas().
Vendor(file)
}@function
def example(file: dagger.File) -> List[dagger.CueSchemasVendoredSchema]:
return (
dag.cue_schemas()
.vendor(file)
)@func()
example(file: File): CueSchemasVendoredSchema[] {
return dag
.cueSchemas()
.vendor(file)
}publish() 🔗
publish schemas from a source.yaml file to the central registry
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| file | File ! | - | path to the sources.yaml file |
| owner | String ! | - | the registry owner |
| repo | String ! | - | the registry repo |
| token | Secret ! | - | the registry token |
Example
dagger -m github.com/piwaka/daggerverse/cue-schemas@1a458a05916ba5bd428e13093a8c46c01c8a76d3 call \
publish --file file:path --owner string --repo string --token env:MYSECRETfunc (m *MyModule) Example(ctx context.Context, file *dagger.File, owner string, repo string, token *dagger.Secret) string {
return dag.
CueSchemas().
Publish(ctx, file, owner, repo, token)
}@function
async def example(file: dagger.File, owner: str, repo: str, token: dagger.Secret) -> str:
return await (
dag.cue_schemas()
.publish(file, owner, repo, token)
)@func()
async example(file: File, owner: string, repo: string, token: Secret): Promise<string> {
return dag
.cueSchemas()
.publish(file, owner, repo, token)
}exportGithub() 🔗
export kubernetes crd schemas from github
Return Type
File !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ref | String ! | - | the github ref |
| owner | String ! | - | the github owner |
| repo | String ! | - | the github repo |
| file | [String ! ] | - | the repo files to vendor |
| dir | [String ! ] | - | the repo directories to vendor |
| asset | [String ! ] | - | the repo release assets to vendor |
Example
dagger -m github.com/piwaka/daggerverse/cue-schemas@1a458a05916ba5bd428e13093a8c46c01c8a76d3 call \
export-github --ref string --owner string --repo stringfunc (m *MyModule) Example(ref string, owner string, repo string) *dagger.File {
return dag.
CueSchemas().
ExportGithub(ref, owner, repo)
}@function
def example(ref: str, owner: str, repo: str) -> dagger.File:
return (
dag.cue_schemas()
.export_github(ref, owner, repo)
)@func()
example(ref: string, owner: string, repo: string): File {
return dag
.cueSchemas()
.exportGithub(ref, owner, repo)
}export() 🔗
export kubernetes crds from a sources.yaml file
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| file | File ! | - | path to the sources.yaml file |
Example
dagger -m github.com/piwaka/daggerverse/cue-schemas@1a458a05916ba5bd428e13093a8c46c01c8a76d3 call \
export --file file:pathfunc (m *MyModule) Example(file *dagger.File) *dagger.Directory {
return dag.
CueSchemas().
Export(file)
}@function
def example(file: dagger.File) -> dagger.Directory:
return (
dag.cue_schemas()
.export(file)
)@func()
example(file: File): Directory {
return dag
.cueSchemas()
.export(file)
}CueSchemasVendoredSchema 🔗
name() 🔗
the name of the module
Return Type
String ! Example
dagger -m github.com/piwaka/daggerverse/cue-schemas@1a458a05916ba5bd428e13093a8c46c01c8a76d3 call \
vendor-timoni \
namefunc (m *MyModule) Example(ctx context.Context) string {
return dag.
CueSchemas().
VendorTimoni().
Name(ctx)
}@function
async def example() -> str:
return await (
dag.cue_schemas()
.vendor_timoni()
.name()
)@func()
async example(): Promise<string> {
return dag
.cueSchemas()
.vendorTimoni()
.name()
}version() 🔗
the module version
Return Type
String ! Example
dagger -m github.com/piwaka/daggerverse/cue-schemas@1a458a05916ba5bd428e13093a8c46c01c8a76d3 call \
vendor-timoni \
versionfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
CueSchemas().
VendorTimoni().
Version(ctx)
}@function
async def example() -> str:
return await (
dag.cue_schemas()
.vendor_timoni()
.version()
)@func()
async example(): Promise<string> {
return dag
.cueSchemas()
.vendorTimoni()
.version()
}directory() 🔗
the module directory
Return Type
Directory ! Example
dagger -m github.com/piwaka/daggerverse/cue-schemas@1a458a05916ba5bd428e13093a8c46c01c8a76d3 call \
vendor-timoni \
directoryfunc (m *MyModule) Example() *dagger.Directory {
return dag.
CueSchemas().
VendorTimoni().
Directory()
}@function
def example() -> dagger.Directory:
return (
dag.cue_schemas()
.vendor_timoni()
.directory()
)@func()
example(): Directory {
return dag
.cueSchemas()
.vendorTimoni()
.directory()
}