mirror

package
v1.5.0-rc11 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MODE_MIRROR
	MODE_LOAD
	MODE_SAVE
	MODE_MIRROR_VALIDATE
	MODE_LOAD_VALIDATE
)
View Source
const (
	SavedTemplateVersion = "v1.1.0"
)

Variables

This section is empty.

Functions

func CompareBuildxManifest

func CompareBuildxManifest(src, dst *DockerBuildxManifest) bool

func CompareBuildxManifests

func CompareBuildxManifests(src, dst []DockerBuildxManifest) bool

Types

type DockerBuildxManifest

type DockerBuildxManifest struct {
	Digest   string               `json:"digest"`
	Platform DockerBuildxPlatform `json:"platform"`
}

type DockerBuildxPlatform

type DockerBuildxPlatform struct {
	Architecture string `json:"architecture,omitempty"`
	OS           string `json:"os,omitempty"`
	Variant      string `json:"variant,omitempty"`
	OsVersion    string `json:"os.version,omitempty"`
}

type Mirror

type Mirror struct {
	Source      string
	Destination string
	Tag         string
	Directory   string
	ArchList    []string
	RepoType    int

	// ImageList line
	Line string

	// ID of the mirrorer
	MID  int
	Mode int
	// contains filtered or unexported fields
}

func LoadSavedTemplates

func LoadSavedTemplates(directory, destReg, proj string) ([]*Mirror, error)

LoadSavedTemplates loads the saved json templates to *Mirror slice

func NewMirror

func NewMirror(opts *MirrorOptions) *Mirror

func (*Mirror) AppendImage

func (m *Mirror) AppendImage(img *image.Image)

func (*Mirror) Copied

func (m *Mirror) Copied() int

Copied method gets the number of copied images

func (*Mirror) DestinationManifestSpec

func (m *Mirror) DestinationManifestSpec() []DockerBuildxManifest

DestinationManifestSpec gets the dest manifest data used by docker-buildx

func (*Mirror) GetSavedImageTemplate

func (m *Mirror) GetSavedImageTemplate() *SavedMirrorTemplate

func (*Mirror) HasArch

func (m *Mirror) HasArch(a string) bool

func (*Mirror) ImageNum

func (m *Mirror) ImageNum() int

func (*Mirror) LoadValidate

func (m *Mirror) LoadValidate() error

func (*Mirror) Loaded

func (m *Mirror) Loaded() int

func (*Mirror) MirrorValidate

func (m *Mirror) MirrorValidate() error

func (*Mirror) Saved

func (m *Mirror) Saved() int

func (*Mirror) SourceManifestSpec

func (m *Mirror) SourceManifestSpec() []DockerBuildxManifest

SourceManifestSpec gets the source manifest data used by docker-buildx

func (*Mirror) Start

func (m *Mirror) Start() error

func (*Mirror) StartLoad

func (m *Mirror) StartLoad() error

func (*Mirror) StartMirror

func (m *Mirror) StartMirror() error

func (*Mirror) StartSave

func (m *Mirror) StartSave() error

type MirrorOptions

type MirrorOptions struct {
	Source      string
	Destination string
	Tag         string
	Directory   string
	ArchList    []string
	Line        string
	Mode        int
	ID          int
}

type SavedImagesTemplate

type SavedImagesTemplate struct {
	Digest    string
	Arch      string
	OS        string
	OsVersion string
	Variant   string
	Folder    string
}

type SavedListTemplate

type SavedListTemplate struct {
	List      []SavedMirrorTemplate
	Version   string
	SavedTime string
}

func NewSavedListTemplate

func NewSavedListTemplate() *SavedListTemplate

func (*SavedListTemplate) Append

func (s *SavedListTemplate) Append(mT *SavedMirrorTemplate)

func (*SavedListTemplate) Has added in v1.5.0

type SavedMirrorTemplate

type SavedMirrorTemplate struct {
	Source   string
	Tag      string
	ArchList []string
	Images   []SavedImagesTemplate
}

Jump to

Keyboard shortcuts

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