coverage

package
v1.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

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 - Entity coverage info

type SchemaCoverage

type SchemaCoverage struct {
	EntityName    string
	Relationships []string
	Attributes    []string
	Assertions    []string
}

SchemaCoverage

schema:

entity user {}

entity organization {
    // organizational roles
    relation admin @user
    relation member @user
}

entity repository {
    // represents repositories parent organization
    relation parent @organization

    // represents owner of this repository
    relation owner  @user @organization#admin

    // permissions
    permission edit   = parent.admin or owner
    permission delete = owner
}

- relationships coverage

organization#admin@user organization#member@user repository#parent@organization repository#owner@user repository#owner@organization#admin

- assertions coverage

repository#edit repository#delete

type SchemaCoverageInfo

type SchemaCoverageInfo struct {
	EntityCoverageInfo         []EntityCoverageInfo
	TotalRelationshipsCoverage int
	TotalAttributesCoverage    int
	TotalAssertionsCoverage    int
}

SchemaCoverageInfo - Schema coverage info

func Run

func Run(shape file.Shape) SchemaCoverageInfo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL