wonderland
This module has been generated via dagger init and serves as a reference tobasic module structure as you get started with Dagger.
Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.
The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.
Installation
dagger install github.com/thetechcollective/tt-wonderland@f7308a74d8c70ea685fd9d7cdb56140fb3cdd317Entrypoint
Return Type
Wonderland ! Example
dagger -m github.com/thetechcollective/tt-wonderland@f7308a74d8c70ea685fd9d7cdb56140fb3cdd317 call \
func (m *MyModule) Example() *dagger.Wonderland {
return dag.
Wonderland()
}@function
def example() -> dagger.Wonderland:
return (
dag.wonderland()
)@func()
example(): Wonderland {
return dag
.wonderland()
}Types
Wonderland 🔗
containerEcho() 🔗
Returns a container that echoes whatever string argument is provided
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| stringArg | String ! | - | No description provided |
Example
dagger -m github.com/thetechcollective/tt-wonderland@f7308a74d8c70ea685fd9d7cdb56140fb3cdd317 call \
container-echo --string-arg stringfunc (m *MyModule) Example(stringArg string) *dagger.Container {
return dag.
Wonderland().
ContainerEcho(stringArg)
}@function
def example(string_arg: str) -> dagger.Container:
return (
dag.wonderland()
.container_echo(string_arg)
)@func()
example(stringArg: string): Container {
return dag
.wonderland()
.containerEcho(stringArg)
}getGithubWorkflows() 🔗
Get all GitHub workflow files
Return Type
Directory ! Example
dagger -m github.com/thetechcollective/tt-wonderland@f7308a74d8c70ea685fd9d7cdb56140fb3cdd317 call \
get-github-workflowsfunc (m *MyModule) Example() *dagger.Directory {
return dag.
Wonderland().
GetGithubWorkflows()
}@function
def example() -> dagger.Directory:
return (
dag.wonderland()
.get_github_workflows()
)@func()
example(): Directory {
return dag
.wonderland()
.getGithubWorkflows()
}getPreCommitHook() 🔗
Get the pre-commit hook file
Return Type
File ! Example
dagger -m github.com/thetechcollective/tt-wonderland@f7308a74d8c70ea685fd9d7cdb56140fb3cdd317 call \
get-pre-commit-hookfunc (m *MyModule) Example() *dagger.File {
return dag.
Wonderland().
GetPreCommitHook()
}@function
def example() -> dagger.File:
return (
dag.wonderland()
.get_pre_commit_hook()
)@func()
example(): File {
return dag
.wonderland()
.getPreCommitHook()
}grepDir() 🔗
Returns lines that match a pattern in the files of the provided Directory
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| directoryArg | Directory ! | - | A directory. |
| pattern | String ! | - | No description provided |
Example
dagger -m github.com/thetechcollective/tt-wonderland@f7308a74d8c70ea685fd9d7cdb56140fb3cdd317 call \
grep-dir --directory-arg DIR_PATH --pattern stringfunc (m *MyModule) Example(ctx context.Context, directoryArg *dagger.Directory, pattern string) string {
return dag.
Wonderland().
GrepDir(ctx, directoryArg, pattern)
}@function
async def example(directory_arg: dagger.Directory, pattern: str) -> str:
return await (
dag.wonderland()
.grep_dir(directory_arg, pattern)
)@func()
async example(directoryArg: Directory, pattern: string): Promise<string> {
return dag
.wonderland()
.grepDir(directoryArg, pattern)
}installGithooks() 🔗
Install githooks into target repository
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| targetRepo | Directory ! | - | A directory. |
Example
dagger -m github.com/thetechcollective/tt-wonderland@f7308a74d8c70ea685fd9d7cdb56140fb3cdd317 call \
install-githooks --target-repo DIR_PATHfunc (m *MyModule) Example(targetRepo *dagger.Directory) *dagger.Directory {
return dag.
Wonderland().
InstallGithooks(targetRepo)
}@function
def example(target_repo: dagger.Directory) -> dagger.Directory:
return (
dag.wonderland()
.install_githooks(target_repo)
)@func()
example(targetRepo: Directory): Directory {
return dag
.wonderland()
.installGithooks(targetRepo)
}