Documentation
¶
Overview ¶
package clients helps set up the graphql backend for testing graphql clients
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GuacData ¶
type GuacData struct {
/** the nouns need to be specified here in order to be referenced from a verb **/
Packages []string // packages are specified by purl
Artifacts []string // artifacts are specified by digest
Sources []string // sources are specified by the name in the SourceName node
Builders []string // builders are specified by URI
/** verbs **/
HasSboms []HasSbom
IsOccurrences []IsOccurrence
IsDependencies []IsDependency
HashEquals []HashEqual
HasSlsas []HasSlsa
}
Defines the Guac graph, to test clients of the Graphql server.
This type, along with the Ingest function, is similar to the backend IngestPredicates type and the corresponding assembler function, but allows for significantly less verbose tests by specifying each noun with a single string and making the various InputSpec structs optional. Additionally, t.Fatalf is called upon any errors. However, this also means that a few inputs aren't supported, such as finer-grained definition of nouns.
All verbs are currently attached to packge version nodes, but a configuration for this could be added if needed.
type HasSbom ¶
type HasSbom struct {
Subject string // a previously ingested purl or digest
IncludedSoftware []string // a list of previously ingested purls and digests
IncludedIsDependencies []IsDependency
IncludedIsOccurrences []IsOccurrence
Spec *gql.HasSBOMInputSpec // if nil, a default will be used
}
type HasSlsa ¶
type HasSlsa struct {
Subject string // a previously ingested digest
BuiltFrom []string // a list of previously ingested digests
BuiltBy string // a previously ingested builder
Spec *gql.SLSAInputSpec // if nil, a default will be used
}
type HashEqual ¶
type HashEqual struct {
ArtifactA string // a previously ingested digest
ArtifactB string // a previously ingested digest
Spec *gql.HashEqualInputSpec // if nil, a default will be used
}
type IsDependency ¶
type IsDependency struct {
DependentPkg string // a previously ingested purl
DependencyPkg string // a previously ingested purl
Spec *gql.IsDependencyInputSpec // if nil, a default will be used
}
type IsOccurrence ¶
type IsOccurrence struct {
Subject string // a previously ingested purl or source
Artifact string // a previously ingested digest
Spec *gql.IsOccurrenceInputSpec // if nil, a default will be used
}