Help us shape the future of Go! Take the 2026 Go Developer Survey

artifacts

package
v0.0.114 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExternalRef

type ExternalRef struct {
	URL    string `json:"url"`
	Expand bool   `json:"expand,omitempty"`
}

type Ref

type Ref struct {
	Kind     RefKind         `json:"kind"`
	Name     string          `json:"name,omitempty"`
	Stored   *StoredRef      `json:"stored,omitempty"`
	External *ExternalRef    `json:"external,omitempty"`
	Format   string          `json:"format,omitempty"`
	Value    json.RawMessage `json:"value,omitempty"`
}

func NewExternalRef

func NewExternalRef(name string, url string, expand bool) Ref

func NewStoredRef

func NewStoredRef(key jobdb.ArtifactKey) Ref

func ParseValue added in v0.0.111

func ParseValue(value any) (Ref, bool, error)

ParseValue recognizes only the explicit discriminator at an artifact boundary. RawMessage preserves null versus missing and keeps resolved content opaque.

func RefFromArtifact

func RefFromArtifact(artifact jobdb.Artifact) (Ref, error)

func (*Ref) DecodeFromMap added in v0.0.111

func (r *Ref) DecodeFromMap(value any) error

DecodeFromMap supports typed op inputs through the existing map decoder.

func (Ref) Identity

func (r Ref) Identity() string

func (Ref) IsZero

func (r Ref) IsZero() bool

func (Ref) NameValue

func (r Ref) NameValue() string

func (Ref) SizeBytes

func (r Ref) SizeBytes() int64

func (Ref) StoredKey

func (r Ref) StoredKey() (jobdb.ArtifactKey, bool)

func (Ref) Validate

func (r Ref) Validate() error

func (Ref) ValueBytes added in v0.0.111

func (r Ref) ValueBytes() ([]byte, error)

ValueBytes serializes a resolved value without evaluating document contents.

type RefKind

type RefKind string
const (
	RefKindStored   RefKind = "stored"
	RefKindExternal RefKind = "external"
	RefKindValue    RefKind = "value"
	// RefKindAttached names a file attached to the containing job result.
	// Child-result readers replace it with the artifact's stored reference.
	RefKindAttached RefKind = "attached"
)

type StoredRef

type StoredRef struct {
	Key jobdb.ArtifactKey `json:"key"`
}

Jump to

Keyboard shortcuts

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