(cfg *AttestationInitOpts)
| 75 | } |
| 76 | |
| 77 | func NewAttestationInit(cfg *AttestationInitOpts) (*AttestationInit, error) { |
| 78 | c, err := newCrafter(&newCrafterStateOpts{enableRemoteState: cfg.UseRemoteState, localStatePath: cfg.LocalStatePath}, cfg.CPConnection, crafter.WithLogger(&cfg.Logger), crafter.WithAuthRawToken(cfg.AuthTokenRaw)) |
| 79 | if err != nil { |
| 80 | return nil, fmt.Errorf("failed to load crafter: %w", err) |
| 81 | } |
| 82 | |
| 83 | return &AttestationInit{ |
| 84 | ActionsOpts: cfg.ActionsOpts, |
| 85 | c: c, |
| 86 | dryRun: cfg.DryRun, |
| 87 | force: cfg.Force, |
| 88 | useRemoteState: cfg.UseRemoteState, |
| 89 | casURI: cfg.CASURI, |
| 90 | casCAPath: cfg.CASCAPath, |
| 91 | connectionInsecure: cfg.ConnectionInsecure, |
| 92 | }, nil |
| 93 | } |
| 94 | |
| 95 | // returns the attestation ID |
| 96 | type AttestationInitRunOpts struct { |
no test coverage detected