catalog

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SortOccurrences

func SortOccurrences(values []Occurrence)

Types

type Occurrence

type Occurrence struct {
	RootID              artifactstore.RootID         `json:"rootID"`
	Key                 OccurrenceKey                `json:"key"`
	Kind                artifactstore.ArtifactKind   `json:"kind,omitempty"`
	LogicalName         artifactstore.LogicalName    `json:"logicalName,omitempty"`
	LogicalVersion      artifactstore.LogicalVersion `json:"logicalVersion,omitempty"`
	DefinitionDigest    *artifactstore.Digest        `json:"definitionDigest,omitempty"`
	SourceContentDigest *artifactstore.Digest        `json:"sourceContentDigest,omitempty"`
	DecoderID           artifactstore.DecoderID      `json:"decoderID,omitempty"`
	State               OccurrenceState              `json:"state"`
	Diagnostics         []artifactstore.Diagnostic   `json:"diagnostics,omitempty"`
	ObservedAt          time.Time                    `json:"observedAt"`
}

func CloneOccurrence

func CloneOccurrence(input Occurrence) Occurrence

CloneOccurrence returns an owned copy of an occurrence and all mutable members.

func (Occurrence) Validate

func (o Occurrence) Validate() error

type OccurrenceKey

type OccurrenceKey struct {
	SourceID           artifactstore.SourceID           `json:"sourceID"`
	Locator            artifactstore.Locator            `json:"locator"`
	SubresourceLocator artifactstore.SubresourceLocator `json:"subresourceLocator,omitempty"`
}

func (OccurrenceKey) Validate

func (k OccurrenceKey) Validate() error

type OccurrenceState

type OccurrenceState string
const (
	OccurrenceValid   OccurrenceState = "valid"
	OccurrenceInvalid OccurrenceState = "invalid"
	OccurrenceMissing OccurrenceState = "missing"
)

type Reader

type Reader interface {
	GetCurrent(
		ctx context.Context,
		rootID artifactstore.RootID,
	) (Snapshot, error)
}

type Snapshot

type Snapshot struct {
	RootID            artifactstore.RootID              `json:"rootID"`
	Revision          uint64                            `json:"revision"`
	RootRevision      uint64                            `json:"rootRevision"`
	SourceRevisions   map[artifactstore.SourceID]uint64 `json:"sourceRevisions"`
	SourceGenerations map[artifactstore.SourceID]string `json:"sourceGenerations"`
	PublishedAt       time.Time                         `json:"publishedAt"`
	Diagnostics       []artifactstore.Diagnostic        `json:"diagnostics,omitempty"`
	Occurrences       []Occurrence                      `json:"occurrences"`
}

func CloneSnapshot

func CloneSnapshot(input Snapshot) Snapshot

CloneSnapshot returns an owned copy of a snapshot and all mutable members.

func (Snapshot) Validate

func (s Snapshot) Validate() error

Jump to

Keyboard shortcuts

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