-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace RawAttestation with Cryptolib Attestation #519
Conversation
Migrate metadata_test and cache_test Migrate grafeas.go Update most tests in review package Remove tests for generic and unknown signature types [ISSUE-506] Remove unnecessary error check Leftover from grafeas#511. Also see the discussion [here](grafeas#514 (comment)). Disclaimer: I was not able to test this locally now, but reading the code and the aforementioned PR, I believe this change is correct. Cleanup base64 Clean up comments Modify helpers Last revisions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go readability lgtm after comments are resolved.
Feel free to ignore the cloud build error for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just small stuff.
} | ||
ras = append(ras, ra) | ||
atts = append(atts, att) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest returning []cryptolib.Attestation{att} directly. Also below.
func (avt *AttestorValidatingTransport) fetchAttestations(image string) ([]*cryptolib.Attestation, error) { | ||
atts := []*cryptolib.Attestation{} | ||
rawAtts, err := avt.Client.Attestations(image, &avt.Attestor) | ||
func (avt *AttestorValidatingTransport) fetchAttestations(image string) ([]cryptolib.Attestation, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In L154, you can just call avt.Client.Attestations directly and get rid of fetchAttestations() altogether.
Replace all instances of
RawAttestation
with cryptolibAttestation
. Includes documentation fixes for functions and structs.