Help us shape the future of Go! Take the 2026 Go Developer Survey

compliance

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractAttestationPayload

func ExtractAttestationPayload(content string) (any, error)

func NewHTTPController

func NewHTTPController(assetVersionRepository core.AssetVersionRepository, attestationRepository core.AttestationRepository, policyRepository core.PolicyRepository) *httpController

func NewPolicyController

func NewPolicyController(policyRepository core.PolicyRepository, projectRepository core.ProjectRepository) *policyController

Types

type PolicyEvaluation

type PolicyEvaluation struct {
	models.Policy
	Compliant  *bool    `json:"compliant"`
	Violations []string `json:"violations"`
}

func Eval

func Eval(p models.Policy, input any) PolicyEvaluation

type PolicyFS

type PolicyFS struct {
	PolicyMetadata
	Content string
}

func NewPolicy

func NewPolicy(filename string, content string) (*PolicyFS, error)

type PolicyMetadata

type PolicyMetadata struct {
	Title                string   `yaml:"title" json:"title"`
	Description          string   `yaml:"description" json:"description"`
	Priority             int      `yaml:"priority" json:"priority"`
	Tags                 []string `yaml:"tags" json:"tags"`
	RelatedResources     []string `yaml:"relatedResources" json:"relatedResources"`
	ComplianceFrameworks []string `yaml:"complianceFrameworks" json:"complianceFrameworks"`
	Filename             string   `json:"filename"`
	Content              string   `json:"content"`
	PredicateType        string   `yaml:"predicateType" json:"predicateType"`
}

Jump to

Keyboard shortcuts

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