frontend
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/watchedsky-social/frontend@v0.0.3
Entrypoint
Return Type
Frontend !
Arguments
Name | Type | Description |
---|---|---|
registry | String | The registry URL |
imageVersion | String | The image version to pull from (defaults to latest) |
Example
dagger -m github.com/watchedsky-social/frontend@e0907062ccd80280768b32f2045ee8bb85fcaf74 call \
func (m *myModule) example() *Frontend {
return dag.
Frontend()
}
@function
def example() -> dag.Frontend:
return (
dag.frontend()
)
@func()
example(): Frontend {
return dag
.frontend()
}
Types
Frontend 🔗
withRegistry() 🔗
Return Type
Frontend !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
registry | String ! | - | No description provided |
Example
dagger -m github.com/watchedsky-social/frontend@e0907062ccd80280768b32f2045ee8bb85fcaf74 call \
with-registry --registry string
func (m *myModule) example(registry string) *Frontend {
return dag.
Frontend().
WithRegistry(registry)
}
@function
def example(registry: str) -> dag.Frontend:
return (
dag.frontend()
.with_registry(registry)
)
@func()
example(registry: string): Frontend {
return dag
.frontend()
.withRegistry(registry)
}
withImageVersion() 🔗
Return Type
Frontend !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
imageVersion | String ! | - | No description provided |
Example
dagger -m github.com/watchedsky-social/frontend@e0907062ccd80280768b32f2045ee8bb85fcaf74 call \
with-image-version --image-version string
func (m *myModule) example(imageVersion string) *Frontend {
return dag.
Frontend().
WithImageVersion(imageVersion)
}
@function
def example(image_version: str) -> dag.Frontend:
return (
dag.frontend()
.with_image_version(image_version)
)
@func()
example(imageVersion: string): Frontend {
return dag
.frontend()
.withImageVersion(imageVersion)
}
buildEnv() 🔗
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
eventJson | Secret ! | - | No description provided |
Example
dagger -m github.com/watchedsky-social/frontend@e0907062ccd80280768b32f2045ee8bb85fcaf74 call \
build-env --source DIR_PATH --event-json env:MYSECRET
func (m *myModule) example(source *Directory, eventJson *Secret) *Container {
return dag.
Frontend().
BuildEnv(source, eventJson)
}
@function
def example(source: dagger.Directory, event_json: dagger.Secret) -> dagger.Container:
return (
dag.frontend()
.build_env(source, event_json)
)
@func()
example(source: Directory, eventJson: Secret): Container {
return dag
.frontend()
.buildEnv(source, eventJson)
}
build() 🔗
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
eventJson | Secret ! | - | No description provided |
Example
dagger -m github.com/watchedsky-social/frontend@e0907062ccd80280768b32f2045ee8bb85fcaf74 call \
build --source DIR_PATH --event-json env:MYSECRET
func (m *myModule) example(source *Directory, eventJson *Secret) *Container {
return dag.
Frontend().
Build(source, eventJson)
}
@function
def example(source: dagger.Directory, event_json: dagger.Secret) -> dagger.Container:
return (
dag.frontend()
.build(source, event_json)
)
@func()
example(source: Directory, eventJson: Secret): Container {
return dag
.frontend()
.build(source, eventJson)
}
getBuiltSite() 🔗
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory | - | No description provided |
eventJson | Secret | - | No description provided |
registry | String | - | No description provided |
imageVersion | String | "stable" | No description provided |
Example
dagger -m github.com/watchedsky-social/frontend@e0907062ccd80280768b32f2045ee8bb85fcaf74 call \
get-built-site
func (m *myModule) example() *Directory {
return dag.
Frontend().
GetBuiltSite()
}
@function
def example() -> dagger.Directory:
return (
dag.frontend()
.get_built_site()
)
@func()
example(): Directory {
return dag
.frontend()
.getBuiltSite()
}
buildAndPublish() 🔗
Return Type
[String ! ] !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
registry | String ! | - | No description provided |
username | String ! | - | No description provided |
password | Secret ! | - | No description provided |
eventJson | Secret | - | No description provided |
Example
dagger -m github.com/watchedsky-social/frontend@e0907062ccd80280768b32f2045ee8bb85fcaf74 call \
build-and-publish --source DIR_PATH --registry string --username string --password env:MYSECRET
func (m *myModule) example(ctx context.Context, source *Directory, registry string, username string, password *Secret) []string {
return dag.
Frontend().
BuildAndPublish(ctx, source, registry, username, password)
}
@function
async def example(source: dagger.Directory, registry: str, username: str, password: dagger.Secret) -> List[str]:
return await (
dag.frontend()
.build_and_publish(source, registry, username, password)
)
@func()
async example(source: Directory, registry: string, username: string, password: Secret): Promise<string[]> {
return dag
.frontend()
.buildAndPublish(source, registry, username, password)
}