cosign
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/wouter2397/dagger-modules/cosign@7c259323bd0bc33da2815e567871b9029a52cb7eEntrypoint
Return Type
Cosign Example
dagger -m github.com/wouter2397/dagger-modules/cosign@7c259323bd0bc33da2815e567871b9029a52cb7e 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
| Name | Type | Default Value | Description |
|---|---|---|---|
| privateKey | Secret ! | - | Cosign private key |
| password | Secret ! | - | Cosign password |
| registryUsername | String | - | registry username |
| registryPassword | Secret ! | - | name of the image |
| digest | String ! | - | Container image digests to sign |
Example
dagger -m github.com/wouter2397/dagger-modules/cosign@7c259323bd0bc33da2815e567871b9029a52cb7e call \
sign --private-key env:MYSECRET --password env:MYSECRET --registry-password env:MYSECRET --digest stringfunc (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)
}