Dagger
Search

dagger-badge

Create a shield.io badge for your dagger project.

Installation

dagger install github.com/pjmagee/dagger-badge@f693328d99373ebae0d0c7115c33cea2cb839b7c

Entrypoint

Return Type
DaggerBadge !
Arguments
NameTypeDescription
rawUrlString !The URL to the JSON file containing the version information
Example
dagger -m github.com/pjmagee/dagger-badge@f693328d99373ebae0d0c7115c33cea2cb839b7c 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.

Create a shield.io badge for your dagger project.

Return Type
String !
Example
dagger -m github.com/pjmagee/dagger-badge@f693328d99373ebae0d0c7115c33cea2cb839b7c 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
NameTypeDefault ValueDescription
fileFile !-A file.
Example
dagger -m github.com/pjmagee/dagger-badge@f693328d99373ebae0d0c7115c33cea2cb839b7c 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)
}