models

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package models holds all models defined in the Cupdate API specification.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventType

type EventType string
const (
	EventTypeImageUpdated             EventType = "imageUpdated"
	EventTypeImageProcessed           EventType = "imageProcessed"
	EventTypeImageNewVersionAvailable EventType = "imageNewVersionAvailable"
)

type Graph

type Graph struct {
	Edges map[string]map[string]bool `json:"edges"`
	Nodes map[string]GraphNode       `json:"nodes"`
}

type GraphNode

type GraphNode struct {
	Domain         string            `json:"domain"`
	Type           string            `json:"type"`
	Name           string            `json:"name"`
	Labels         map[string]string `json:"labels,omitempty"`
	InternalLabels map[string]string `json:"internalLabels,omitempty"`
}

type Image

type Image struct {
	Reference           string      `json:"reference"`
	Created             *time.Time  `json:"created,omitempty"`
	LatestReference     string      `json:"latestReference,omitempty"`
	LatestCreated       *time.Time  `json:"latestCreated,omitempty"`
	VersionDiffSortable uint64      `json:"-"`
	Description         string      `json:"description,omitempty"`
	Tags                []string    `json:"tags"`
	Links               []ImageLink `json:"links"`
	Vulnerabilities     int         `json:"vulnerabilities"`
	LastModified        time.Time   `json:"lastModified"`
	Image               string      `json:"image,omitempty"`
}

type ImageDescription

type ImageDescription struct {
	HTML     string `json:"html,omitempty"`
	Markdown string `json:"markdown,omitempty"`
}

type ImageEvent

type ImageEvent struct {
	Reference string    `json:"reference"`
	Type      EventType `json:"type"`
}
type ImageLink struct {
	Type string `json:"type"`
	URL  string `json:"url"`
}

type ImagePage

type ImagePage struct {
	Images     []Image            `json:"images"`
	Summary    ImagePageSummary   `json:"summary"`
	Pagination PaginationMetadata `json:"pagination"`
}

type ImagePageSummary

type ImagePageSummary struct {
	Images     int `json:"images"`
	Outdated   int `json:"outdated"`
	Vulnerable int `json:"vulnerable"`
	Processing int `json:"processing"`
	Failed     int `json:"failed"`
}

type ImageProvenance added in v0.20.0

type ImageProvenance struct {
	BuildInfo []ProvenanceBuildInfo `json:"buildInfo"`
}

type ImageReleaseNotes

type ImageReleaseNotes struct {
	Title    string    `json:"title"`
	HTML     string    `json:"html,omitempty"`
	Markdown string    `json:"markdown,omitempty"`
	Released time.Time `json:"released,omitempty"`
}

type ImageSBOM added in v0.20.0

type ImageSBOM struct {
	SBOM []SBOM `json:"sbom"`
}

type ImageScorecard added in v0.18.0

type ImageScorecard struct {
	ReportURL  string             `json:"reportUrl"`
	Score      float32            `json:"score"`
	Risk       ImageScorecardRisk `json:"risk"`
	GenerateAt time.Time          `json:"generatedAt"`
}

type ImageScorecardRisk added in v0.18.0

type ImageScorecardRisk string
const (
	ImageScorecardRiskCritical ImageScorecardRisk = "critical"
	ImageScorecardRiskHigh     ImageScorecardRisk = "high"
	ImageScorecardRiskMedium   ImageScorecardRisk = "medium"
	ImageScorecardRiskLow      ImageScorecardRisk = "low"
)

type ImageVulnerability

type ImageVulnerability = osv.Vulnerability

type JobRun added in v0.17.0

type JobRun struct {
	Result          JobRunResult `json:"result"`
	Steps           []StepRun    `json:"steps"`
	DependsOn       []string     `json:"dependsOn"`
	JobID           string       `json:"jobId,omitempty"`
	JobName         string       `json:"jobName,omitempty"`
	Started         time.Time    `json:"started,omitempty"`
	DurationSeconds float64      `json:"duration,omitempty"`
}

type JobRunResult added in v0.17.0

type JobRunResult string
const (
	JobRunResultSucceeded JobRunResult = "succeeded"
	JobRunResultSkipped   JobRunResult = "skipped"
	JobRunResultFailed    JobRunResult = "failed"
)

type PaginationMetadata

type PaginationMetadata struct {
	Total int `json:"total"`
	// Page index. Starts at 1.
	Page     int    `json:"page"`
	Size     int    `json:"size"`
	Next     string `json:"next,omitempty"`
	Previous string `json:"previous,omitempty"`
}

type ProvenanceBuildInfo added in v0.20.0

type ProvenanceBuildInfo struct {
	ImageDigest         string            `json:"imageDigest"`
	Architecture        string            `json:"architecture,omitempty"`
	ArchitectureVariant string            `json:"architectureVariant,omitempty"`
	OperatingSystem     string            `json:"operatingSystem,omitempty"`
	Source              string            `json:"source,omitempty"`
	SourceRevision      string            `json:"sourceRevision,omitempty"`
	BuildStartedOn      time.Time         `json:"buildStartedOn,omitempty"`
	BuildFinishedOn     time.Time         `json:"buildFinishedOn,omitempty"`
	Dockerfile          string            `json:"dockerfile,omitempty"`
	BuildArguments      map[string]string `json:"buildArguments,omitempty"`
}

type RawImage

type RawImage struct {
	Reference     string    `json:"reference"`
	Tags          []string  `json:"tags"`
	Graph         Graph     `json:"graph"`
	LastProcessed time.Time `json:"lastProcessed,omitempty"`
}

type SBOM added in v0.20.0

type SBOM struct {
	ImageDigest         string `json:"imageDigest"`
	Type                string `json:"type"`
	SBOM                string `json:"sbom"`
	Architecture        string `json:"architecture,omitempty"`
	ArchitectureVariant string `json:"architectureVariant,omitempty"`
	OperatingSystem     string `json:"operatingSystem,omitempty"`
}

type StepRun added in v0.17.0

type StepRun struct {
	Result          StepRunResult `json:"result"`
	StepName        string        `json:"stepName,omitempty"`
	Started         time.Time     `json:"started,omitempty"`
	DurationSeconds float64       `json:"duration,omitempty"`
	Error           string        `json:"error,omitempty"`
}

type StepRunResult added in v0.17.0

type StepRunResult string
const (
	StepRunResultSucceeded StepRunResult = "succeeded"
	StepRunResultSkipped   StepRunResult = "skipped"
	StepRunResultFailed    StepRunResult = "failed"
)

type WorkflowRun added in v0.17.0

type WorkflowRun struct {
	TraceID         string            `json:"traceId"`
	Started         time.Time         `json:"started"`
	DurationSeconds float64           `json:"duration"`
	Result          WorkflowRunResult `json:"result"`
	Jobs            []JobRun          `json:"jobs"`
}

type WorkflowRunResult added in v0.17.0

type WorkflowRunResult string
const (
	WorkflowRunResultSucceeded WorkflowRunResult = "succeeded"
	WorkflowRunResultFailed    WorkflowRunResult = "failed"
)

Jump to

Keyboard shortcuts

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