transformer

package
v1.0.0-rc.18 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AffectedComponentsFromOSV

func AffectedComponentsFromOSV(osv *dtos.OSV) []models.AffectedComponent

func ApplyAssetPatchRequestToModel

func ApplyAssetPatchRequestToModel(assetPatch dtos.AssetPatchRequest, asset *models.Asset) bool

func ApplyOrgPatchRequestToModel

func ApplyOrgPatchRequestToModel(p dtos.OrgPatchRequest, org *models.Org) bool

func ApplyProjectPatchRequestToModel

func ApplyProjectPatchRequestToModel(projectPatch dtos.ProjectPatchRequest, project *models.Project) bool

func ApplyReleasePatchRequestToModel

func ApplyReleasePatchRequestToModel(r dtos.ReleasePatchRequest, rel *models.Release)

func ArtifactModelToDTO

func ArtifactModelToDTO(artifact models.Artifact) dtos.ArtifactDTO

func ArtifactRiskHistoryToDTO

func ArtifactRiskHistoryToDTO(history models.ArtifactRiskHistory) dtos.RiskHistoryDTO

func AssetCreateRequestToModel

func AssetCreateRequestToModel(assetCreateRequest dtos.AssetCreateRequest, projectID uuid.UUID) models.Asset

func AssetModelToDTO

func AssetModelToDTO(asset models.Asset) dtos.AssetDTO

func AssetModelToDetailsDTO

func AssetModelToDetailsDTO(asset models.Asset, members []dtos.UserDTO) dtos.AssetDetailsDTO

func AssetModelToDetailsWithSecretsDTO

func AssetModelToDetailsWithSecretsDTO(asset models.Asset, members []dtos.UserDTO) dtos.AssetDetailsWithSecretsDTO

func AssetModelsToDTOs

func AssetModelsToDTOs(assets []models.Asset) []dtos.AssetDTO

func AssetVersionModelToDTO

func AssetVersionModelToDTO(assetVersion models.AssetVersion) dtos.AssetVersionDTO

func CVEToDTO

func CVEToDTO(cve models.CVE) dtos.CVEDTO

func ComponentModelToDTO

func ComponentModelToDTO(m models.Component) dtos.ComponentDTO

func ConvertVulnEventToDto

func ConvertVulnEventToDto(event models.VulnEvent) dtos.VulnEventDTO

func ConvertVulnEventsToDtos

func ConvertVulnEventsToDtos(event []models.VulnEventDetail) []dtos.VulnEventDTO

func DependencyVulnToDetailedDTO

func DependencyVulnToDetailedDTO(dependencyVuln models.DependencyVuln) dtos.DetailedDependencyVulnDTO

func ExploitModelToDTO

func ExploitModelToDTO(exploit models.Exploit) dtos.ExploitDTO

func FromJSONSnippetContents

func FromJSONSnippetContents(firstPartyVuln models.FirstPartyVuln) (dtos.SnippetContents, error)

func LicenseRiskToDTO

func LicenseRiskToDTO(f models.LicenseRisk) dtos.LicenseRiskDTO

func MaliciousAffectedComponentFromOSV

func MaliciousAffectedComponentFromOSV(osv dtos.OSV, maliciousPackageID string) []models.MaliciousAffectedComponent

MaliciousAffectedComponentFromOSV converts OSV data to MaliciousAffectedComponent entries

func OSVToCVE

func OSVToCVE(osv *dtos.OSV) models.CVE

func OSVToCVERelationships

func OSVToCVERelationships(osv *dtos.OSV) []models.CVERelationship

need Optimus Prime here

func OrgCreateRequestToModel

func OrgCreateRequestToModel(c dtos.OrgCreateRequest) models.Org

func OrgDTOFromModel

func OrgDTOFromModel(org models.Org) dtos.OrgDTO

func ProjectCreateRequestToModel

func ProjectCreateRequestToModel(projectCreate dtos.ProjectCreateRequest) models.Project

func ProjectModelToDTO

func ProjectModelToDTO(project models.Project) dtos.ProjectDTO

func RelationshipToDTO

func RelationshipToDTO(relation models.CVERelationship) dtos.RelationshipDTO

func ReleaseCreateRequestToModel

func ReleaseCreateRequestToModel(r dtos.ReleaseCreateRequest, projectID uuid.UUID) models.Release

func ReleaseItemToDTO

func ReleaseItemToDTO(i models.ReleaseItem) dtos.ReleaseItemDTO

func ReleaseToDTO

func ReleaseToDTO(r models.Release) dtos.ReleaseDTO

func SnippetContentsToJSON

func SnippetContentsToJSON(s dtos.SnippetContents) (databasetypes.JSONB, error)

func VEXRuleToDTO

func VEXRuleToDTO(rule models.VEXRule) dtos.VEXRuleDTO

func VEXRuleToDTOWithCount

func VEXRuleToDTOWithCount(rule models.VEXRule, appliesToCount int) dtos.VEXRuleDTO

func VulnInPackageToDependencyVulns

func VulnInPackageToDependencyVulns(vuln models.VulnInPackage, sbom *normalize.SBOMGraph, assetID uuid.UUID, assetVersionName string, artifactName string) []models.DependencyVuln

VulnInPackageToDependencyVulns converts a vulnerability to multiple DependencyVuln objects, one for each unique path through the dependency graph. This ensures that the same CVE appearing through different dependency paths (e.g., A -> trivy -> stdlib vs A -> cosign -> stdlib) creates separate vulnerability records.

func VulnInPackageToDependencyVulnsWithoutArtifact

func VulnInPackageToDependencyVulnsWithoutArtifact(vuln models.VulnInPackage, sbom *normalize.SBOMGraph, assetID uuid.UUID, assetVersionName string) []models.DependencyVuln

VulnInPackageToDependencyVulnsWithoutArtifact converts a vulnerability to multiple DependencyVuln objects based on all paths through the dependency graph.

Types

This section is empty.

Jump to

Keyboard shortcuts

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