Documentation
¶
Index ¶
Constants ¶
View Source
const ( PayloadTypeStruct = "struct" PayloadTypeArray = "array" )
Variables ¶
View Source
var PayloadTypes = []string{PayloadTypeStruct, PayloadTypeArray}
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// ResponseHeaders is the list of response headers the snapper will record
ResponseHeaders []string
}
type ParseOptions ¶
type SnapperImplementation ¶
type Snapshot ¶
type Snapshot struct {
ID string `json:"id"`
Name string `json:"name"`
Url string `json:"url"`
Type string `json:"type"`
Metadata Metadata `json:"metadata"`
Headers map[string]string `json:"headers"`
Values any `json:"values"`
}
func (*Snapshot) AsStatement ¶
func (s *Snapshot) AsStatement() attestation.Statement
AsStatement converts the snapshot to an intoto attestation
func (*Snapshot) GetType ¶
func (s *Snapshot) GetType() attestation.PredicateType
func (*Snapshot) SetType ¶
func (s *Snapshot) SetType(t attestation.PredicateType) error
type Spec ¶
type Spec struct {
// ID is the string that will be used to generate the subject's
// hash when generating an attestation. It should identify the
// object described by the data returned by the API call. This
// ID MUST be unique for each instance the API returns.
ID string `json:"id"`
Name string `json:"name"`
Url string `json:"url"`
Type string `json:"type"`
Endpoint string `json:"endpoint"`
Method string `json:"method"`
PayloadType string `json:"payload" yaml:"payload"`
Mask []string `json:"mask"`
}
type SpecParser ¶
type SpecParser struct{}
func (*SpecParser) ParseWithOptions ¶
func (sp *SpecParser) ParseWithOptions(r io.Reader, opts *ParseOptions) (*Spec, error)
ParseWithOptions parses a spec yaml definition.
Click to show internal directories.
Click to hide internal directories.