dagger-badge
Create a shield.io badge for your dagger project.
Installation
dagger install github.com/pjmagee/dagger-badge@8d4ad000492f00b8f8474000420d3872afa51eb1
Entrypoint
Return Type
DaggerBadge !
Arguments
Name | Type | Description |
---|---|---|
rawUrl | String ! | The URL to the JSON file containing the version information |
Example
dagger -m github.com/pjmagee/dagger-badge@8d4ad000492f00b8f8474000420d3872afa51eb1 call \
--raw-url string
func (m *myModule) example(rawUrl string) *DaggerBadge {
return dag.
DaggerBadge(rawUrl)
}
@function
def example(raw_url: str) -> dag.DaggerBadge:
return (
dag.dagger_badge(raw_url)
)
@func()
example(rawUrl: string): DaggerBadge {
return dag
.daggerBadge(rawUrl)
}
Types
DaggerBadge 🔗
Create a shield.io badge for your dagger project.
link() 🔗
Create a shield.io badge for your dagger project.
Return Type
String !
Example
dagger -m github.com/pjmagee/dagger-badge@8d4ad000492f00b8f8474000420d3872afa51eb1 call \
--raw-url string link
func (m *myModule) example(ctx context.Context, rawUrl string) string {
return dag.
DaggerBadge(rawUrl).
Link(ctx)
}
@function
async def example(raw_url: str) -> str:
return await (
dag.dagger_badge(raw_url)
.link()
)
@func()
async example(rawUrl: string): Promise<string> {
return dag
.daggerBadge(rawUrl)
.link()
}
addToReadme() 🔗
Add the badge to the provided README file.
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
file | File ! | - | A file. |
Example
dagger -m github.com/pjmagee/dagger-badge@8d4ad000492f00b8f8474000420d3872afa51eb1 call \
--raw-url string add-to-readme --file file:path
func (m *myModule) example(rawUrl string, file *File) *File {
return dag.
DaggerBadge(rawUrl).
AddToReadme(file)
}
@function
def example(raw_url: str, file: dagger.File) -> dagger.File:
return (
dag.dagger_badge(raw_url)
.add_to_readme(file)
)
@func()
example(rawUrl: string, file: File): File {
return dag
.daggerBadge(rawUrl)
.addToReadme(file)
}