(cfg *AttestationStatusOpts)
| 81 | } |
| 82 | |
| 83 | func NewAttestationStatus(cfg *AttestationStatusOpts) (*AttestationStatus, error) { |
| 84 | c, err := newCrafter(&newCrafterStateOpts{enableRemoteState: cfg.UseAttestationRemoteState, localStatePath: cfg.LocalStatePath}, cfg.CPConnection, crafter.WithLogger(&cfg.Logger), crafter.WithAuthRawToken(cfg.AuthTokenRaw)) |
| 85 | if err != nil { |
| 86 | return nil, fmt.Errorf("failed to load crafter: %w", err) |
| 87 | } |
| 88 | |
| 89 | return &AttestationStatus{ |
| 90 | ActionsOpts: cfg.ActionsOpts, |
| 91 | c: c, |
| 92 | isPushed: cfg.isPushed, |
| 93 | }, nil |
| 94 | } |
| 95 | |
| 96 | func (action *AttestationStatus) Run(ctx context.Context, attestationID string) (*AttestationStatusResult, error) { |
| 97 | c := action.c |
no test coverage detected