dockerhub

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const SERVICE_BASE string = "https://registry-1.docker.io"

Variables

This section is empty.

Functions

func CleanPath

func CleanPath(path string) string

CleanPath makes a path safe for use with filepath.Join. This is done by not only cleaning the path, but also (if the path is relative) adding a leading '/' and cleaning it (then removing the leading '/'). This ensures that a path resulting from prepending another path will always resolve to lexically be a subdirectory of the prefixed path. This is all done lexically, so paths that include symlinks won't be safe as a result of using CleanPath.

This function comes from runC (libcontainer/utils/utils.go).

func DecodeSpecifier added in v0.2.2

func DecodeSpecifier(specifier string) (c repointerface.Constraint, err error)

func GetEnvs added in v0.2.3

func GetEnvs(name string, tag string, serviceBase string) (envs map[string]string, err error)

func GetImage added in v0.2.3

func GetImage(name string, digest string, rootFs string, serviceBase string) (config []byte, err error)

func GetTags added in v0.2.3

func GetTags(name string, serviceBase string) (tags []string, err error)

func NameNormalizer added in v0.2.2

func NameNormalizer(name string) (normalized string)

Types

type Blob

type Blob struct {
	MediaType string `json:"mediaType"`
	Digest    string `json:"digest"`
	Size      int    `json:"size"`
}

type Env

type Env struct {
	Os           string `json:"os"`           // e.g. "linux"
	Architecture string `json:"architecture"` // e.g. "386", "amd64", "arm64", "arm", "mips64le", "ppc64le", "riscv64", "s390x"
	Variant      string `json:"variant"`      // e.g. ("arm"-)"v5", "v6", "v7" ("arm64"-) "v8"
}

func (Env) String

func (p Env) String() string

type EnvSpec added in v0.2.2

type EnvSpec struct {
	Arch string `json:"arch"`
}

func DecodeEnvSpec added in v0.2.2

func DecodeEnvSpec(s string) (es EnvSpec, err error)

func (EnvSpec) Encode added in v0.2.2

func (es EnvSpec) Encode() string

type Manifest

type Manifest struct {
	SchemaVersion int    `json:"schemaVersion"`
	MediaType     string `json:"mediaType"`
	Config        Blob   `json:"config"`
	Layers        []Blob `json:"layers"`
}

type Repo

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

func (*Repo) Fabricate

func (r *Repo) Fabricate(name string, version repointerface.Version, envs []string, dstDir string) (prefabPaths []string, blueprintPaths []string, fileType string, err error)

func (*Repo) FilterEnv added in v0.2.2

func (r *Repo) FilterEnv(envs []string) (selected []string)

func (*Repo) GetEnvSpec added in v0.2.2

func (r *Repo) GetEnvSpec() repointerface.EnvSpec

func (*Repo) GetEnvs

func (r *Repo) GetEnvs(name string, version repointerface.Version) (envs []string, err error)

func (*Repo) GetVersions

func (r *Repo) GetVersions(name string) (versions []repointerface.Version, err error)

func (*Repo) Init

func (r *Repo) Init(ctx *dcontext.DeployContext) (err error)

func (*Repo) SelectEnv added in v0.2.2

func (r *Repo) SelectEnv(envs []string, envSpec repointerface.EnvSpec) (selected string, err error)

func (*Repo) SelectVersion added in v0.2.2

func (r *Repo) SelectVersion(versions []repointerface.Version) (selected repointerface.Version, err error)

type Version added in v0.2.2

type Version string

func ParseVersion added in v0.2.2

func ParseVersion(version string) (ver Version, err error)

func (Version) Compare added in v0.2.2

func (a Version) Compare(other repointerface.Version) (result int)

func (Version) String added in v0.2.2

func (v Version) String() string

Jump to

Keyboard shortcuts

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