(cfg *AttestationPushOpts)
| 77 | } |
| 78 | |
| 79 | func 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 | |
| 96 | func (action *AttestationPush) Run(ctx context.Context, attestationID string, runtimeAnnotations map[string]string, bypassPolicyCheck bool) (*AttestationResult, error) { |
| 97 | useRemoteState := attestationID != "" |
no test coverage detected