Documentation
¶
Index ¶
- type Tool
- func (t *Tool) ExtractAttestation(bndl attestation.Envelope) (attestation.Statement, error)
- func (t *Tool) ExtractAttestationJSON(bundle *protobundle.Bundle) ([]byte, error)
- func (t *Tool) ExtractPredicate(bndl attestation.Envelope) (attestation.Predicate, error)
- func (t *Tool) ExtractPredicateJSON(envelope attestation.Envelope) ([]byte, error)
- func (t *Tool) ExtractPredicateType(bndl attestation.Envelope) (string, error)
- func (t *Tool) FlattenJSON(data []byte) ([]byte, error)
- func (t *Tool) FlattenJSONDirectoryToWriter(path string, w io.Writer) error
- func (t *Tool) FlattenJSONStream(r io.Reader) io.Reader
- func (t *Tool) ParseAttestation(r io.Reader) (attestation.Statement, error)
- func (t *Tool) ParseBundle(r io.Reader) (attestation.Envelope, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tool ¶
type Tool struct{}
func (*Tool) ExtractAttestation ¶
func (t *Tool) ExtractAttestation(bndl attestation.Envelope) (attestation.Statement, error)
ExtractAttestation returns a strut with the data decoded from the bundle contents JSON.
func (*Tool) ExtractAttestationJSON ¶
func (t *Tool) ExtractAttestationJSON(bundle *protobundle.Bundle) ([]byte, error)
ExtractAttestationJSON returns the attestation JSON enclosed in the bundle
func (*Tool) ExtractPredicate ¶
func (t *Tool) ExtractPredicate(bndl attestation.Envelope) (attestation.Predicate, error)
ExtractPredicate returns the attestation predicate data
func (*Tool) ExtractPredicateJSON ¶
func (t *Tool) ExtractPredicateJSON(envelope attestation.Envelope) ([]byte, error)
ExtractPredicateJSON is akin to ExtractPredicate but returns the predicated marshalled as JSON
func (*Tool) ExtractPredicateType ¶
func (t *Tool) ExtractPredicateType(bndl attestation.Envelope) (string, error)
ExtractPredicateType returns a string with the attestation predicate type
func (*Tool) FlattenJSONDirectoryToWriter ¶
FlattenJSONDirectoryToWriter flattens all JSON files in a directory
func (*Tool) FlattenJSONStream ¶
FlattenJSON flattens a JSON document into a single line, suitable to add to a jsonl file.
func (*Tool) ParseAttestation ¶
ParseAttestation reads an attestation from the Reader r and
func (*Tool) ParseBundle ¶
Parse reades the budle data from reader r and decodes it into