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

Function NewAttestationStatus

app/cli/pkg/action/attestation_status.go:83–94  ·  view source on GitHub ↗
(cfg *AttestationStatusOpts)

Source from the content-addressed store, hash-verified

81}
82
83func 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
96func (action *AttestationStatus) Run(ctx context.Context, attestationID string) (*AttestationStatusResult, error) {
97 c := action.c

Callers 3

newAttestationStatusCmdFunction · 0.92
newAttestationInitCmdFunction · 0.92
RunMethod · 0.85

Calls 3

WithLoggerFunction · 0.92
WithAuthRawTokenFunction · 0.92
newCrafterFunction · 0.85

Tested by

no test coverage detected