Dagger
Search

homerun

This module has been generated via dagger init and serves as a reference to
basic 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.42.0

Entrypoint

Return Type
Homerun
Example
dagger -m github.com/stuttgart-things/dagger/homerun@0d3c8e57dde6e4527287b81f28ce6e920768499a 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
NameTypeDefault ValueDescription
versionString "7.2.0-v18"No description provided
passwordString -No description provided
Example
dagger -m github.com/stuttgart-things/dagger/homerun@0d3c8e57dde6e4527287b81f28ce6e920768499a call \
 redis-service
func (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
NameTypeDefault ValueDescription
lengthInteger 16No description provided
Example
dagger -m github.com/stuttgart-things/dagger/homerun@0d3c8e57dde6e4527287b81f28ce6e920768499a call \
 generate-password
func (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
NameTypeDefault ValueDescription
versionString "7.2.0-v18"No description provided
portInteger 6379No description provided
passwordString -No description provided
Example
dagger -m github.com/stuttgart-things/dagger/homerun@0d3c8e57dde6e4527287b81f28ce6e920768499a call \
 run-redis
func (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
NameTypeDefault ValueDescription
versionString "7.2.0-v18"No description provided
passwordString -No description provided
Example
dagger -m github.com/stuttgart-things/dagger/homerun@0d3c8e57dde6e4527287b81f28ce6e920768499a call \
 redis-cli
func (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
NameTypeDefault ValueDescription
versionString "7.2.0-v18"No description provided
passwordString -No description provided
Example
dagger -m github.com/stuttgart-things/dagger/homerun@0d3c8e57dde6e4527287b81f28ce6e920768499a call \
 test-redis-connection
func (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
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
goVersionString "1.25.4"No description provided
redisVersionString "7.2.0-v18"No description provided
testPathString !-No description provided
Example
dagger -m github.com/stuttgart-things/dagger/homerun@0d3c8e57dde6e4527287b81f28ce6e920768499a call \
 run-test-with-redis --source DIR_PATH --test-path string
func (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)
}