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@2219d7099bbaf865ba7e30bc6b50c8b372d7f4ad
Entrypoint
Return Type
CodespaceManager !
Example
dagger -m github.com/BCIT-LTC/daggerverse/codespace-manager@2219d7099bbaf865ba7e30bc6b50c8b372d7f4ad 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 |
organization | String ! | "bcit-ltc" | Organization Name |
appName | String ! | "SomeApp" | Application Name |
Example
dagger -m github.com/BCIT-LTC/daggerverse/codespace-manager@2219d7099bbaf865ba7e30bc6b50c8b372d7f4ad call \
run --codespace-token env:MYSECRET --username string --branch string --organization string --app-name string
func (m *MyModule) Example(ctx context.Context, codespaceToken *dagger.Secret, username string, branch string, organization string, appName string) {
return dag.
CodespaceManager().
Run(ctxcodespaceToken, username, branch, organization, appName)
}
@function
async def example(codespace_token: dagger.Secret, username: str, branch: str, organization: str, app_name: str) -> None:
return await (
dag.codespace_manager()
.run(codespace_token, username, branch, organization, app_name)
)
@func()
async example(codespaceToken: Secret, username: string, branch: string, organization: string, appName: string): Promise<void> {
return dag
.codespaceManager()
.run(codespaceToken, username, branch, organization, appName)
}