Documentation
¶
Index ¶
- type AIAnalysis
- type AuditLog
- type BackupJob
- type BundlePromotion
- type BundleState
- type CargoCrate
- type ClaimMapping
- type CleanupPolicy
- type Component
- type ConanPackage
- type CondaPackage
- type DebPackage
- type DebianArchitecture
- type DebianComponent
- type DebianDistribution
- type DockerBlob
- type DockerManifest
- type DockerRepository
- type DockerTag
- type DockerUpload
- type GoModule
- type Group
- type HelmChart
- type IvyArtifact
- type LicensePolicy
- type LicenseScanResult
- type MavenArtifact
- type NPMDistTag
- type NPMPackage
- type NPMVersion
- type NuGetPackage
- type OIDCConfig
- type OrgMember
- type Organization
- type PackageDelta
- type PermissionAssignment
- type PermissionTarget
- type PipelineStage
- type PromotionPipeline
- type PromotionStatus
- type ProxyCacheEntry
- type PyPIPackage
- type RPMRepo
- type RawArtifact
- type ReleaseBundle
- type ReleaseBundleItem
- type RepoMetadata
- type Repository
- type RepositoryGroupMember
- type RpmPackage
- type RubyGem
- type SAMLConfig
- type SBOMReport
- type SBTArtifact
- type SSOProvider
- type SecretFinding
- type SecretScanResult
- type Session
- type StorageBackend
- type StorageQuota
- type Token
- type User
- type UserGroup
- type VulnScanResult
- type Vulnerability
- type Webhook
- type WebhookDelivery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AIAnalysis ¶
type AIAnalysis struct {
ID string
RepositoryID string
ArtifactID string // generic reference (component ID, npm version ID, etc.)
ArtifactFormat string // "npm", "maven", "deb", "rpm", "helm", "pypi", etc.
ArtifactName string
ArtifactVersion string
Summary string
Tags []string // stored as JSONB
LicenseStatus string // "SAFE", "REVIEW_REQUIRED", "UNKNOWN"
LicenseName string
SecurityNotes string
QuarantineRecommended bool
Status string // "pending", "processing", "completed", "failed"
ErrorMessage string
ModelUsed string
PromptTokens int
CompletionTokens int
CreatedAt time.Time
UpdatedAt time.Time
}
AIAnalysis stores the AI-generated analysis for an artifact.
type AuditLog ¶
type AuditLog struct {
ID string `db:"id"`
Action string `db:"action"`
OrgID *string `db:"org_id"`
RepositoryID *string `db:"repository_id"`
ActorID *string `db:"actor_id"`
ActorType *string `db:"actor_type"`
DetailsJSON json.RawMessage `db:"details_json"`
ResourceType *string `db:"resource_type"`
ResourceID *string `db:"resource_id"`
IPAddress *string `db:"ip_address"`
CreatedAt time.Time `db:"created_at"`
}
AuditLog mirrors the audit_logs table schema: structured columns for compliance-grade auditing.
type BundlePromotion ¶
type BundlePromotion struct {
ID string `db:"id"`
BundleID string `db:"bundle_id"`
FromStage *string `db:"from_stage"`
ToStage string `db:"to_stage"`
TargetRepoID string `db:"target_repo_id"`
Status PromotionStatus `db:"status"`
PromotedBy string `db:"promoted_by"`
Notes string `db:"notes"`
ErrorMessage *string `db:"error_message"`
ItemCount int `db:"item_count"`
StartedAt time.Time `db:"started_at"`
CompletedAt *time.Time `db:"completed_at"`
}
type BundleState ¶
type BundleState string
const ( BundleStateDraft BundleState = "draft" BundleStateSealed BundleState = "sealed" BundleStateArchived BundleState = "archived" )
type CargoCrate ¶
type CargoCrate struct {
ID string
RepositoryID string
Name string
Version string
Description string
Homepage string
Documentation string
Repository string
License string
Keywords []string
Categories []string
Authors []string
Readme string
MetadataJSON []byte
BlobKey string
Checksum string
Yanked bool
DownloadCount int
CreatedAt time.Time
UpdatedAt time.Time
}
type ClaimMapping ¶
type CleanupPolicy ¶
type Component ¶
type Component struct {
ID string
RepositoryID string
ArtifactID string
SHA256 string
Format string
Name string
Version string
Release string
Epoch int
Arch string
Summary string
Description string
License string
URL string
Vendor string
Group string
Packager string
SourceRPM string
BuildHost string
BuildTime int64
PackageSize int64
InstalledSize int64
ArchiveSize int64
Filename string
CreatedAt time.Time
UpdatedAt time.Time
}
type ConanPackage ¶
type CondaPackage ¶
type DebPackage ¶
type DebPackage struct {
ID string
RepositoryID string
DistributionID string
ComponentID string
BlobID string
Name string
Version string
Arch string
Summary string
Description string
License string
Maintainer string
Homepage string
Filename string
InstalledSize int64
CreatedAt time.Time
UpdatedAt time.Time
}
DebPackage represents a Debian package stored in the deb_packages table.
type DebianArchitecture ¶
type DebianArchitecture struct {
ID string
DistributionID string
Name string // e.g., "amd64", "i386", "arm64"
CreatedAt time.Time
UpdatedAt time.Time
}
DebianArchitecture represents a supported architecture.
type DebianComponent ¶
type DebianComponent struct {
ID string
DistributionID string
Name string // e.g., "main", "universe", "restricted"
Description string
CreatedAt time.Time
UpdatedAt time.Time
}
DebianComponent represents a component within a distribution (main, universe, etc.)
type DebianDistribution ¶
type DebianDistribution struct {
ID string
RepositoryID string
Name string // e.g., "focal", "jammy"
Description string
Codename string // e.g., "20.04", "22.04"
CreatedAt time.Time
UpdatedAt time.Time
}
DebianDistribution represents a Debian distribution (e.g., focal, jammy).
type DockerBlob ¶
type DockerBlob struct {
ID string `db:"id"`
RepositoryID string `db:"repository_id"`
Digest string `db:"digest"` // sha256:<hex>
MediaType string `db:"media_type"`
Size int64 `db:"size"`
BlobSHA256 string `db:"blob_sha256"` // blobstore key
CreatedAt time.Time `db:"created_at"`
}
DockerBlob represents a content-addressable blob (layer or config).
type DockerManifest ¶
type DockerManifest struct {
ID string `db:"id"`
RepositoryID string `db:"repository_id"`
Digest string `db:"digest"` // sha256:<hex>
MediaType string `db:"media_type"`
BlobID string `db:"blob_id"`
Size int64 `db:"size"`
SubjectDigest string `db:"subject_digest"` // OCI referrers
// BlobSHA256 is populated only by ListDockerManifestsByRepo (a JOIN with
// blobs, used for backup export) since BlobID above is a live blobs.id
// UUID that doesn't survive a restore into a fresh DB.
BlobSHA256 string `db:"-"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
DockerManifest stores an OCI or Docker v2 image manifest.
type DockerRepository ¶
type DockerRepository struct {
ID string `db:"id"`
RepositoryID string `db:"repository_id"`
CreatedAt time.Time `db:"created_at"`
}
DockerRepository holds Docker-specific config for a repository.
type DockerTag ¶
type DockerTag struct {
ID string `db:"id"`
RepositoryID string `db:"repository_id"`
Name string `db:"name"`
ManifestDigest string `db:"manifest_digest"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
DockerTag is a named reference to a manifest.
type DockerUpload ¶
type DockerUpload struct {
ID string `db:"id"`
RepositoryID string `db:"repository_id"`
UploadUUID string `db:"upload_uuid"`
Offset int64 `db:"offset"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
DockerUpload tracks an in-progress chunked blob upload.
type HelmChart ¶
type HelmChart struct {
ID string
RepositoryID string
Name string
Version string
AppVersion string
Description string
Keywords []string
Home string
Sources []string
Maintainers []map[string]string // [{name, email, url}]
Icon string
APIVersion string
Type string
BlobKey string
Digest string
SizeBytes int64
CreatedAt time.Time
UpdatedAt time.Time
}
type IvyArtifact ¶
type LicensePolicy ¶
type LicensePolicy struct {
ID string
RepositoryID *string // nil = global policy
Name string
Description string
Action string // "warn", "block", "allow"
AllowedLicenses []string
DeniedLicenses []string
Enabled bool
CreatedAt time.Time
UpdatedAt time.Time
}
LicensePolicy represents a license compliance policy.
type LicenseScanResult ¶
type LicenseScanResult struct {
ID string
RepositoryID string
ArtifactID string
Licenses []string
SPDXExpressions []string
ScanStatus string // "pending", "completed", "failed"
ScanError string
ScannedAt *time.Time
CreatedAt time.Time
UpdatedAt time.Time
}
LicenseScanResult represents a license scan result for an artifact.
type MavenArtifact ¶
type MavenArtifact struct {
ID string
RepositoryID string
BlobID string
GroupID string
ArtifactCoord string
Version string
Classifier string
Extension string
SnapshotTimestamp string
SnapshotBuildNumber int
IsSnapshot bool
RepoPath string
MD5 string
SHA1 string
SHA256 string
SHA512 string
// BlobSHA256/BlobSizeBytes are populated only by ListMavenArtifactsByRepo
// (a JOIN with blobs, used for backup export) since BlobID above is a
// live blobs.id UUID that doesn't survive a restore into a fresh DB.
BlobSHA256 string
BlobSizeBytes int64
CreatedAt time.Time
UpdatedAt time.Time
}
func (*MavenArtifact) Coordinate ¶
func (m *MavenArtifact) Coordinate() pkgmaven.Coordinate
type NPMDistTag ¶
type NPMPackage ¶
type NPMVersion ¶
type NPMVersion struct {
ID string
PackageID string
Version string
ManifestJSON []byte
Integrity string
Shasum string
BlobID string
TarballFilename string
// BlobSHA256/BlobSizeBytes are populated only by ListNPMVersionsByRepo
// (a JOIN with blobs, used for backup export) since BlobID above is a
// live blobs.id UUID that doesn't survive a restore into a fresh DB.
BlobSHA256 string
BlobSizeBytes int64
CreatedAt time.Time
}
type NuGetPackage ¶
type NuGetPackage struct {
ID string
RepositoryID string
PackageID string
Version string
Title string
Description string
Summary string
Authors string
Owners string
Tags string
ProjectURL string
LicenseURL string
IconURL string
RequireLicenseAcceptance bool
IsPrerelease bool
MinClientVersion string
BlobKey string
PackageHash string
PackageHashAlgorithm string
PackageSize int64
DownloadCount int
CreatedAt time.Time
UpdatedAt time.Time
}
type OIDCConfig ¶
type OIDCConfig struct {
Issuer string `json:"issuer"`
ClientID string `json:"client_id"`
ClientSecret string `json:"client_secret"`
Scopes []string `json:"scopes"`
UsernameClaim string `json:"username_claim"`
EmailClaim string `json:"email_claim"`
NameClaim string `json:"name_claim"`
GroupsClaim string `json:"groups_claim"`
}
type Organization ¶
type PackageDelta ¶
type PackageDelta struct {
ID string
RepositoryID string
// Source package (the version the client already has)
FromSHA256 string
FromFilename string
// Target package (the version the client wants)
ToSHA256 string
ToFilename string
// The delta blob (stored in BlobStore keyed by DeltaSHA256)
DeltaSHA256 string
DeltaSize int64
// Format: "deb" or "rpm"
Format string
CreatedAt time.Time
}
PackageDelta represents a pre-computed bsdiff patch between two package versions. Clients that already have the "from" version can download the delta instead of the full package, saving significant bandwidth for incremental updates.
type PermissionAssignment ¶
type PermissionTarget ¶
type PipelineStage ¶
PipelineStage is one element in a PromotionPipeline.Stages slice.
type PromotionPipeline ¶
type PromotionStatus ¶
type PromotionStatus string
const ( PromotionStatusInProgress PromotionStatus = "in_progress" PromotionStatusSuccess PromotionStatus = "success" PromotionStatusFailed PromotionStatus = "failed" )
type ProxyCacheEntry ¶
type PyPIPackage ¶
type PyPIPackage struct {
ID string
RepositoryID string
Name string
Version string
Filename string
PackageType string
PythonVersion string
RequiresPython string
Summary string
Author string
AuthorEmail string
License string
Keywords string
Classifiers []string
BlobKey string
MD5Digest string
SHA256Digest string
SizeBytes int64
CreatedAt time.Time
UpdatedAt time.Time
}
type RawArtifact ¶
type RawArtifact struct {
ID string
RepositoryID string
Path string
ContentType string
BlobID string
SizeBytes int64
SHA256 string
BlobKey string
Metadata map[string]any
CreatedAt time.Time
UpdatedAt time.Time
}
RawArtifact mirrors the raw_artifacts table. BlobID is UUID FK to blobs table; SizeBytes is for response display.
type ReleaseBundle ¶
type ReleaseBundle struct {
ID string `db:"id"`
Name string `db:"name"`
Version string `db:"version"`
Description string `db:"description"`
State BundleState `db:"state"`
PipelineID *string `db:"pipeline_id"`
CurrentStage *string `db:"current_stage"`
CreatedBy string `db:"created_by"`
SealedAt *time.Time `db:"sealed_at"`
SealedBy *string `db:"sealed_by"`
ArchivedAt *time.Time `db:"archived_at"`
ArchivedBy *string `db:"archived_by"`
GPGKeyID *string `db:"gpg_key_id"`
GPGSignature *string `db:"gpg_signature"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
func (*ReleaseBundle) IsMutable ¶
func (b *ReleaseBundle) IsMutable() bool
IsMutable returns true only for draft bundles.
type ReleaseBundleItem ¶
type ReleaseBundleItem struct {
ID string `db:"id"`
BundleID string `db:"bundle_id"`
SourceRepoID string `db:"source_repo_id"`
ComponentID *string `db:"component_id"`
SHA256 string `db:"sha256"`
ArtifactPath string `db:"artifact_path"`
Format string `db:"format"`
SizeBytes int64 `db:"size_bytes"`
AddedBy string `db:"added_by"`
AddedAt time.Time `db:"added_at"`
}
type RepoMetadata ¶
type Repository ¶
type Repository struct {
ID string
Name string
Format string
Description string
Public bool
AllowFullUnpublish bool
RepoType string // "hosted", "proxy", "group"
UpstreamURL string // proxy only
UpstreamUsername string // proxy only
UpstreamPasswordEnc string // proxy only — AES-256-GCM encrypted
CacheTTLSeconds int // proxy only, default 3600
NegativeCacheTTLSeconds int // proxy only, default 60
Blocked bool // proxy only
OrgID *string
CreatedAt time.Time
UpdatedAt time.Time
}
type RepositoryGroupMember ¶
type RpmPackage ¶
type RpmPackage struct {
ID string
RepositoryID string
BlobID string
Name string
Version string
Release string
Epoch int
Arch string
Summary string
Description string
License string
URL string
Vendor string
GroupName string
Packager string
SourceRPM string
BuildHost string
BuildTime *time.Time
Filename string
PackageSize int64
InstalledSize int64
ArchiveSize int64
CreatedAt time.Time
UpdatedAt time.Time
}
RpmPackage represents an RPM package stored in the rpm_packages table.
type RubyGem ¶
type RubyGem struct {
ID string
RepositoryID string
Name string
Version string
Platform string
Description string
Summary string
Homepage string
Authors []string
Licenses []string
Dependencies []byte // JSON array
MetadataJSON []byte
BlobKey string
ChecksumSHA256 string
Yanked bool
DownloadCount int
CreatedAt time.Time
UpdatedAt time.Time
}
type SAMLConfig ¶
type SAMLConfig struct {
IDPMetadataURL string `json:"idp_metadata_url"`
IDPMetadataXML string `json:"idp_metadata_xml"`
UsernameAttribute string `json:"username_attribute"`
EmailAttribute string `json:"email_attribute"`
NameAttribute string `json:"name_attribute"`
GroupsAttribute string `json:"groups_attribute"`
}
type SBOMReport ¶
type SBOMReport struct {
ID string
RepositoryID string
ArtifactID string
Format string // "cyclonedx" or "spdx"
SpecVersion string // "1.4" or "2.3"
ContentType string
SBOMData map[string]any // for JSON SBOMs (cyclonedx); populated by the API layer from the generator, not persisted directly
SBOMText string // for text SBOMs (spdx); ditto
BlobSHA256 string // sha256 of the blob store object holding the raw SBOM bytes; "" if not (yet) persisted. Set by the caller before CreateSBOMReport; populated on reads via a JOIN with blobs.
BlobSizeBytes int64 // size of that blob; only meaningful together with BlobSHA256, used by CreateSBOMReport to upsert the blobs row
ComponentCount int
GeneratedAt time.Time
CreatedAt time.Time
UpdatedAt time.Time
}
type SBTArtifact ¶
type SSOProvider ¶
type SSOProvider struct {
ID string `json:"id,omitempty"`
Slug string `json:"slug"`
Kind string `json:"kind"`
DisplayName string `json:"display_name"`
Enabled bool `json:"enabled"`
OIDCConfig json.RawMessage `json:"oidc_config,omitempty"`
SAMLConfig json.RawMessage `json:"saml_config,omitempty"`
ClaimMapping json.RawMessage `json:"claim_mapping,omitempty"`
GroupMapping map[string]string `json:"group_mapping,omitempty"`
PermissionMapping map[string]string `json:"permission_mapping,omitempty"`
AutoProvisionUsers bool `json:"auto_provision_users"`
LinkByEmail bool `json:"link_by_email"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type SecretFinding ¶
type SecretFinding struct {
Type string `json:"type"`
Description string `json:"description"`
Severity string `json:"severity"` // low, medium, high, critical
RedactedValue string `json:"redacted_value"`
LineHint string `json:"line_hint"`
}
SecretFinding represents a single secret finding in a scan.
type SecretScanResult ¶
type SecretScanResult struct {
ID string
RepositoryID string
ArtifactID string
ScanStatus string // "pending", "completed", "failed", "clean", "flagged"
Findings []SecretFinding
FindingCount int
Quarantined bool
ScanError string
ScannedAt *time.Time
CreatedAt time.Time
UpdatedAt time.Time
}
SecretScanResult represents a secret scan result for an artifact.
type StorageBackend ¶
type StorageBackend struct {
ID string
Name string
Kind string // filesystem, s3, gcs, azure
IsDefault bool
Config []byte // JSON: type-specific configuration
Status string // ok, degraded, error, unknown
StatusMessage *string
LastCheckedAt *time.Time
CreatedAt time.Time
UpdatedAt time.Time
}
StorageBackend represents a configured storage backend.
type StorageQuota ¶
type StorageQuota struct {
ID string
RepositoryID string
MaxSizeBytes int64
MaxArtifactCount int
WarnThresholdPercent int
CurrentSizeBytes int64
CurrentArtifactCount int
CreatedAt time.Time
UpdatedAt time.Time
}
func (*StorageQuota) IsExceeded ¶
func (q *StorageQuota) IsExceeded() bool
func (*StorageQuota) UsagePercent ¶
func (q *StorageQuota) UsagePercent() float64
type VulnScanResult ¶
type VulnScanResult struct {
ID string
RepositoryID string
ArtifactID string
PackageName string
PackageVersion string
Ecosystem string
Scanner string // "osv", "trivy", "grype"
ScanStatus string // "pending", "scanning", "completed", "failed"
Vulnerabilities []Vulnerability
VulnCount int
CriticalCount int
HighCount int
MediumCount int
LowCount int
Quarantined bool
ScanError string
ScannedAt *time.Time
CreatedAt time.Time
UpdatedAt time.Time
}
VulnScanResult represents a vulnerability scan result for an artifact.
type Vulnerability ¶
type Vulnerability struct {
ID string `json:"id"` // CVE-2021-1234 or GHSA-xxxx
Summary string `json:"summary"`
Severity string `json:"severity"` // CRITICAL, HIGH, MEDIUM, LOW, UNKNOWN
CVSS float64 `json:"cvss"`
FixedIn string `json:"fixed_in"` // version that fixes it
References []string `json:"references"`
PublishedAt string `json:"published_at"`
}
Vulnerability represents a single vulnerability finding.
type Webhook ¶
type Webhook struct {
ID string
RepositoryID string // empty = global
Name string
URL string
SecretEnc string // AES-256-GCM encrypted HMAC signing secret
Enabled bool
Events []string // ["artifact.uploaded", "artifact.deleted", "artifact.downloaded"]
ContentType string
SSLVerify bool
MaxRetries int
TimeoutSeconds int
CreatedAt time.Time
UpdatedAt time.Time
}