MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / NewAttestationPush

Function NewAttestationPush

app/cli/pkg/action/attestation_push.go:79–94  ·  view source on GitHub ↗
(cfg *AttestationPushOpts)

Source from the content-addressed store, hash-verified

77}
78
79func NewAttestationPush(cfg *AttestationPushOpts) (*AttestationPush, error) {
80 opts := []crafter.NewOpt{crafter.WithLogger(&cfg.Logger), crafter.WithAuthRawToken(cfg.AuthTokenRaw)}
81 return &AttestationPush{
82 ActionsOpts: cfg.ActionsOpts,
83 keyPath: cfg.KeyPath,
84 cliVersion: cfg.CLIVersion,
85 cliDigest: cfg.CLIDigest,
86 bundlePath: cfg.BundlePath,
87 casURI: cfg.CASURI,
88 casCAPath: cfg.CASCAPath,
89 connectionInsecure: cfg.ConnectionInsecure,
90 signServerOpts: cfg.SignServerOpts,
91 localStatePath: cfg.LocalStatePath,
92 newCrafterOpts: &newCrafterOpts{cpConnection: cfg.CPConnection, opts: opts},
93 }, nil
94}
95
96func (action *AttestationPush) Run(ctx context.Context, attestationID string, runtimeAnnotations map[string]string, bypassPolicyCheck bool) (*AttestationResult, error) {
97 useRemoteState := attestationID != ""

Callers 1

newAttestationPushCmdFunction · 0.92

Calls 2

WithLoggerFunction · 0.92
WithAuthRawTokenFunction · 0.92

Tested by

no test coverage detected