Dagger
Search

checksum

Calculate and check the checksum of files.

Installation

dagger install github.com/sagikazarmark/daggerverse/checksum@v0.1.0

Entrypoint

Return Type
Checksum
Example
dagger -m github.com/sagikazarmark/daggerverse/checksum@24c022dde505b24970824dd50f51e719098cfeb3 call \
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@24c022dde505b24970824dd50f51e719098cfeb3 call \
 sha-2-5-6
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@24c022dde505b24970824dd50f51e719098cfeb3 call \
 sha-2-5-6 \
 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@24c022dde505b24970824dd50f51e719098cfeb3 call \
 sha-2-5-6 \
 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)
}