Dagger
Search

cosign

This module has been generated via dagger init and serves as a reference to
basic 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/wouter2397/dagger-modules/cosign@0c280408f00c68beabccc31d2d2f3cedbb91014e

Entrypoint

Return Type
Cosign
Example
dagger -m github.com/wouter2397/dagger-modules/cosign@0c280408f00c68beabccc31d2d2f3cedbb91014e call \
func (m *MyModule) Example() *dagger.Cosign  {
	return dag.
			Cosign()
}
@function
def example() -> dagger.Cosign:
	return (
		dag.cosign()
	)
@func()
example(): Cosign {
	return dag
		.cosign()
}

Types

Cosign 🔗

sign() 🔗

Return Type
[String ! ] !
Arguments
NameTypeDefault ValueDescription
privateKeySecret !-Cosign private key
passwordSecret !-Cosign password
registryUsernameString -registry username
registryPasswordSecret !-name of the image
digestString !-Container image digests to sign
Example
dagger -m github.com/wouter2397/dagger-modules/cosign@0c280408f00c68beabccc31d2d2f3cedbb91014e call \
 sign --private-key env:MYSECRET --password env:MYSECRET --registry-password env:MYSECRET --digest string
func (m *MyModule) Example(ctx context.Context, privateKey *dagger.Secret, password *dagger.Secret, registryPassword *dagger.Secret, digest string) []string  {
	return dag.
			Cosign().
			Sign(ctx, privateKey, password, registryPassword, digest)
}
@function
async def example(private_key: dagger.Secret, password: dagger.Secret, registry_password: dagger.Secret, digest: str) -> List[str]:
	return await (
		dag.cosign()
		.sign(private_key, password, registry_password, digest)
	)
@func()
async example(privateKey: Secret, password: Secret, registryPassword: Secret, digest: string): Promise<string[]> {
	return dag
		.cosign()
		.sign(privateKey, password, registryPassword, digest)
}