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

diff

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTypeNone                 = EventType("")
	EventTypeDescriptorMismatch   = EventType("DescriptorMismatch")
	EventTypeIndexBlobMismatch    = EventType("IndexBlobMismatch")
	EventTypeManifestBlobMismatch = EventType("ManifestBlobMismatch")
	EventTypeConfigBlobMismatch   = EventType("ConfigBlobMismatch")
	EventTypeLayerBlobMismatch    = EventType("LayerBlobMismatch")
	EventTypeTarEntryMismatch     = EventType("TarEntryMismatch")
)
View Source
const (
	ReportDirReadmeMD   = "README.md"
	ReportDirReportJSON = "report.json"
	ReportDirInput0     = "input-0"
	ReportDirInput1     = "input-1"
)
View Source
const ReportDirReadmeMDContent = `` /* 145-byte string literal not displayed */

Variables

View Source
var DefaultEventHandler = NewDefaultEventHandler(os.Stdout)
View Source
var VerboseEventHandler = newVerboseEventHandler()

Functions

This section is empty.

Types

type Event

type Event struct {
	Type   EventType     `json:"type,omitempty"`
	Inputs [2]EventInput `json:"inputs,omitempty"`
	Diff   string        `json:"diff,omitempty"` // Not machine-parsable
	Note   string        `json:"note,omitempty"` // Not machine-parsable
}

func (*Event) String

func (ev *Event) String() string

String implements fmt.Stringer. The returned string is not machine-parsable.

type EventHandler

type EventHandler interface {
	HandleEventTreeNode(context.Context, *EventTreeNode) error
}

EventHandler handles an event. EventHandler blocks.

func NewDefaultEventHandler

func NewDefaultEventHandler(w io.Writer) EventHandler

type EventInput

type EventInput struct {
	Descriptor *ocispec.Descriptor `json:"descriptor,omitempty"`
	Index      *ocispec.Index      `json:"index,omitempty"`
	Manifest   *ocispec.Manifest   `json:"manifest,omitempty"`
	Config     *ocispec.Image      `json:"config,omitempty"`
	TarEntry   *TarEntry           `json:"tarEntry,omitempty"`
}

type EventTreeNode

type EventTreeNode struct {
	Context      string `json:"context"` // Not unique
	Event        `json:"event"`
	Children     []*EventTreeNode `json:"children,omitempty"`
	sync.RWMutex `json:"-"`
}

func Diff

func (*EventTreeNode) Append

func (n *EventTreeNode) Append(newNode *EventTreeNode)

type EventType

type EventType string

type Flusher

type Flusher interface {
	Flush() error
}

type IgnoranceOptions

type IgnoranceOptions struct {
	IgnoreHistory               bool
	IgnoreFileOrder             bool
	IgnoreFileModeRedundantBits bool
	IgnoreFileTimestamps        bool
	IgnoreImageTimestamps       bool
	IgnoreImageName             bool
	IgnoreTarFormat             bool
	CanonicalPaths              bool
}

type Options

type Options struct {
	IgnoranceOptions
	EventHandler
	ReportFile string
	ReportDir  string
	MaxScale   float64
}

type TarEntry

type TarEntry struct {
	Index  int           `json:"index"`
	Header *tar.Header   `json:"header,omitempty"`
	Digest digest.Digest `json:"digest,omitempty"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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