Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntityCoverageInfo ¶
type EntityCoverageInfo struct {
EntityName string
UncoveredRelationships []string
CoverageRelationshipsPercent int
UncoveredAttributes []string
CoverageAttributesPercent int
UncoveredAssertions map[string][]string
CoverageAssertionsPercent map[string]int
}
EntityCoverageInfo represents coverage information for a single entity
type SchemaCoverage ¶
type SchemaCoverage struct {
EntityName string
Relationships []string
Attributes []string
Assertions []string
}
SchemaCoverage represents the expected coverage for a schema entity
Example schema:
entity user {}
entity organization {
relation admin @user
relation member @user
}
entity repository {
relation parent @organization
relation owner @user @organization#admin
permission edit = parent.admin or owner
permission delete = owner
}
Expected relationships coverage:
- organization#admin@user
- organization#member@user
- repository#parent@organization
- repository#owner@user
- repository#owner@organization#admin
Expected assertions coverage:
- repository#edit
- repository#delete
type SchemaCoverageInfo ¶
type SchemaCoverageInfo struct {
EntityCoverageInfo []EntityCoverageInfo
TotalRelationshipsCoverage int
TotalAttributesCoverage int
TotalAssertionsCoverage int
}
SchemaCoverageInfo represents the overall coverage information for a schema
func Run ¶
func Run(shape file.Shape) SchemaCoverageInfo
Run analyzes the coverage of relationships, attributes, and assertions for a given schema shape and returns the coverage information
Click to show internal directories.
Click to hide internal directories.