customertwin

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CustomerRepoCount        = 96
	CustomerJenkinsCallers   = 64
	CustomerCredentialRefs   = 66
	CustomerSharedCallers    = 32
	CustomerAPISpecs         = 38
	OperationsPerSpec        = 10
	CustomerAPIOperations    = CustomerAPISpecs * OperationsPerSpec
	CustomerRuntimeConsumers = 1
)
View Source
const ManifestVersion = 1

Variables

This section is empty.

Functions

func RepoName

func RepoName(index int) string

func ValidateManifest

func ValidateManifest(manifest Manifest) error

Types

type Manifest

type Manifest struct {
	Version        int                     `json:"version"`
	Repositories   []ManifestRepository    `json:"repositories"`
	Artifacts      []ManifestArtifact      `json:"artifacts"`
	Facts          []ManifestFact          `json:"facts"`
	Relationships  []ManifestRelationship  `json:"relationships"`
	Bindings       []ManifestBinding       `json:"bindings"`
	Authorities    []ManifestAuthority     `json:"authorities"`
	NegativeClaims []ManifestNegativeClaim `json:"negative_claims"`
}

func CustomerManifest

func CustomerManifest(repoCount int) Manifest

type ManifestArtifact

type ManifestArtifact struct {
	ID   string `json:"id"`
	Repo string `json:"repo"`
	Path string `json:"path"`
	Role string `json:"role"`
}

type ManifestAuthority

type ManifestAuthority struct {
	ID                      string `json:"id"`
	BindingID               string `json:"binding_id"`
	ExistenceEvidenceFactID string `json:"existence_evidence_fact_id"`
	LifetimeEvidenceFactID  string `json:"lifetime_evidence_fact_id"`
	LifetimeKind            string `json:"lifetime_kind"`
	Effective               bool   `json:"effective"`
}

type ManifestBinding

type ManifestBinding struct {
	ID              string   `json:"id"`
	ReferenceFactID string   `json:"reference_fact_id"`
	RelationshipID  string   `json:"relationship_id,omitempty"`
	EvidenceFactIDs []string `json:"evidence_fact_ids"`
	State           string   `json:"state"`
}

type ManifestFact

type ManifestFact struct {
	ID          string   `json:"id"`
	Stage       string   `json:"stage"`
	Unit        string   `json:"unit"`
	ArtifactIDs []string `json:"artifact_ids"`
}

type ManifestNegativeClaim

type ManifestNegativeClaim struct {
	ID         string `json:"id"`
	ArtifactID string `json:"artifact_id"`
	Claim      string `json:"claim"`
	Count      int    `json:"count"`
}

type ManifestRelationship

type ManifestRelationship struct {
	ID               string   `json:"id"`
	Kind             string   `json:"kind"`
	CallerArtifactID string   `json:"caller_artifact_id"`
	SourceArtifactID string   `json:"source_artifact_id,omitempty"`
	State            string   `json:"state"`
	FactIDs          []string `json:"fact_ids,omitempty"`
}

type ManifestRepository

type ManifestRepository struct {
	ID           string `json:"id"`
	Organization string `json:"organization"`
	Inert        bool   `json:"inert,omitempty"`
}

type Oracle

type Oracle struct {
	Version                 int           `json:"version"`
	Organizations           int           `json:"organizations"`
	Repositories            int           `json:"repositories"`
	JenkinsCallers          int           `json:"jenkins_callers"`
	DirectCredentialRefs    int           `json:"direct_credential_refs"`
	InheritedCredentialRefs int           `json:"inherited_credential_refs"`
	ExplicitAuthorities     int           `json:"explicit_authorities"`
	OIDCReferences          int           `json:"oidc_references"`
	DuplicatePathRefs       int           `json:"duplicate_path_refs"`
	SharedLibraryCallers    int           `json:"shared_library_callers"`
	UnmappedLibraryCallers  int           `json:"unmapped_library_callers"`
	APISpecFiles            int           `json:"api_spec_files"`
	APIOperations           int           `json:"api_operations"`
	RuntimeConsumers        int           `json:"runtime_consumers"`
	SchemaIdentityClaims    int           `json:"schema_identity_claims"`
	DynamicRelationships    int           `json:"dynamic_relationships"`
	ParserFailures          int           `json:"parser_failures"`
	GitHubReusableCallers   int           `json:"github_reusable_callers"`
	GitHubCompositeCalls    int           `json:"github_composite_calls"`
	GitLabIncludeCallers    int           `json:"gitlab_include_callers"`
	AzureTemplateCallers    int           `json:"azure_template_callers"`
	GeneratedSpecs          int           `json:"generated_specs"`
	APIGenerators           int           `json:"api_generators"`
	ExpectedStages          []OracleStage `json:"expected_stages"`
}

Oracle is declarative customer-shape truth. It intentionally contains no detector, classifier, resolver, or report implementation logic.

func CustomerOracle

func CustomerOracle() Oracle

func Materialize

func Materialize(root string, repoCount int) (Oracle, error)

func MaterializeCustomerShape

func MaterializeCustomerShape(root string) (Oracle, error)

type OracleStage

type OracleStage struct {
	StageID string `json:"stage_id"`
	Unit    string `json:"unit"`
	Count   int    `json:"count"`
}

type ShapeDelta

type ShapeDelta struct {
	Metric   string `json:"metric"`
	Expected int    `json:"expected"`
	Observed int    `json:"observed"`
	Delta    int    `json:"delta"`
}

type ShapeReceipt

type ShapeReceipt struct {
	Version int          `json:"version"`
	Deltas  []ShapeDelta `json:"deltas"`
}

func CompareShape

func CompareShape(input ShapeReceiptInput) ShapeReceipt

type ShapeReceiptInput

type ShapeReceiptInput struct {
	Repositories                  int `json:"repositories"`
	JenkinsFiles                  int `json:"jenkins_files"`
	DirectCredentialReferences    int `json:"direct_credential_references"`
	InheritedCredentialReferences int `json:"inherited_credential_references"`
	ResolvedRelationships         int `json:"resolved_relationships"`
	UnresolvedRelationships       int `json:"unresolved_relationships"`
	APISpecifications             int `json:"api_specifications"`
	APIOperations                 int `json:"api_operations"`
	ParserFailures                int `json:"parser_failures"`
}

Directories

Path Synopsis
cmd
shape-receipt command

Jump to

Keyboard shortcuts

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