homerun
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/stuttgart-things/dagger/homerun@v0.41.0Entrypoint
Return Type
Homerun Example
dagger -m github.com/stuttgart-things/dagger/homerun@c79ba0317b1eb851acadc4c9cf9eac839c9692b1 call \
func (m *MyModule) Example() *dagger.Homerun {
return dag.
Homerun()
}@function
def example() -> dagger.Homerun:
return (
dag.homerun()
)@func()
example(): Homerun {
return dag
.homerun()
}Types
Homerun 🔗
redisService() 🔗
RedisService creates a Redis service with optional password protection
Returns a Redis service that can be bound to other containers for testing
Return Type
Service !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String | "7.2.0-v18" | No description provided |
| password | String | - | No description provided |
Example
dagger -m github.com/stuttgart-things/dagger/homerun@c79ba0317b1eb851acadc4c9cf9eac839c9692b1 call \
redis-servicefunc (m *MyModule) Example() *dagger.Service {
return dag.
Homerun().
RedisService()
}@function
def example() -> dagger.Service:
return (
dag.homerun()
.redis_service()
)@func()
example(): Service {
return dag
.homerun()
.redisService()
}generatePassword() 🔗
GeneratePassword generates a random password of specified length
Useful for creating secure passwords for Redis or other services
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| length | Integer | 16 | No description provided |
Example
dagger -m github.com/stuttgart-things/dagger/homerun@c79ba0317b1eb851acadc4c9cf9eac839c9692b1 call \
generate-passwordfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Homerun().
GeneratePassword(ctx)
}@function
async def example() -> str:
return await (
dag.homerun()
.generate_password()
)@func()
async example(): Promise<string> {
return dag
.homerun()
.generatePassword()
}runRedis() 🔗
RunRedis starts a Redis service that can be accessed with ‘dagger up’
Example: dagger call -m homerun run-redis –port 6379 –password “mypass” up
Return Type
Service !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String | "7.2.0-v18" | No description provided |
| port | Integer | 6379 | No description provided |
| password | String | - | No description provided |
Example
dagger -m github.com/stuttgart-things/dagger/homerun@c79ba0317b1eb851acadc4c9cf9eac839c9692b1 call \
run-redisfunc (m *MyModule) Example() *dagger.Service {
return dag.
Homerun().
RunRedis()
}@function
def example() -> dagger.Service:
return (
dag.homerun()
.run_redis()
)@func()
example(): Service {
return dag
.homerun()
.runRedis()
}redisCli() 🔗
RedisCli opens an interactive redis-cli shell connected to a Redis service
This is useful for debugging and manual interaction with Redis
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String | "7.2.0-v18" | No description provided |
| password | String | - | No description provided |
Example
dagger -m github.com/stuttgart-things/dagger/homerun@c79ba0317b1eb851acadc4c9cf9eac839c9692b1 call \
redis-clifunc (m *MyModule) Example() *dagger.Container {
return dag.
Homerun().
RedisCli()
}@function
def example() -> dagger.Container:
return (
dag.homerun()
.redis_cli()
)@func()
example(): Container {
return dag
.homerun()
.redisCli()
}testRedisConnection() 🔗
TestRedisConnection tests if Redis service is reachable and working
This is useful to verify the Redis service is up and accessible from the CLI
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String | "7.2.0-v18" | No description provided |
| password | String | - | No description provided |
Example
dagger -m github.com/stuttgart-things/dagger/homerun@c79ba0317b1eb851acadc4c9cf9eac839c9692b1 call \
test-redis-connectionfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Homerun().
TestRedisConnection(ctx)
}@function
async def example() -> str:
return await (
dag.homerun()
.test_redis_connection()
)@func()
async example(): Promise<string> {
return dag
.homerun()
.testRedisConnection()
}runTestWithRedis() 🔗
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | No description provided |
| goVersion | String | "1.25.4" | No description provided |
| redisVersion | String | "7.2.0-v18" | No description provided |
| testPath | String ! | - | No description provided |
Example
dagger -m github.com/stuttgart-things/dagger/homerun@c79ba0317b1eb851acadc4c9cf9eac839c9692b1 call \
run-test-with-redis --source DIR_PATH --test-path stringfunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory, testPath string) string {
return dag.
Homerun().
RunTestWithRedis(ctx, source, testPath)
}@function
async def example(source: dagger.Directory, test_path: str) -> str:
return await (
dag.homerun()
.run_test_with_redis(source, test_path)
)@func()
async example(source: Directory, testPath: string): Promise<string> {
return dag
.homerun()
.runTestWithRedis(source, testPath)
}