xcaddy
Build Caddy with plugins.
Installation
dagger install github.com/sagikazarmark/daggerverse/xcaddy@v0.6.0Entrypoint
Return Type
Xcaddy !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String | - | xcaddy version. |
| binary | File | - | xcaddy binary (takes precedence over version). |
| goVersion | String | - | Version (image tag) to use from the official image repository as a Go base container. |
| container | Container | - | Custom container to use as a base container. MUST include Go and any other dependencies required to build the project. Takes precedence over goVersion. |
Example
dagger -m github.com/sagikazarmark/daggerverse/xcaddy@ceffda4aebd349a24fc00e591b4ed9b801535b65 call \
func (m *MyModule) Example() *dagger.Xcaddy {
return dag.
Xcaddy()
}@function
def example() -> dagger.Xcaddy:
return (
dag.xcaddy()
)@func()
example(): Xcaddy {
return dag
.xcaddy()
}Types
Xcaddy 🔗
binary() 🔗
Xcaddy binary.
Return Type
File ! Example
dagger -m github.com/sagikazarmark/daggerverse/xcaddy@ceffda4aebd349a24fc00e591b4ed9b801535b65 call \
binaryfunc (m *MyModule) Example() *dagger.File {
return dag.
Xcaddy().
Binary()
}@function
def example() -> dagger.File:
return (
dag.xcaddy()
.binary()
)@func()
example(): File {
return dag
.xcaddy()
.binary()
}container() 🔗
Return Type
Container ! Example
dagger -m github.com/sagikazarmark/daggerverse/xcaddy@ceffda4aebd349a24fc00e591b4ed9b801535b65 call \
containerfunc (m *MyModule) Example() *dagger.Container {
return dag.
Xcaddy().
Container()
}@function
def example() -> dagger.Container:
return (
dag.xcaddy()
.container()
)@func()
example(): Container {
return dag
.xcaddy()
.container()
}build() 🔗
Build Caddy with plugins.
Return Type
Build !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String | - | Caddy version. |
| race | Boolean | - | Enables the Go race detector in the build. |
| debug | Boolean | - | Enables the DWARF debug information in the build. |
Example
dagger -m github.com/sagikazarmark/daggerverse/xcaddy@ceffda4aebd349a24fc00e591b4ed9b801535b65 call \
buildfunc (m *MyModule) Example() *dagger.XcaddyBuild {
return dag.
Xcaddy().
Build()
}@function
def example() -> dagger.XcaddyBuild:
return (
dag.xcaddy()
.build()
)@func()
example(): XcaddyBuild {
return dag
.xcaddy()
.build()
}Build 🔗
Build Caddy with plugins.
version() 🔗
Caddy version.
Return Type
String ! Example
dagger -m github.com/sagikazarmark/daggerverse/xcaddy@ceffda4aebd349a24fc00e591b4ed9b801535b65 call \
build \
versionfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Xcaddy().
Build().
Version(ctx)
}@function
async def example() -> str:
return await (
dag.xcaddy()
.build()
.version()
)@func()
async example(): Promise<string> {
return dag
.xcaddy()
.build()
.version()
}race() 🔗
Whether the Go race detector is enabled in the build.
Return Type
Boolean ! Example
dagger -m github.com/sagikazarmark/daggerverse/xcaddy@ceffda4aebd349a24fc00e591b4ed9b801535b65 call \
build \
racefunc (m *MyModule) Example(ctx context.Context) bool {
return dag.
Xcaddy().
Build().
Race(ctx)
}@function
async def example() -> bool:
return await (
dag.xcaddy()
.build()
.race()
)@func()
async example(): Promise<boolean> {
return dag
.xcaddy()
.build()
.race()
}debug() 🔗
Whether the DWARF debug information is enabled in the build.
Return Type
Boolean ! Example
dagger -m github.com/sagikazarmark/daggerverse/xcaddy@ceffda4aebd349a24fc00e591b4ed9b801535b65 call \
build \
debugfunc (m *MyModule) Example(ctx context.Context) bool {
return dag.
Xcaddy().
Build().
Debug(ctx)
}@function
async def example() -> bool:
return await (
dag.xcaddy()
.build()
.debug()
)@func()
async example(): Promise<boolean> {
return dag
.xcaddy()
.build()
.debug()
}plugins() 🔗
List of plugins to include.
Return Type
[GoModule ! ] ! Example
dagger -m github.com/sagikazarmark/daggerverse/xcaddy@ceffda4aebd349a24fc00e591b4ed9b801535b65 call \
build \
pluginsfunc (m *MyModule) Example() []*dagger.XcaddyGoModule {
return dag.
Xcaddy().
Build().
Plugins()
}@function
def example() -> List[dagger.XcaddyGoModule]:
return (
dag.xcaddy()
.build()
.plugins()
)@func()
example(): XcaddyGoModule[] {
return dag
.xcaddy()
.build()
.plugins()
}replacements() 🔗
List of modules to replace.
Return Type
[GoModule ! ] ! Example
dagger -m github.com/sagikazarmark/daggerverse/xcaddy@ceffda4aebd349a24fc00e591b4ed9b801535b65 call \
build \
replacementsfunc (m *MyModule) Example() []*dagger.XcaddyGoModule {
return dag.
Xcaddy().
Build().
Replacements()
}@function
def example() -> List[dagger.XcaddyGoModule]:
return (
dag.xcaddy()
.build()
.replacements()
)@func()
example(): XcaddyGoModule[] {
return dag
.xcaddy()
.build()
.replacements()
}embeds() 🔗
List of embedded directories.
Return Type
[Embed ! ] ! Example
dagger -m github.com/sagikazarmark/daggerverse/xcaddy@ceffda4aebd349a24fc00e591b4ed9b801535b65 call \
build \
embedsfunc (m *MyModule) Example() []*dagger.XcaddyEmbed {
return dag.
Xcaddy().
Build().
Embeds()
}@function
def example() -> List[dagger.XcaddyEmbed]:
return (
dag.xcaddy()
.build()
.embeds()
)@func()
example(): XcaddyEmbed[] {
return dag
.xcaddy()
.build()
.embeds()
}plugin() 🔗
Add plugins to the Caddy build.
Return Type
Build !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| module | String ! | - | Go module path. |
| version | String | - | Go module version. |
| replacement | Directory | - | Local replacement directory. |
Example
dagger -m github.com/sagikazarmark/daggerverse/xcaddy@ceffda4aebd349a24fc00e591b4ed9b801535b65 call \
build \
plugin --module stringfunc (m *MyModule) Example(module string) *dagger.XcaddyBuild {
return dag.
Xcaddy().
Build().
Plugin(module)
}@function
def example(module: str) -> dagger.XcaddyBuild:
return (
dag.xcaddy()
.build()
.plugin(module)
)@func()
example(module: string): XcaddyBuild {
return dag
.xcaddy()
.build()
.plugin(module)
}replace() 🔗
Replace Caddy dependencies.
Return Type
Build !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| module | String ! | - | Go module path. |
| version | String | - | Go module version. |
| replacement | Directory | - | Local replacement directory. |
Example
dagger -m github.com/sagikazarmark/daggerverse/xcaddy@ceffda4aebd349a24fc00e591b4ed9b801535b65 call \
build \
replace --module stringfunc (m *MyModule) Example(module string) *dagger.XcaddyBuild {
return dag.
Xcaddy().
Build().
Replace(module)
}@function
def example(module: str) -> dagger.XcaddyBuild:
return (
dag.xcaddy()
.build()
.replace(module)
)@func()
example(module: string): XcaddyBuild {
return dag
.xcaddy()
.build()
.replace(module)
}embed() 🔗
Embed a directory in the Caddy binary.
Return Type
Build !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| alias | String ! | - | Name of the embedded directory. |
| directory | Directory ! | - | Directory to embed in the binary. |
Example
dagger -m github.com/sagikazarmark/daggerverse/xcaddy@ceffda4aebd349a24fc00e591b4ed9b801535b65 call \
build \
embed --alias string --directory DIR_PATHfunc (m *MyModule) Example(alias string, directory *dagger.Directory) *dagger.XcaddyBuild {
return dag.
Xcaddy().
Build().
Embed(alias, directory)
}@function
def example(alias: str, directory: dagger.Directory) -> dagger.XcaddyBuild:
return (
dag.xcaddy()
.build()
.embed(alias, directory)
)@func()
example(alias: string, directory: Directory): XcaddyBuild {
return dag
.xcaddy()
.build()
.embed(alias, directory)
}binary() 🔗
Return a Caddy binary.
Return Type
File !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| platform | Scalar | - | Target platform in "[os]/[platform]/[version]" format (e.g., "darwin/arm64/v7", "windows/amd64", "linux/arm64"). |
Example
dagger -m github.com/sagikazarmark/daggerverse/xcaddy@ceffda4aebd349a24fc00e591b4ed9b801535b65 call \
build \
binaryfunc (m *MyModule) Example() *dagger.File {
return dag.
Xcaddy().
Build().
Binary()
}@function
def example() -> dagger.File:
return (
dag.xcaddy()
.build()
.binary()
)@func()
example(): File {
return dag
.xcaddy()
.build()
.binary()
}container() 🔗
Return a Caddy container.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| base | Container | - | Use the specified base image (takes precedence over platform). |
| platform | Scalar | - | Target platform in "[os]/[platform]/[version]" format (e.g., "darwin/arm64/v7", "windows/amd64", "linux/arm64"). |
Example
dagger -m github.com/sagikazarmark/daggerverse/xcaddy@ceffda4aebd349a24fc00e591b4ed9b801535b65 call \
build \
containerfunc (m *MyModule) Example() *dagger.Container {
return dag.
Xcaddy().
Build().
Container()
}@function
def example() -> dagger.Container:
return (
dag.xcaddy()
.build()
.container()
)@func()
example(): Container {
return dag
.xcaddy()
.build()
.container()
}inspect() 🔗
Open a terminal to inspect the build files.
Return Type
Container ! Example
dagger -m github.com/sagikazarmark/daggerverse/xcaddy@ceffda4aebd349a24fc00e591b4ed9b801535b65 call \
build \
inspectfunc (m *MyModule) Example() *dagger.Container {
return dag.
Xcaddy().
Build().
Inspect()
}@function
def example() -> dagger.Container:
return (
dag.xcaddy()
.build()
.inspect()
)@func()
example(): Container {
return dag
.xcaddy()
.build()
.inspect()
}GoModule 🔗
path() 🔗
Go module path.
Return Type
String ! Example
Function XcaddyGoModule.path is not accessible from the xcaddy moduleFunction XcaddyGoModule.path is not accessible from the xcaddy moduleFunction XcaddyGoModule.path is not accessible from the xcaddy moduleFunction XcaddyGoModule.path is not accessible from the xcaddy moduleversion() 🔗
Go module version (optional).
Return Type
String ! Example
Function XcaddyGoModule.version is not accessible from the xcaddy moduleFunction XcaddyGoModule.version is not accessible from the xcaddy moduleFunction XcaddyGoModule.version is not accessible from the xcaddy moduleFunction XcaddyGoModule.version is not accessible from the xcaddy modulereplacement() 🔗
Local replacement directory (optional).
Return Type
Directory ! Example
Function XcaddyGoModule.replacement is not accessible from the xcaddy moduleFunction XcaddyGoModule.replacement is not accessible from the xcaddy moduleFunction XcaddyGoModule.replacement is not accessible from the xcaddy moduleFunction XcaddyGoModule.replacement is not accessible from the xcaddy moduleEmbed 🔗
alias() 🔗
Name of the embedded directory.
Return Type
String ! Example
Function XcaddyEmbed.alias is not accessible from the xcaddy moduleFunction XcaddyEmbed.alias is not accessible from the xcaddy moduleFunction XcaddyEmbed.alias is not accessible from the xcaddy moduleFunction XcaddyEmbed.alias is not accessible from the xcaddy moduledirectory() 🔗
Directory to embed in the binary.
Return Type
Directory ! Example
Function XcaddyEmbed.directory is not accessible from the xcaddy moduleFunction XcaddyEmbed.directory is not accessible from the xcaddy moduleFunction XcaddyEmbed.directory is not accessible from the xcaddy moduleFunction XcaddyEmbed.directory is not accessible from the xcaddy module