Documentation
¶
Index ¶
- func Copy(ctx context.Context, dstreference, srcreference string, ...) error
- func DoSync(cfg *SyncConfig) error
- func Log() *zap.SugaredLogger
- type ACRWithTokenAuth
- type AccessSecret
- type AuthSecret
- type AuthedTransport
- type AzureContainerRegistry
- type AzureSecretFile
- type BearerSecret
- type OCIRegistry
- type QuayRegistry
- type Registry
- type Secrets
- type SyncConfig
- type Tags
- type TagsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Copy ¶
func Copy(ctx context.Context, dstreference, srcreference string, dstauth, srcauth *types.DockerAuthConfig) error
Copy copies an image from one registry to another
func DoSync ¶
func DoSync(cfg *SyncConfig) error
DoSync syncs the images from the source registry to the target registry
func Log ¶
func Log() *zap.SugaredLogger
Types ¶
type ACRWithTokenAuth ¶
type ACRWithTokenAuth struct {
// contains filtered or unexported fields
}
func NewACRWithTokenAuth ¶
func NewACRWithTokenAuth(cfg *SyncConfig, acrName string, bearerToken string) *ACRWithTokenAuth
type AccessSecret ¶
type AccessSecret struct {
AccessToken string `json:"access_token"`
}
type AuthSecret ¶
type AuthSecret struct {
RefreshToken string `json:"refresh_token"`
}
type AuthedTransport ¶
type AuthedTransport struct { Key string Wrapped http.RoundTripper }
AuthedTransport is a http.RoundTripper that adds an Authorization header
type AzureContainerRegistry ¶
type AzureContainerRegistry struct {
// contains filtered or unexported fields
}
AzureContainerRegistry implements ACR Repository access
func NewAzureContainerRegistry ¶
func NewAzureContainerRegistry(cfg *SyncConfig) *AzureContainerRegistry
NewAzureContainerRegistry creates a new AzureContainerRegistry access client
func (*AzureContainerRegistry) GetPullSecret ¶
func (a *AzureContainerRegistry) GetPullSecret(ctx context.Context) (*AuthSecret, error)
func (*AzureContainerRegistry) RepositoryExists ¶
func (a *AzureContainerRegistry) RepositoryExists(ctx context.Context, repository string) (bool, error)
EnsureRepositoryExists ensures that the repository exists
type AzureSecretFile ¶
AzureSecret is the token configured in the ACR
func (AzureSecretFile) BasicAuthEncoded ¶
func (a AzureSecretFile) BasicAuthEncoded() string
type BearerSecret ¶
type BearerSecret struct {
BearerToken string
}
BearerSecret is the secret for the source OCI registry
type OCIRegistry ¶
type OCIRegistry struct {
// contains filtered or unexported fields
}
OCIRegistry implements OCI Repository access
func NewOCIRegistry ¶
func NewOCIRegistry(cfg *SyncConfig, baseURL, bearerToken string) *OCIRegistry
NewOCIRegistry creates a new OCIRegistry access client
type QuayRegistry ¶
type QuayRegistry struct {
// contains filtered or unexported fields
}
QuayRegistry implements Quay Repository access
func NewQuayRegistry ¶
func NewQuayRegistry(cfg *SyncConfig, bearerToken string) *QuayRegistry
NewQuayRegistry creates a new QuayRegistry access client
type SyncConfig ¶
type SyncConfig struct { Repositories []string NumberOfTags int Secrets []Secrets AcrTargetRegistry string TenantId string RequestTimeout int AddLatest bool ManagedIdentityClientID string }
SyncConfig is the configuration for the image sync