Documentation
¶
Index ¶
- Constants
- Variables
- type Artifact
- type ArtifactType
- type Config
- type CredentialsConfig
- type ErrorHook
- type File
- type FileStat
- type HelmOCIConfig
- type Package
- type PackageFiles
- type RegistryConfig
- type RegistryInfo
- type RegistryMapping
- type RegistryType
- type Repository
- type Status
- type TransferStats
- type TreeNode
- type Version
Constants ¶
View Source
const ( ChartLayerMediaType = "application/vnd.cncf.helm.chart.layer.v1.tar+gzip" ConfigMediaType = "application/vnd.cncf.helm.config.v1+json" )
Variables ¶
View Source
var ( ErrUnsupportedRegistryType = errors.New("unsupported ar type") ErrArtifactNotFound = errors.New("artifact not found") ErrRegistryNotFound = errors.New("ar not found") ErrInvalidCredentials = errors.New("invalid credentials") )
Common errors
Functions ¶
This section is empty.
Types ¶
type ArtifactType ¶
type ArtifactType string
var ( DOCKER ArtifactType = "DOCKER" HELM ArtifactType = "HELM" HELM_LEGACY ArtifactType = "HELM_LEGACY" GENERIC ArtifactType = "GENERIC" PYTHON ArtifactType = "PYTHON" MAVEN ArtifactType = "MAVEN" NPM ArtifactType = "NPM" NUGET ArtifactType = "NUGET" RPM ArtifactType = "RPM" GO ArtifactType = "GO" CONDA ArtifactType = "CONDA" )
type Config ¶
type Config struct {
Version string `yaml:"version"`
Concurrency int `yaml:"concurrency"`
Overwrite bool `yaml:"overwrite"`
Source RegistryConfig `yaml:"source"`
Dest RegistryConfig `yaml:"destination"`
Mappings []RegistryMapping `yaml:"mappings"`
}
Config represents the top-level configuration structure
func LoadConfig ¶
LoadConfig loads the configuration from a file
type CredentialsConfig ¶
type CredentialsConfig struct {
Username string `yaml:"username,omitempty"`
Password string `yaml:"password,omitempty"`
}
CredentialsConfig defines the credential configuration
type HelmOCIConfig ¶
type PackageFiles ¶
type PackageFiles struct {
File *File
DownloadFile io.ReadCloser
Header *http.Header
}
type RegistryConfig ¶
type RegistryConfig struct {
Endpoint string `yaml:"endpoint"`
Type RegistryType `yaml:"type"`
Credentials CredentialsConfig `yaml:"credentials,omitempty"`
Insecure bool `yaml:"insecure" default:"false"`
}
RegistryConfig defines the source ar configuration
type RegistryInfo ¶
type RegistryMapping ¶
type RegistryMapping struct {
ArtifactType ArtifactType `yaml:"artifactType"`
SourceRegistry string `yaml:"sourceRegistry"`
DestinationRegistry string `yaml:"destinationRegistry"`
// NOT IMPLEMENTED YET
IncludePatterns []string `yaml:"includePatterns"`
ExcludePatterns []string `yaml:"excludePatterns"`
//Optional
SourcePackageHostname string `yaml:"sourcePackageHostname"`
}
RegistryMapping defines the mapping between source and destination registries Slashes are used to defined the scope. The format would be - "registry": Create registry at Account level - "org/registry": Create registry at Org level - "org/project/registry": Create registry at Project level
type RegistryType ¶
type RegistryType string
var ( HAR RegistryType = "HAR" JFROG RegistryType = "JFROG" MOCK_JFROG RegistryType = "MOCK_JFROG" NEXUS RegistryType = "NEXUS" )
type Repository ¶
type Repository struct {
// Name is the repository name
Name string
// Description is the repository description
Description string
// ArtifactCount is the count of artifacts in this repository
ArtifactCount int
// Provider is the registry provider (HAR, JFROG)
Provider RegistryType
}
Repository represents a collection of artifacts
type TransferStats ¶
type TransferStats struct {
FileStats []FileStat
}
Click to show internal directories.
Click to hide internal directories.