print

package
v0.0.0-...-fc78dae Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package print implements the pretty printing of OCI artifacts

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All(ctx context.Context, out io.Writer, storage content.ReadOnlyGraphStorage, node ocispec.Descriptor, options Options) error

All will print the successors an predecessors of the given descriptor.

func Bytes

func Bytes(bytes int64) string

Bytes formats the bytes in a human readable way. It must be positive.

func Predecessors

func Predecessors(ctx context.Context, out io.Writer, storage content.ReadOnlyGraphStorage, desc ocispec.Descriptor, options Options) error

Predecessors the successors of the given descriptor.

func ShortDigest

func ShortDigest(d digest.Digest) string

ShortDigest returns a compact representation of a digest (dropping information for brevity).

func Successors

func Successors(ctx context.Context, out io.Writer, fetcher content.Fetcher, desc ocispec.Descriptor, options Options) error

Successors the successors of the given descriptor.

Types

type Options

type Options struct {
	Prefix string
	Depth  int

	DisableBlobs    bool
	ShortDigests    bool
	ShowAnnotations bool

	OnlyReferrers bool   // only used by predecessors
	ArtifactType  string // used when OnlyReferrers is true
}

Options for the printer.

Jump to

Keyboard shortcuts

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