checksum
Calculate and check the checksum of files.
Installation
dagger install github.com/felipepimentel/daggerverse/essentials/checksum@v0.0.0Entrypoint
Return Type
Checksum Example
dagger -m github.com/felipepimentel/daggerverse/essentials/checksum@a6e2b170f4c091b039eb27100249bb19972839d7 call \
func (m *MyModule) Example() *dagger.Checksum {
return dag.
Checksum()
}@function
def example() -> dagger.Checksum:
return (
dag.checksum()
)@func()
example(): Checksum {
return dag
.checksum()
}Types
Checksum 🔗
Calculate and check the checksum of files.
sha256() 🔗
Calculate the SHA-256 checksum of the given files.
Return Type
Sha256 ! Example
dagger -m github.com/felipepimentel/daggerverse/essentials/checksum@a6e2b170f4c091b039eb27100249bb19972839d7 call \
sha-2-5-6func (m *MyModule) Example() *dagger.ChecksumSha256 {
return dag.
Checksum().
Sha256()
}@function
def example() -> dagger.ChecksumSha256:
return (
dag.checksum()
.sha256()
)@func()
example(): ChecksumSha256 {
return dag
.checksum()
.sha256()
}Sha256 🔗
calculate() 🔗
Calculate the SHA-256 checksum of the given files.
Return Type
File !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| files | [File ! ] ! | - | The files to calculate the checksum for. |
| fileName | String | "checksums.txt" | The name of the checksum file. |
Example
dagger -m github.com/felipepimentel/daggerverse/essentials/checksum@a6e2b170f4c091b039eb27100249bb19972839d7 call \
sha-2-5-6 \
calculatefunc (m *MyModule) Example(files []*dagger.File) *dagger.File {
return dag.
Checksum().
Sha256().
Calculate(files)
}@function
def example(files: List[dagger.File]) -> dagger.File:
return (
dag.checksum()
.sha256()
.calculate(files)
)@func()
example(files: File[]): File {
return dag
.checksum()
.sha256()
.calculate(files)
}check() 🔗
Check the SHA-256 checksum of the given files.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| checksums | File ! | - | Checksum file. |
| files | [File ! ] ! | - | The files to check the checksum if. |
Example
dagger -m github.com/felipepimentel/daggerverse/essentials/checksum@a6e2b170f4c091b039eb27100249bb19972839d7 call \
sha-2-5-6 \
check --checksums file:pathfunc (m *MyModule) Example(checksums *dagger.File, files []*dagger.File) *dagger.Container {
return dag.
Checksum().
Sha256().
Check(checksums, files)
}@function
def example(checksums: dagger.File, files: List[dagger.File]) -> dagger.Container:
return (
dag.checksum()
.sha256()
.check(checksums, files)
)@func()
example(checksums: File, files: File[]): Container {
return dag
.checksum()
.sha256()
.check(checksums, files)
}