backend
No long description provided.
Installation
dagger install github.com/kpenfound/greetings-api/ci/backend@01751b3927c620986f196fea7baf62a12e5b0cb8
Entrypoint
Return Type
Backend
Example
dagger -m github.com/kpenfound/greetings-api/ci/backend@01751b3927c620986f196fea7baf62a12e5b0cb8 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/ci/backend@01751b3927c620986f196fea7baf62a12e5b0cb8 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/ci/backend@01751b3927c620986f196fea7baf62a12e5b0cb8 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/ci/backend@01751b3927c620986f196fea7baf62a12e5b0cb8 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/ci/backend@01751b3927c620986f196fea7baf62a12e5b0cb8 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/ci/backend@01751b3927c620986f196fea7baf62a12e5b0cb8 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/ci/backend@01751b3927c620986f196fea7baf62a12e5b0cb8 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)
}