pub struct ChecksumConfig {
pub name_template: Option<String>,
pub algorithm: Option<String>,
pub skip: Option<StringOrBool>,
pub extra_files: Option<Vec<ExtraFileSpec>>,
pub templated_extra_files: Option<Vec<TemplatedExtraFile>>,
pub ids: Option<Vec<String>>,
pub split: Option<bool>,
}Fields§
§name_template: Option<String>Checksum filename template (default: “{{ .ProjectName }}_{{ .Version }}_checksums.txt”).
algorithm: Option<String>Hash algorithm: sha256, sha512, sha1, md5, crc32 (default: sha256).
skip: Option<StringOrBool>Disable checksums. Accepts bool or template string.
extra_files: Option<Vec<ExtraFileSpec>>Extra files to include in the checksum file (beyond build artifacts).
templated_extra_files: Option<Vec<TemplatedExtraFile>>Extra files whose contents are rendered through the template engine before inclusion.
Unlike extra_files which copy as-is, template variables like {{ .Tag }} are expanded.
GoReleaser Pro feature.
ids: Option<Vec<String>>Build IDs filter: only checksum artifacts from builds whose id is in this list.
split: Option<bool>When true, produce one checksum file per artifact instead of a combined file.
Implementations§
Source§impl ChecksumConfig
impl ChecksumConfig
Sourcepub const DEFAULT_NAME_TEMPLATE: &'static str = "{{ ProjectName }}_{{ Version }}_checksums.txt"
pub const DEFAULT_NAME_TEMPLATE: &'static str = "{{ ProjectName }}_{{ Version }}_checksums.txt"
Default checksum filename template (combined mode). Mirrors
internal/pipe/checksums/checksums.go:48 in GoReleaser.
Sourcepub const DEFAULT_ALGORITHM: &'static str = "sha256"
pub const DEFAULT_ALGORITHM: &'static str = "sha256"
Default hash algorithm. Mirrors GoReleaser
(internal/pipe/checksums/checksums.go:42).
Sourcepub fn resolved_algorithm(&self) -> &str
pub fn resolved_algorithm(&self) -> &str
Resolve the hash algorithm, falling back to the project default
when the user did not specify one. Stages MUST call this rather
than reading self.algorithm directly, so a future default change
(or user-facing override resolution) lands in one place.
Sourcepub fn resolved_split(&self) -> bool
pub fn resolved_split(&self) -> bool
Whether split-mode (one sidecar per artifact) is requested.
Defaults to false (combined-file mode, matching GoReleaser).
Sourcepub fn resolved_combined_name_template(&self) -> &str
pub fn resolved_combined_name_template(&self) -> &str
Resolve the combined-mode checksum filename template, falling back to the GoReleaser-canonical default. Returns the raw template string; the caller still renders it through Tera.
Split mode constructs sidecar names per-artifact at the call site
(<artifact>.<algo> literal format) and intentionally does NOT
route through this accessor — that path needs no template rendering.
Trait Implementations§
Source§impl Clone for ChecksumConfig
impl Clone for ChecksumConfig
Source§fn clone(&self) -> ChecksumConfig
fn clone(&self) -> ChecksumConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ChecksumConfig
impl Debug for ChecksumConfig
Source§impl Default for ChecksumConfig
impl Default for ChecksumConfig
Source§fn default() -> ChecksumConfig
fn default() -> ChecksumConfig
Source§impl<'de> Deserialize<'de> for ChecksumConfigwhere
ChecksumConfig: Default,
impl<'de> Deserialize<'de> for ChecksumConfigwhere
ChecksumConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ChecksumConfig
impl JsonSchema for ChecksumConfig
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more