ref

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: Apache-2.0 Imports: 3 Imported by: 22

Documentation

Overview

Package ref is used to define references References default to remote registry references (registry:port/repo:tag) Schemes can be included in front of the reference for different reference types

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EqualRegistry

func EqualRegistry(a, b Ref) bool

EqualRegistry compares the registry between two references

func EqualRepository

func EqualRepository(a, b Ref) bool

EqualRepository compares the repository between two references

Types

type Ref

type Ref struct {
	Scheme     string
	Reference  string // unparsed string
	Registry   string // server, host:port
	Repository string // path on server
	Tag        string
	Digest     string
	Path       string
}

Ref reference to a registry/repository If the tag or digest is available, it's also included in the reference. Reference itself is the unparsed string. While this is currently a struct, that may change in the future and access to contents should not be assumed/used.

func New

func New(parse string) (Ref, error)

New returns a reference based on the scheme, defaulting to a

func (Ref) CommonName

func (r Ref) CommonName() string

CommonName outputs a parsable name from a reference

Jump to

Keyboard shortcuts

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