cue-schemas
A module for vendoring, publishing and exporting CUE schemas
Installation
dagger install github.com/piwaka/daggerverse/cue-schemas@e4c7193527d0a662cd83d25be609eb961c2c6bdc
Entrypoint
Return Type
CueSchemas !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
cueVersion | String | "v0.11.0" | the cue version to use |
timoniVersion | String | "v0.23.0" | the timoni version to use |
golangImage | String | "golang:latest" | the golang image to use |
Example
dagger -m github.com/piwaka/daggerverse/cue-schemas@e4c7193527d0a662cd83d25be609eb961c2c6bdc call \
func (m *myModule) example() *CueSchemas {
return dag.
CueSchemas()
}
@function
def example() -> dag.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@e4c7193527d0a662cd83d25be609eb961c2c6bdc call \
container
func (m *myModule) example() *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@e4c7193527d0a662cd83d25be609eb961c2c6bdc call \
vendor-kubernetes --version string
func (m *myModule) example(version string) *CueSchemasVendoredSchema {
return dag.
CueSchemas().
VendorKubernetes(version)
}
@function
def example(version: str) -> dag.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@e4c7193527d0a662cd83d25be609eb961c2c6bdc call \
vendor-timoni
func (m *myModule) example() *CueSchemasVendoredSchema {
return dag.
CueSchemas().
VendorTimoni()
}
@function
def example() -> dag.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@e4c7193527d0a662cd83d25be609eb961c2c6bdc call \
vendor-github --tag string --owner string --repo string
func (m *myModule) example(tag string, owner string, repo string) []*CueSchemasVendoredSchema {
return dag.
CueSchemas().
VendorGithub(tag, owner, repo)
}
@function
def example(tag: str, owner: str, repo: str) -> List[dag.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@e4c7193527d0a662cd83d25be609eb961c2c6bdc call \
validate --file file:path
func (m *myModule) example(ctx context.Context, file *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@e4c7193527d0a662cd83d25be609eb961c2c6bdc call \
vendor --file file:path
func (m *myModule) example(file *File) []*CueSchemasVendoredSchema {
return dag.
CueSchemas().
Vendor(file)
}
@function
def example(file: dagger.File) -> List[dag.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@e4c7193527d0a662cd83d25be609eb961c2c6bdc call \
publish --file file:path --owner string --repo string --token env:MYSECRET
func (m *myModule) example(ctx context.Context, file *File, owner string, repo string, token *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@e4c7193527d0a662cd83d25be609eb961c2c6bdc call \
export-github --ref string --owner string --repo string
func (m *myModule) example(ref string, owner string, repo string) *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@e4c7193527d0a662cd83d25be609eb961c2c6bdc call \
export --file file:path
func (m *myModule) example(file *File) *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@e4c7193527d0a662cd83d25be609eb961c2c6bdc call \
vendor-timoni \
name
func (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@e4c7193527d0a662cd83d25be609eb961c2c6bdc call \
vendor-timoni \
version
func (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@e4c7193527d0a662cd83d25be609eb961c2c6bdc call \
vendor-timoni \
directory
func (m *myModule) example() *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()
}