dockerparser

package module
v0.0.0-...-b3f122c Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

README

Documentation

docker-parser

A library to parse docker's image identifier.

NOTE: This library is a rewrite and a subset of docker codebase.

Docker source reference

  • docker/image.go: github.com/docker/docker/image/v1/imagev1.go
  • docker/reference.go: github.com/docker/docker/reference/reference.go
  • distribution/digest/digest.go: github.com/docker/distribution/digest/digest.go
  • distribution/digest/digester.go: github.com/docker/distribution/digest/digester.go
  • distribution/reference/reference.go: github.com/docker/distribution/reference/reference.go
  • distribution/reference/regex.go: github.com/docker/distribution/reference/regex.go

Versioning or Vendoring

Expect compatibility break from this library. Copy and/or Fork are highly recommended.

License

This is Free Software, released under the Apache License, Version 2.0. See LICENSE for the full license text.

Docker source are licensed under the Apache License, Version 2.0.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reference

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

Reference is an opaque object that include identifier such as a name, tag, repository, registry, etc...

func Parse

func Parse(remote string) (*Reference, error)

Parse returns a Reference from analyzing the given remote identifier.

func (Reference) Name

func (r Reference) Name() string

Name returns the image's name. (ie: debian[:8.2])

func (Reference) Registry

func (r Reference) Registry() string

Registry returns the image's registry. (ie: host[:port])

func (Reference) Remote

func (r Reference) Remote() string

Remote returns the image's remote identifier. (ie: registry/name[:tag])

func (Reference) Repository

func (r Reference) Repository() string

Repository returns the image's repository. (ie: registry/name)

func (Reference) ShortName

func (r Reference) ShortName() string

ShortName returns the image's name (ie: debian)

func (Reference) Tag

func (r Reference) Tag() string

Tag returns the image's tag (or digest).

Directories

Path Synopsis
distribution
reference
Package reference provides a general type to represent any way of referencing images within the registry.
Package reference provides a general type to represent any way of referencing images within the registry.

Jump to

Keyboard shortcuts

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