basespec

package
v0.2.21 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxKindBytes             = 128
	MaxStorageKeyBytes       = 128
	MaxFingerprintBytes      = 128
	MaxSchemaIDBytes         = 256
	MaxDisplayNameBytes      = 256
	MaxDescriptionBytes      = 16 * 1024
	MaxLogicalNameBytes      = 256
	MaxURIBytes              = 16 * 1024
	MaxVersionBytes          = 256
	MaxSourceGenerationBytes = 1024
	MaxLocatorBytes          = 4096

	MaxLabels                 = 64
	MaxLabelValueBytes        = 256
	MaxConfigBytes            = 1 << 20
	MaxLocalDataBytes         = 1 << 20
	MaxDefinitionBodyBytes    = 4 << 20
	MaxDefinitionBytes        = 16 << 20
	MaxDefinitionDependencies = 4096
	MaxCandidateBytes         = 4 << 20
	MaxScanBytes              = int64(512 << 20)

	DefaultMaxCandidates   = 10_000
	DefaultMaxEntries      = 100_000
	DefaultMaxDepth        = 64
	MaxDiscoveryCandidates = 100_000
	MaxDiscoveryEntries    = 1_000_000
	MaxDiscoveryDepth      = 256
)

Variables

View Source
var (
	ErrClosed              = errors.New("artifact store: closed")
	ErrNotFound            = errors.New("artifact store: not found")
	ErrRootNotFound        = errors.New("artifact store: root not found")
	ErrSourceNotFound      = errors.New("artifact store: source not found")
	ErrAttachmentNotFound  = errors.New("artifact store: attachment not found")
	ErrCollectionNotFound  = errors.New("artifact store: collection not found")
	ErrArtifactNotFound    = errors.New("artifact store: artifact 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")
	ErrProtected           = errors.New("artifact store: protected")
	ErrSuppressed          = errors.New("artifact store: source binding suppressed")
	ErrRetired             = errors.New("artifact store: retired")
)

Functions

func ValidateIdentifier

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

func ValidateIncludePattern added in v0.2.16

func ValidateIncludePattern(pattern string) error

ValidateIncludePattern validates a source-relative glob. It deliberately rejects path traversal and host-path syntax before passing the pattern to path.Match.

func ValidateLabels added in v0.2.17

func ValidateLabels(
	inSubject string,
	values map[string]string,
) error

func ValidateOptionalText

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

func ValidatePortableMetadata added in v0.2.17

func ValidatePortableMetadata(
	logicalName LogicalName,
	logicalVersion LogicalVersion,
	displayName string,
	description string,
	labels map[string]string,
) error

func ValidatePortableName added in v0.2.17

func ValidatePortableName(label, value string) error

func ValidateRequiredText

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

func ValidateSourceGeneration

func ValidateSourceGeneration(value string) error

Types

type DecoderID

type DecoderID string

func (DecoderID) Validate added in v0.2.21

func (v DecoderID) Validate() error

type Locator

type Locator string

func (Locator) Validate added in v0.2.21

func (v Locator) Validate(allowRoot bool) error

func (Locator) ValidatePortable added in v0.2.21

func (v Locator) ValidatePortable(allowRoot bool) error

ValidatePortable applies the platform-independent locator rules used for managed content and portable packages. Platform-specific filename mapping and collision handling belong to the storage implementation.

Generic Source locators can describe an existing platform-specific Source. Portable locators remain bounded slash-separated relative references.

type LogicalName

type LogicalName string

func (LogicalName) Validate added in v0.2.21

func (v LogicalName) Validate() error

type LogicalVersion

type LogicalVersion string

func (LogicalVersion) Validate added in v0.2.21

func (v LogicalVersion) Validate(optional bool) error

type StorageKey added in v0.2.17

type StorageKey string

func (StorageKey) Validate added in v0.2.21

func (v StorageKey) Validate() error

type SubresourceLocator

type SubresourceLocator string

func (SubresourceLocator) Validate added in v0.2.21

func (v SubresourceLocator) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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