xcaddy
Build Caddy with plugins.
Installation
dagger install github.com/luanmtruong/daggerverse/xcaddy@96c13b929c636316317f745ff36cda4e4c66f680Entrypoint
Return Type
Xcaddy !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String | - | xcaddy version. |
| container | Container | - | Custom container to use as an xcaddy (and Go) base container. |
| goVersion | String | - | Version (image tag) to use from the official image repository as a Go base container. |
| goContainer | Container | - | Custom container to use as a Go base container. |
Example
dagger -m github.com/luanmtruong/daggerverse/xcaddy@96c13b929c636316317f745ff36cda4e4c66f680 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 🔗
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/luanmtruong/daggerverse/xcaddy@96c13b929c636316317f745ff36cda4e4c66f680 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/luanmtruong/daggerverse/xcaddy@96c13b929c636316317f745ff36cda4e4c66f680 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/luanmtruong/daggerverse/xcaddy@96c13b929c636316317f745ff36cda4e4c66f680 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/luanmtruong/daggerverse/xcaddy@96c13b929c636316317f745ff36cda4e4c66f680 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/luanmtruong/daggerverse/xcaddy@96c13b929c636316317f745ff36cda4e4c66f680 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/luanmtruong/daggerverse/xcaddy@96c13b929c636316317f745ff36cda4e4c66f680 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/luanmtruong/daggerverse/xcaddy@96c13b929c636316317f745ff36cda4e4c66f680 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/luanmtruong/daggerverse/xcaddy@96c13b929c636316317f745ff36cda4e4c66f680 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/luanmtruong/daggerverse/xcaddy@96c13b929c636316317f745ff36cda4e4c66f680 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/luanmtruong/daggerverse/xcaddy@96c13b929c636316317f745ff36cda4e4c66f680 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/luanmtruong/daggerverse/xcaddy@96c13b929c636316317f745ff36cda4e4c66f680 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 | String | "caddy" | Use the specified base image. |
| platform | Scalar | - | Target platform in "[os]/[platform]/[version]" format (e.g., "darwin/arm64/v7", "windows/amd64", "linux/arm64"). |
Example
dagger -m github.com/luanmtruong/daggerverse/xcaddy@96c13b929c636316317f745ff36cda4e4c66f680 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/luanmtruong/daggerverse/xcaddy@96c13b929c636316317f745ff36cda4e4c66f680 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