backend
No long description provided.
Installation
dagger install github.com/NunoFrRibeiro/personal-blog/ci/backend@0743dda778b3cbcdfe5f36212a00bfb76c8c0b6a
Entrypoint
Return Type
Backend !
Arguments
Name | Type | Description |
---|---|---|
source | Directory | Project source directory |
Example
dagger -m github.com/NunoFrRibeiro/personal-blog/ci/backend@0743dda778b3cbcdfe5f36212a00bfb76c8c0b6a 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
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory ! | - | Point to the host directory where the project is located |
Example
dagger -m github.com/NunoFrRibeiro/personal-blog/ci/backend@0743dda778b3cbcdfe5f36212a00bfb76c8c0b6a 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
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory ! | - | Point to the host directory where the project is located |
Example
dagger -m github.com/NunoFrRibeiro/personal-blog/ci/backend@0743dda778b3cbcdfe5f36212a00bfb76c8c0b6a 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
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory ! | - | Point to the host directory where the project is located |
arch | String | - | If needded, specify the archtecture of the binary |
Example
dagger -m github.com/NunoFrRibeiro/personal-blog/ci/backend@0743dda778b3cbcdfe5f36212a00bfb76c8c0b6a 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
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory ! | - | Point to the host directory where the project is located |
arch | String | - | If needded, specify the archtecture of the binary |
Example
dagger -m github.com/NunoFrRibeiro/personal-blog/ci/backend@0743dda778b3cbcdfe5f36212a00bfb76c8c0b6a 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
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory ! | - | Point to the host directory where the project is located |
arch | String | - | If needded, specify the archtecture of the binary |
Example
dagger -m github.com/NunoFrRibeiro/personal-blog/ci/backend@0743dda778b3cbcdfe5f36212a00bfb76c8c0b6a 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
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory ! | - | Point to the host directory where the project is located |
Example
dagger -m github.com/NunoFrRibeiro/personal-blog/ci/backend@0743dda778b3cbcdfe5f36212a00bfb76c8c0b6a 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)
}