Dagger
Search

checksum

Calculate and check the checksum of files.

Installation

dagger install github.com/sagikazarmark/daggerverse/checksum@833905febeb1c77937712dd9f69a2c85898c74d9

Entrypoint

Return Type
Checksum
Example
func (m *myModule) example() *Checksum  {
	return dag.
			Checksum()
}
@function
def example() -> dag.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/sagikazarmark/daggerverse/checksum@833905febeb1c77937712dd9f69a2c85898c74d9 call \
 sha256 \
 calculate
func (m *myModule) example() *ChecksumSha256  {
	return dag.
			Checksum().
			Sha256()
}
@function
def example() -> dag.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
NameTypeDefault ValueDescription
files[File ! ] !-The files to calculate the checksum for.
fileNameString "checksums.txt"The name of the checksum file.
Example
dagger -m github.com/sagikazarmark/daggerverse/checksum@833905febeb1c77937712dd9f69a2c85898c74d9 call \
 sha256 \
 calculate
func (m *myModule) example(files []*File) *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
NameTypeDefault ValueDescription
checksumsFile !-Checksum file.
files[File ! ] !-The files to check the checksum if.
Example
dagger -m github.com/sagikazarmark/daggerverse/checksum@833905febeb1c77937712dd9f69a2c85898c74d9 call \
 sha256 \
 check --checksums file:path
func (m *myModule) example(checksums *File, files []*File) *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)
}