Dagger
Search

backend

No long description provided.

Installation

dagger install github.com/NunoFrRibeiro/personal-blog/ci/backend@bf5d7eced3fd6e9d62935bb7187491584575e9a1

Entrypoint

Return Type
Backend !
Arguments
NameTypeDescription
sourceDirectory Project source directory
Example
dagger -m github.com/NunoFrRibeiro/personal-blog/ci/backend@bf5d7eced3fd6e9d62935bb7187491584575e9a1 call \
func (m *myModule) example() *Backend  {
	return dag.
			Backend()
}
@function
def example() -> dag.Backend:
	return (
		dag.backend()
	)
@func()
example(): Backend {
	return dag
		.backend()
}

Types

Backend 🔗

runUnitTests() 🔗

Run the projects unit tests

Return Type
String !
Arguments
NameTypeDefault ValueDescription
dirDirectory !-Point to the host directory where the project is located
Example
dagger -m github.com/NunoFrRibeiro/personal-blog/ci/backend@bf5d7eced3fd6e9d62935bb7187491584575e9a1 call \
 run-unit-tests --dir DIR_PATH
func (m *myModule) example(ctx context.Context, dir *Directory) string  {
	return dag.
			Backend().
			RunUnitTests(ctx, dir)
}
@function
async def example(dir: dagger.Directory) -> str:
	return await (
		dag.backend()
		.run_unit_tests(dir)
	)
@func()
async example(dir: Directory): Promise<string> {
	return dag
		.backend()
		.runUnitTests(dir)
}

lint() 🔗

Lint the project

Return Type
String !
Arguments
NameTypeDefault ValueDescription
dirDirectory !-Point to the host directory where the project is located
Example
dagger -m github.com/NunoFrRibeiro/personal-blog/ci/backend@bf5d7eced3fd6e9d62935bb7187491584575e9a1 call \
 lint --dir DIR_PATH
func (m *myModule) example(ctx context.Context, dir *Directory) string  {
	return dag.
			Backend().
			Lint(ctx, dir)
}
@function
async def example(dir: dagger.Directory) -> str:
	return await (
		dag.backend()
		.lint(dir)
	)
@func()
async example(dir: Directory): Promise<string> {
	return dag
		.backend()
		.lint(dir)
}

buildProject() 🔗

Builds the project as a binary

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
dirDirectory !-Point to the host directory where the project is located
archString -If needded, specify the archtecture of the binary
Example
dagger -m github.com/NunoFrRibeiro/personal-blog/ci/backend@bf5d7eced3fd6e9d62935bb7187491584575e9a1 call \
 build-project --dir DIR_PATH
func (m *myModule) example(dir *Directory) *Directory  {
	return dag.
			Backend().
			BuildProject(dir)
}
@function
def example(dir: dagger.Directory) -> dagger.Directory:
	return (
		dag.backend()
		.build_project(dir)
	)
@func()
example(dir: Directory): Directory {
	return dag
		.backend()
		.buildProject(dir)
}

binary() 🔗

Returns the built binary

Return Type
File !
Arguments
NameTypeDefault ValueDescription
dirDirectory !-Point to the host directory where the project is located
archString -If needded, specify the archtecture of the binary
Example
dagger -m github.com/NunoFrRibeiro/personal-blog/ci/backend@bf5d7eced3fd6e9d62935bb7187491584575e9a1 call \
 binary --dir DIR_PATH
func (m *myModule) example(dir *Directory) *File  {
	return dag.
			Backend().
			Binary(dir)
}
@function
def example(dir: dagger.Directory) -> dagger.File:
	return (
		dag.backend()
		.binary(dir)
	)
@func()
example(dir: Directory): File {
	return dag
		.backend()
		.binary(dir)
}

container() 🔗

Create a container to run the binary

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
dirDirectory !-Point to the host directory where the project is located
archString -If needded, specify the archtecture of the binary
Example
dagger -m github.com/NunoFrRibeiro/personal-blog/ci/backend@bf5d7eced3fd6e9d62935bb7187491584575e9a1 call \
 container --dir DIR_PATH
func (m *myModule) example(dir *Directory) *Container  {
	return dag.
			Backend().
			Container(dir)
}
@function
def example(dir: dagger.Directory) -> dagger.Container:
	return (
		dag.backend()
		.container(dir)
	)
@func()
example(dir: Directory): Container {
	return dag
		.backend()
		.container(dir)
}

serve() 🔗

Run a service to test the go-blog

Return Type
Service !
Arguments
NameTypeDefault ValueDescription
dirDirectory !-Point to the host directory where the project is located
Example
dagger -m github.com/NunoFrRibeiro/personal-blog/ci/backend@bf5d7eced3fd6e9d62935bb7187491584575e9a1 call \
 serve --dir DIR_PATH
func (m *myModule) example(dir *Directory) *Service  {
	return dag.
			Backend().
			Serve(dir)
}
@function
def example(dir: dagger.Directory) -> dagger.Service:
	return (
		dag.backend()
		.serve(dir)
	)
@func()
example(dir: Directory): Service {
	return dag
		.backend()
		.serve(dir)
}