referenceutil

package
v1.7.7 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDockerRef

func ParseDockerRef(rawRef string) (refdocker.Named, error)

ParseDockerRef parses the passed reference with assuming it's a docker reference.

func ParseIPFSRefWithScheme

func ParseIPFSRefWithScheme(name string) (scheme, ref string, err error)

ParseIPFSRefWithScheme parses the passed reference with assuming it's an IPFS reference with scheme prefix.

func SuggestContainerName added in v0.16.0

func SuggestContainerName(rawRef, containerID string) string

SuggestContainerName generates a container name from name. The result MUST NOT be parsed.

Types

type Reference

type Reference interface {

	// String returns the full reference which can be understood by containerd.
	String() string
}

Reference is a reference to an image.

func ParseAny

func ParseAny(rawRef string) (Reference, error)

ParseAny parses the passed reference with allowing it to be non-docker reference. If the ref has IPFS scheme or can be parsed as CID, it's parsed as an IPFS reference. Otherwise it's parsed as a docker reference.

Jump to

Keyboard shortcuts

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