Skip to content

Commit

Permalink
refactor: rename fields (#3132)
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke authored Sep 27, 2024
1 parent 9439152 commit fa5874a
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 37 deletions.
14 changes: 7 additions & 7 deletions pkg/installpackage/checksum.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ func (is *Installer) dlAndExtractChecksum(ctx context.Context, logE *logrus.Entr
ghVerifier: is.ghVerifier,
},
&cosignVerifier{
cosignDisabled: is.cosignDisabled,
cosign: pkgInfo.Checksum.GetCosign(),
pkg: pkg,
installer: is.cosignInstaller,
verifier: is.cosign,
runtime: is.runtime,
asset: assetName,
disabled: is.cosignDisabled,
cosign: pkgInfo.Checksum.GetCosign(),
pkg: pkg,
installer: is.cosignInstaller,
verifier: is.cosign,
runtime: is.runtime,
asset: assetName,
},
&minisignVerifier{
pkg: pkg,
Expand Down
28 changes: 14 additions & 14 deletions pkg/installpackage/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,22 +101,22 @@ func (is *Installer) download(ctx context.Context, logE *logrus.Entry, param *Do
ghVerifier: is.ghVerifier,
},
&cosignVerifier{
cosignDisabled: is.cosignDisabled,
pkg: ppkg,
cosign: pkgInfo.Cosign,
installer: is.cosignInstaller,
verifier: is.cosign,
runtime: is.runtime,
asset: param.Asset,
disabled: is.cosignDisabled,
pkg: ppkg,
cosign: pkgInfo.Cosign,
installer: is.cosignInstaller,
verifier: is.cosign,
runtime: is.runtime,
asset: param.Asset,
},
&slsaVerifier{
slsaDisabled: is.slsaDisabled,
pkg: ppkg,
provenance: pkgInfo.SLSAProvenance,
installer: is.slsaVerifierInstaller,
verifier: is.slsaVerifier,
runtime: is.runtime,
asset: param.Asset,
disabled: is.slsaDisabled,
pkg: ppkg,
provenance: pkgInfo.SLSAProvenance,
installer: is.slsaVerifierInstaller,
verifier: is.slsaVerifier,
runtime: is.runtime,
asset: param.Asset,
},
&minisignVerifier{
pkg: ppkg,
Expand Down
16 changes: 8 additions & 8 deletions pkg/installpackage/verify_cosign.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ import (
)

type cosignVerifier struct {
cosignDisabled bool
pkg *config.Package
cosign *registry.Cosign
installer *DedicatedInstaller
verifier CosignVerifier
runtime *runtime.Runtime
asset string
disabled bool
pkg *config.Package
cosign *registry.Cosign
installer *DedicatedInstaller
verifier CosignVerifier
runtime *runtime.Runtime
asset string
}

func (c *cosignVerifier) Enabled(logE *logrus.Entry) (bool, error) {
if c.cosignDisabled {
if c.disabled {
logE.Debug("cosign is disabled")
return false, nil
}
Expand Down
16 changes: 8 additions & 8 deletions pkg/installpackage/verify_slsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ import (
)

type slsaVerifier struct {
slsaDisabled bool
pkg *config.Package
provenance *registry.SLSAProvenance
installer *DedicatedInstaller
verifier SLSAVerifier
runtime *runtime.Runtime
asset string
disabled bool
pkg *config.Package
provenance *registry.SLSAProvenance
installer *DedicatedInstaller
verifier SLSAVerifier
runtime *runtime.Runtime
asset string
}

func (s *slsaVerifier) Enabled(logE *logrus.Entry) (bool, error) {
if s.slsaDisabled {
if s.disabled {
logE.Debug("slsa verification is disabled")
return false, nil
}
Expand Down

0 comments on commit fa5874a

Please sign in to comment.