sync

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OrasArtifact = "orasArtifact"
	OCIReference = "ociReference"
)
View Source
const (
	SyncBlobUploadDir = ".sync"
)

Variables

This section is empty.

Functions

func OneImage

func OneImage(ctx context.Context, cfg Config, storeController storage.StoreController,
	repo, reference string, artifactType string, log log.Logger,
) error

func Run

func Run(ctx context.Context, cfg Config,
	storeController storage.StoreController,
	wtgrp *goSync.WaitGroup, logger log.Logger,
) error

func StripRegistryTransport added in v1.3.8

func StripRegistryTransport(url string) string

sync needs transport to be stripped to not be wrongly interpreted as an image reference at a non-fully qualified registry (hostname as image and port as tag).

func TypeOf added in v1.4.2

func TypeOf(v interface{}) string

Types

type Config

type Config struct {
	Enable          *bool
	CredentialsFile string
	Registries      []RegistryConfig
}

type Content

type Content struct {
	Prefix      string
	Tags        *Tags
	Destination string `mapstructure:",omitempty"`
	StripPrefix bool
}

type Credentials

type Credentials struct {
	Username string
	Password string
}

type CredentialsFile

type CredentialsFile map[string]Credentials

key is registry address.

type ReferenceList added in v1.3.8

type ReferenceList struct {
	References []artifactspec.Descriptor `json:"references"`
}

type RegistryConfig

type RegistryConfig struct {
	URLs         []string
	PollInterval time.Duration
	Content      []Content
	TLSVerify    *bool
	OnDemand     bool
	CertDir      string
	MaxRetries   *int
	RetryDelay   *time.Duration
	OnlySigned   *bool
}

type RepoReferences added in v1.4.3

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

type Tags

type Tags struct {
	Regex  *string
	Semver *bool
}

Jump to

Keyboard shortcuts

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