codespace-manager
This module has been generated via dagger init and serves as a reference tobasic module structure as you get started with Dagger.
Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.
The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.
Installation
dagger install github.com/BCIT-LTC/daggerverse/codespace-manager@d3789b668fa0a0e726c2d8aa9dd3fa130303e043
Entrypoint
Return Type
CodespaceManager !
Example
dagger -m github.com/BCIT-LTC/daggerverse/codespace-manager@d3789b668fa0a0e726c2d8aa9dd3fa130303e043 call \
func (m *MyModule) Example() *dagger.CodespaceManager {
return dag.
CodespaceManager()
}
@function
def example() -> dagger.CodespaceManager:
return (
dag.codespace_manager()
)
@func()
example(): CodespaceManager {
return dag
.codespaceManager()
}
Types
CodespaceManager 🔗
run() 🔗
Main Codespace manager entry point.
Return Type
Void !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory | - | Source directory |
githubToken | Secret | - | Github Token |
codespaceToken | Secret ! | - | Token for Codespace creation |
username | String ! | - | Github Username |
branch | String ! | - | Current Branch |
appName | String ! | - | Application Name |
codespaceName | String | - | Codespace Name |
Example
dagger -m github.com/BCIT-LTC/daggerverse/codespace-manager@d3789b668fa0a0e726c2d8aa9dd3fa130303e043 call \
run --codespace-token env:MYSECRET --username string --branch string --app-name string
func (m *MyModule) Example(ctx context.Context, codespaceToken *dagger.Secret, username string, branch string, appName string) {
return dag.
CodespaceManager().
Run(ctxcodespaceToken, username, branch, appName)
}
@function
async def example(codespace_token: dagger.Secret, username: str, branch: str, app_name: str) -> None:
return await (
dag.codespace_manager()
.run(codespace_token, username, branch, app_name)
)
@func()
async example(codespaceToken: Secret, username: string, branch: string, appName: string): Promise<void> {
return dag
.codespaceManager()
.run(codespaceToken, username, branch, appName)
}