backend
No long description provided.
Installation
dagger install github.com/kpenfound/greetings-api/.dagger/backend@c4e5d9a1ee165d85b7914dec6f07e9d75de74b9b
Entrypoint
Return Type
Backend
Example
dagger -m github.com/kpenfound/greetings-api/.dagger/backend@c4e5d9a1ee165d85b7914dec6f07e9d75de74b9b 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 🔗
unitTest() 🔗
Run the unit tests for the backend
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
Example
dagger -m github.com/kpenfound/greetings-api/.dagger/backend@c4e5d9a1ee165d85b7914dec6f07e9d75de74b9b call \
unit-test --source DIR_PATH
func (m *myModule) example(ctx context.Context, source *Directory) string {
return dag.
Backend().
UnitTest(ctx, source)
}
@function
async def example(source: dagger.Directory) -> str:
return await (
dag.backend()
.unit_test(source)
)
@func()
async example(source: Directory): Promise<string> {
return dag
.backend()
.unitTest(source)
}
lint() 🔗
Lint the backend Go code
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
Example
dagger -m github.com/kpenfound/greetings-api/.dagger/backend@c4e5d9a1ee165d85b7914dec6f07e9d75de74b9b call \
lint --source DIR_PATH
func (m *myModule) example(ctx context.Context, source *Directory) string {
return dag.
Backend().
Lint(ctx, source)
}
@function
async def example(source: dagger.Directory) -> str:
return await (
dag.backend()
.lint(source)
)
@func()
async example(source: Directory): Promise<string> {
return dag
.backend()
.lint(source)
}
build() 🔗
Build the backend
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
arch | String | - | No description provided |
Example
dagger -m github.com/kpenfound/greetings-api/.dagger/backend@c4e5d9a1ee165d85b7914dec6f07e9d75de74b9b call \
build --source DIR_PATH
func (m *myModule) example(source *Directory) *Directory {
return dag.
Backend().
Build(source)
}
@function
def example(source: dagger.Directory) -> dagger.Directory:
return (
dag.backend()
.build(source)
)
@func()
example(source: Directory): Directory {
return dag
.backend()
.build(source)
}
binary() 🔗
Return the compiled backend binary for a particular architecture
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
arch | String | - | No description provided |
Example
dagger -m github.com/kpenfound/greetings-api/.dagger/backend@c4e5d9a1ee165d85b7914dec6f07e9d75de74b9b call \
binary --source DIR_PATH
func (m *myModule) example(source *Directory) *File {
return dag.
Backend().
Binary(source)
}
@function
def example(source: dagger.Directory) -> dagger.File:
return (
dag.backend()
.binary(source)
)
@func()
example(source: Directory): File {
return dag
.backend()
.binary(source)
}
container() 🔗
Get a container ready to run the backend
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
arch | String | - | No description provided |
Example
dagger -m github.com/kpenfound/greetings-api/.dagger/backend@c4e5d9a1ee165d85b7914dec6f07e9d75de74b9b call \
container --source DIR_PATH
func (m *myModule) example(source *Directory) *Container {
return dag.
Backend().
Container(source)
}
@function
def example(source: dagger.Directory) -> dagger.Container:
return (
dag.backend()
.container(source)
)
@func()
example(source: Directory): Container {
return dag
.backend()
.container(source)
}
serve() 🔗
Get a Service to run the backend
Return Type
Service !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
Example
dagger -m github.com/kpenfound/greetings-api/.dagger/backend@c4e5d9a1ee165d85b7914dec6f07e9d75de74b9b call \
serve --source DIR_PATH
func (m *myModule) example(source *Directory) *Service {
return dag.
Backend().
Serve(source)
}
@function
def example(source: dagger.Directory) -> dagger.Service:
return (
dag.backend()
.serve(source)
)
@func()
example(source: Directory): Service {
return dag
.backend()
.serve(source)
}