checksum

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateDockerfileChecksum

func CalculateDockerfileChecksum(c Config) (string, error)

CalculateDockerfileChecksum returns a source-based checksum for a dockerfile.

func PathsFromDockerfile

func PathsFromDockerfile(
	res *parser.Result,
	buildArgs map[string]string,
) []string

PathsFromDockerfile returns paths added to a dockerfile.

Types

type Config

type Config struct {
	BuildArgs  map[string]string `mapstructure:"build-arg"`
	Labels     map[string]string `mapstructure:"label"`
	Platforms  []string          `mapstructure:"platform"`
	Dockerfile string            `mapstructure:"file"`
	Workdir    string            `mapstructure:"workdir"`
	Hash       string            `mapstructure:"hash"`
	Debug      bool              `mapstructure:"debug"`
	// contains filtered or unexported fields
}

func (*Config) SetLogger

func (c *Config) SetLogger(l *slog.Logger)

type LoggingHash

type LoggingHash struct {
	hash.Hash
	// contains filtered or unexported fields
}

func (*LoggingHash) Write

func (l *LoggingHash) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL