artifactstore

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: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DigestSHA256Prefix = "sha256:"

	MaxKindBytes              = 128
	MaxSchemaIDBytes          = 256
	MaxDisplayNameBytes       = 256
	MaxDescriptionBytes       = 16 * 1024
	MaxLogicalNameBytes       = 256
	MaxVersionBytes           = 256
	MaxSourceGenerationBytes  = 1024
	MaxLocatorBytes           = 4096
	MaxDiagnosticCodeBytes    = 128
	MaxDiagnosticMessageBytes = 4096
	MaxDiagnostics            = 128
	MaxLabels                 = 64
	MaxLabelValueBytes        = 256
	MaxConfigBytes            = 1 << 20
	MaxLocalDataBytes         = 1 << 20
	MaxDefinitionBodyBytes    = 4 << 20
	MaxCandidateBytes         = 4 << 20
	MaxScanBytes              = int64(512 << 20)
	DefaultMaxCandidates      = 10_000
	DefaultMaxEntries         = 100_000
	DefaultMaxDepth           = 64
)

Variables

View Source
var (
	ErrClosed              = errors.New("artifact store: closed")
	ErrNotFound            = errors.New("artifact store: not found")
	ErrConflict            = errors.New("artifact store: conflict")
	ErrInvalid             = errors.New("artifact store: invalid")
	ErrUnsupported         = errors.New("artifact store: unsupported")
	ErrSourceUnavailable   = errors.New("artifact store: source unavailable")
	ErrDefinitionNotFound  = errors.New("artifact store: definition not found")
	ErrDigestMismatch      = errors.New("artifact store: digest mismatch")
	ErrCatalogUnavailable  = errors.New("artifact store: catalog unavailable")
	ErrCatalogStale        = errors.New("artifact store: catalog stale")
	ErrDecoderUnavailable  = errors.New("artifact store: decoder unavailable")
	ErrAmbiguousDecoder    = errors.New("artifact store: ambiguous decoder")
	ErrReferenceUnresolved = errors.New("artifact store: reference unresolved")
)

Functions

func ContainsErrorDiagnostic added in v0.2.10

func ContainsErrorDiagnostic(values []Diagnostic) bool

func EqualDiagnostics added in v0.2.10

func EqualDiagnostics(left, right []Diagnostic) bool

func ValidateArtifactKind added in v0.2.10

func ValidateArtifactKind(value ArtifactKind) error

func ValidateAttachmentRole added in v0.2.10

func ValidateAttachmentRole(value AttachmentRole) error

func ValidateDecoderID added in v0.2.10

func ValidateDecoderID(value DecoderID) error

func ValidateDiagnostics added in v0.2.10

func ValidateDiagnostics(values []Diagnostic) error

func ValidateDigest added in v0.2.10

func ValidateDigest(value Digest) error

func ValidateIdentifier added in v0.2.10

func ValidateIdentifier(label, value string, maximum int) error

func ValidateLocator added in v0.2.10

func ValidateLocator(value Locator, allowRoot bool) error

func ValidateLogicalName added in v0.2.10

func ValidateLogicalName(value LogicalName) error

func ValidateLogicalVersion added in v0.2.10

func ValidateLogicalVersion(value LogicalVersion, optional bool) error

func ValidateOptionalText added in v0.2.10

func ValidateOptionalText(label, value string, maximum int) error

func ValidateRecordID added in v0.2.10

func ValidateRecordID(value RecordID) error

func ValidateRequiredText added in v0.2.10

func ValidateRequiredText(label, value string, maximum int) error

func ValidateRootID added in v0.2.10

func ValidateRootID(value RootID) error

func ValidateRootKind added in v0.2.10

func ValidateRootKind(value RootKind) error

func ValidateSchemaID added in v0.2.10

func ValidateSchemaID(value SchemaID) error

func ValidateSourceGeneration added in v0.2.10

func ValidateSourceGeneration(value string) error

func ValidateSourceID added in v0.2.10

func ValidateSourceID(value SourceID) error

func ValidateSourceKind added in v0.2.10

func ValidateSourceKind(value SourceKind) error

func ValidateSubresourceLocator added in v0.2.10

func ValidateSubresourceLocator(value SubresourceLocator) error

func ValidateUUIDv7 added in v0.2.10

func ValidateUUIDv7(label, value string) error

Types

type ArtifactKind added in v0.2.10

type ArtifactKind string

type AttachmentRole added in v0.2.10

type AttachmentRole string

type Clock added in v0.2.10

type Clock interface {
	Now() time.Time
}

type DecoderID added in v0.2.10

type DecoderID string

type Diagnostic added in v0.2.10

type Diagnostic struct {
	Severity DiagnosticSeverity  `json:"severity"`
	Code     string              `json:"code"`
	Message  string              `json:"message"`
	Location *DiagnosticLocation `json:"location,omitempty"`
}

func AppendDiagnostics added in v0.2.10

func AppendDiagnostics(
	current []Diagnostic,
	incoming ...Diagnostic,
) []Diagnostic

func CloneDiagnostics added in v0.2.10

func CloneDiagnostics(values []Diagnostic) []Diagnostic

func (Diagnostic) Validate added in v0.2.10

func (d Diagnostic) Validate() error

type DiagnosticLocation added in v0.2.10

type DiagnosticLocation struct {
	Locator            Locator            `json:"locator,omitempty"`
	SubresourceLocator SubresourceLocator `json:"subresourceLocator,omitempty"`
	Line               int                `json:"line,omitempty"`
	Column             int                `json:"column,omitempty"`
}

type DiagnosticSeverity added in v0.2.10

type DiagnosticSeverity string
const (
	DiagnosticError   DiagnosticSeverity = "error"
	DiagnosticWarning DiagnosticSeverity = "warning"
	DiagnosticInfo    DiagnosticSeverity = "info"
)

type Digest added in v0.2.10

type Digest string

func DigestBytes added in v0.2.10

func DigestBytes(content []byte) Digest

DigestBytes returns the canonical SHA-256 digest representation used by the artifact store for arbitrary immutable content.

type IDGenerator added in v0.2.10

type IDGenerator interface {
	NewID(ctx context.Context) (string, error)
}

type Locator added in v0.2.10

type Locator string

type LogicalName added in v0.2.10

type LogicalName string

type LogicalVersion added in v0.2.10

type LogicalVersion string

type RecordID added in v0.2.10

type RecordID string

type RootID added in v0.2.10

type RootID string

type RootKind added in v0.2.10

type RootKind string

type SchemaID added in v0.2.10

type SchemaID string

type SourceID added in v0.2.10

type SourceID string

type SourceKind added in v0.2.10

type SourceKind string

type SubresourceLocator added in v0.2.10

type SubresourceLocator string

type SystemClock added in v0.2.10

type SystemClock struct{}

func (SystemClock) Now added in v0.2.10

func (SystemClock) Now() time.Time

type UUIDv7Generator added in v0.2.10

type UUIDv7Generator struct{}

func (UUIDv7Generator) NewID added in v0.2.10

func (UUIDv7Generator) NewID(ctx context.Context) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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