xcaddy
Build Caddy with plugins.
Installation
dagger install github.com/jedevc/daggerverse-sagikazarmark/xcaddy@a104424df38ca8b0b758f699dcfeeb0c2210cc2e
Entrypoint
Return Type
Xcaddy !
Arguments
Name | Type | 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/jedevc/daggerverse-sagikazarmark/xcaddy@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
func (m *myModule) example() *Xcaddy {
return dag.
Xcaddy()
}
@function
def example() -> dag.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/jedevc/daggerverse-sagikazarmark/xcaddy@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
build
func (m *myModule) example() *XcaddyBuild {
return dag.
Xcaddy().
Build()
}
@function
def example() -> dag.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/jedevc/daggerverse-sagikazarmark/xcaddy@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
build \
version
func (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/jedevc/daggerverse-sagikazarmark/xcaddy@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
build \
race
func (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/jedevc/daggerverse-sagikazarmark/xcaddy@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
build \
debug
func (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/jedevc/daggerverse-sagikazarmark/xcaddy@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
build \
plugins
func (m *myModule) example() []*XcaddyGoModule {
return dag.
Xcaddy().
Build().
Plugins()
}
@function
def example() -> List[dag.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/jedevc/daggerverse-sagikazarmark/xcaddy@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
build \
replacements
func (m *myModule) example() []*XcaddyGoModule {
return dag.
Xcaddy().
Build().
Replacements()
}
@function
def example() -> List[dag.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/jedevc/daggerverse-sagikazarmark/xcaddy@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
build \
embeds
func (m *myModule) example() []*XcaddyEmbed {
return dag.
Xcaddy().
Build().
Embeds()
}
@function
def example() -> List[dag.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/jedevc/daggerverse-sagikazarmark/xcaddy@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
build \
plugin --module string
func (m *myModule) example(module string) *XcaddyBuild {
return dag.
Xcaddy().
Build().
Plugin(module)
}
@function
def example(module: str) -> dag.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/jedevc/daggerverse-sagikazarmark/xcaddy@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
build \
replace --module string
func (m *myModule) example(module string) *XcaddyBuild {
return dag.
Xcaddy().
Build().
Replace(module)
}
@function
def example(module: str) -> dag.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/jedevc/daggerverse-sagikazarmark/xcaddy@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
build \
embed --alias string --directory DIR_PATH
func (m *myModule) example(alias string, directory *Directory) *XcaddyBuild {
return dag.
Xcaddy().
Build().
Embed(alias, directory)
}
@function
def example(alias: str, directory: dagger.Directory) -> dag.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/jedevc/daggerverse-sagikazarmark/xcaddy@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
build \
binary
func (m *myModule) example() *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/jedevc/daggerverse-sagikazarmark/xcaddy@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
build \
container
func (m *myModule) example() *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/jedevc/daggerverse-sagikazarmark/xcaddy@a104424df38ca8b0b758f699dcfeeb0c2210cc2e call \
build \
inspect
func (m *myModule) example() *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 module
Function XcaddyGoModule.path is not accessible from the xcaddy module
Function XcaddyGoModule.path is not accessible from the xcaddy module
Function XcaddyGoModule.path is not accessible from the xcaddy module
version() 🔗
Go module version (optional).
Return Type
String !
Example
Function XcaddyGoModule.version is not accessible from the xcaddy module
Function XcaddyGoModule.version is not accessible from the xcaddy module
Function XcaddyGoModule.version is not accessible from the xcaddy module
Function XcaddyGoModule.version is not accessible from the xcaddy module
replacement() 🔗
Local replacement directory (optional).
Return Type
Directory !
Example
Function XcaddyGoModule.replacement is not accessible from the xcaddy module
Function XcaddyGoModule.replacement is not accessible from the xcaddy module
Function XcaddyGoModule.replacement is not accessible from the xcaddy module
Function XcaddyGoModule.replacement is not accessible from the xcaddy module
Embed 🔗
alias() 🔗
Name of the embedded directory.
Return Type
String !
Example
Function XcaddyEmbed.alias is not accessible from the xcaddy module
Function XcaddyEmbed.alias is not accessible from the xcaddy module
Function XcaddyEmbed.alias is not accessible from the xcaddy module
Function XcaddyEmbed.alias is not accessible from the xcaddy module
directory() 🔗
Directory to embed in the binary.
Return Type
Directory !
Example
Function XcaddyEmbed.directory is not accessible from the xcaddy module
Function XcaddyEmbed.directory is not accessible from the xcaddy module
Function XcaddyEmbed.directory is not accessible from the xcaddy module
Function XcaddyEmbed.directory is not accessible from the xcaddy module