repository

package
v1.0.64 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const RefSpec = "[REGISTRY[:PORT]/]REPOSITORY[:TAG|=TAG1,TAG2,TAGn|~/FILTER_REGEXP/]"

RefSpec is a description of a valid registry specification

Variables

View Source
var InsecureRegistryEx = `^(127\..*|::1|localhost)(:[0-9]+)?$`

InsecureRegistryEx contains a regex string to match insecure registries

Functions

func GetRegistry

func GetRegistry(ref string) string

GetRegistry extracts registry address from the repository reference

Types

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

Repository represents parsed repository reference

func ParseRef

func ParseRef(ref string) (*Repository, error)

ParseRef takes a string repository reference and transforms into a Repository

func ParseRefs

func ParseRefs(refs []string) ([]*Repository, error)

ParseRefs is a shorthand for ParseRef to parse multiple repository references at once

func (*Repository) Filter

func (r *Repository) Filter() string

Filter gives us a string form of /FILTER/ regexp we use to match repository tags

func (*Repository) Full

func (r *Repository) Full() string

Full gives us repository in form REGISTRY[:PORT]/REPOSITORY

func (*Repository) HasFilter

func (r *Repository) HasFilter() bool

HasFilter tells us if we've specified /FILTER/ regexp to match tags for this repository

func (*Repository) HasTags

func (r *Repository) HasTags() bool

HasTags tells us if we've specified some concrete tags for this repository

func (*Repository) IsDefaultRegistry

func (r *Repository) IsDefaultRegistry() bool

IsDefaultRegistry tells us if we use default registry (DockerHub)

func (*Repository) IsSecure

func (r *Repository) IsSecure() bool

IsSecure tells us if we will use secure connection for this repository

func (*Repository) IsSingle

func (r *Repository) IsSingle() bool

IsSingle tells us if we created repo from "refWithSingleTag" reference

func (*Repository) MatchTag

func (r *Repository) MatchTag(tag string) bool

MatchTag matches passed tag against repository tag and filter specification

func (*Repository) Name

func (r *Repository) Name() string

Name is same as full but cuts leading REGISTRY[:PORT]/ if we use default registry (DockerHub)

func (*Repository) Path

func (r *Repository) Path() string

Path gives us remote repository path on the registry e.g. "library/alpine"

func (*Repository) PushPrefix

func (r *Repository) PushPrefix() string

PushPrefix generates prefix path for repository in a "push" registry

func (*Repository) Ref

func (r *Repository) Ref() string

Ref gets original repository reference

func (*Repository) Registry

func (r *Repository) Registry() string

Registry gets registry ADDR[:PORT]

func (*Repository) Tags

func (r *Repository) Tags() []string

Tags gives us list of repository tags we use

func (*Repository) WebSchema

func (r *Repository) WebSchema() string

WebSchema gives us HTTP protocol we will use to connect to repository

Jump to

Keyboard shortcuts

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