Dagger NodeJS SDK
api/client.gen.Module_
A Dagger module.
Hierarchy
-
BaseClient
↳
Module_
Constructors
constructor
new Module_(parent?
, _id?
, _description?
, _name?
, _sdk?
, _serve?
): Module_
Constructor is used for internal usage only, do not create object from it.
Parameters
Name | Type |
---|---|
parent? | Object |
parent.ctx | Context |
parent.queryTree? | QueryTree [] |
_id? | ModuleID |
_description? | string |
_name? | string |
_sdk? | string |
_serve? | Void |
Returns
Overrides
BaseClient.constructor
Properties
_description
Private
Optional
Readonly
_description: string
= undefined
_id
Private
Optional
Readonly
_id: ModuleID
= undefined
_name
Private
Optional
Readonly
_name: string
= undefined
_sdk
Private
Optional
Readonly
_sdk: string
= undefined
_serve
Private
Optional
Readonly
_serve: Void
= undefined
Methods
dependencies
dependencies(): Promise
<Module_
[]>
Modules used by this module.
Returns
Promise
<Module_
[]>
dependencyConfig
dependencyConfig(): Promise
<ModuleDependency
[]>
The dependencies as configured by the module.
Returns
Promise
<ModuleDependency
[]>
description
description(): Promise
<string
>
The doc string of the module, if any
Returns
Promise
<string
>
generatedContextDiff
generatedContextDiff(): Directory
The generated files and directories made on top of the module source's context directory.
Returns
generatedContextDirectory
generatedContextDirectory(): Directory
The module source's context plus any configuration and source files created by codegen.
Returns
id
id(): Promise
<ModuleID
>
A unique identifier for this Module.
Returns
Promise
<ModuleID
>
initialize
initialize(): Module_
Retrieves the module with the objects loaded via its SDK.
Returns
interfaces
interfaces(): Promise
<TypeDef
[]>
Interfaces served by this module.
Returns
Promise
<TypeDef
[]>
name
name(): Promise
<string
>
The name of the module
Returns
Promise
<string
>
objects
objects(): Promise
<TypeDef
[]>
Objects served by this module.
Returns
Promise
<TypeDef
[]>
runtime
runtime(): Container
The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile.
Returns
sdk
sdk(): Promise
<string
>
The SDK used by this module. Either a name of a builtin SDK or a module source ref string pointing to the SDK's implementation.
Returns
Promise
<string
>
serve
serve(): Promise
<Void
>
Serve a module's API in the current session.
Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
Returns
Promise
<Void
>
source
source(): ModuleSource
The source for the module.
Returns
with
with(arg
): Module_
Call the provided function with current Module.
This is useful for reusability and readability by not breaking the calling chain.
Parameters
Name | Type |
---|---|
arg | (param : Module_ ) => Module_ |
Returns
withDescription
withDescription(description
): Module_
Retrieves the module with the given description
Parameters
Name | Type | Description |
---|---|---|
description | string | The description to set |
Returns
withInterface
withInterface(iface
): Module_
This module plus the given Interface type and associated functions
Parameters
Name | Type |
---|---|
iface | TypeDef |
Returns
withObject
withObject(object
): Module_
This module plus the given Object type and associated functions.
Parameters
Name | Type |
---|---|
object | TypeDef |
Returns
withSource
withSource(source
): Module_
Retrieves the module with basic configuration loaded if present.
Parameters
Name | Type | Description |
---|---|---|
source | ModuleSource | The module source to initialize from. |