Documentation ¶
Index ¶
- func InitProvider(c Initializer) error
- func NewBase(repoDetails docker.ImageRepoDetails, transport http.RoundTripper) *baseClient
- func Providers() []func(docker.ImageRepoDetails, http.RoundTripper) RegistryInternal
- type APIVersion
- type ArchitectureGetter
- type BlobsResponse
- type ECRInterface
- type Initializer
- type ManifestsResult
- type Matcher
- type Registry
- type RegistryInternal
- type TransportWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitProvider ¶
func InitProvider(c Initializer) error
InitProvider does some initialization steps for a provider.
func NewBase ¶
func NewBase(repoDetails docker.ImageRepoDetails, transport http.RoundTripper) *baseClient
NewBase creates a new base provider.
func Providers ¶
func Providers() []func(docker.ImageRepoDetails, http.RoundTripper) RegistryInternal
Providers returns all the supported registry providers.
Types ¶
type APIVersion ¶
type APIVersion string
APIVersion is the API version type.
const ( // APIVersionV1 is the API version v1. APIVersionV1 APIVersion = "v1" // APIVersionV2 is the API version v2. APIVersionV2 APIVersion = "v2" )
func (APIVersion) String ¶
func (v APIVersion) String() string
type ArchitectureGetter ¶
type ArchitectureGetter interface { GetManifests(imageName, tag string) (*ManifestsResult, error) GetBlobs(imageName, digest string) (*BlobsResponse, error) }
ArchitectureGetter defines manifests and blob APIs.
type BlobsResponse ¶
type BlobsResponse struct {
Architecture string `json:"architecture"`
}
BlobsResponse is the result of GetBlobs.
type ECRInterface ¶
type ECRInterface interface {
GetAuthorizationToken(context.Context, *ecr.GetAuthorizationTokenInput, ...func(*ecr.Options)) (*ecr.GetAuthorizationTokenOutput, error)
}
type Initializer ¶
type Initializer interface { WrapTransport(...TransportWrapper) error DecideBaseURL() error }
Initializer provides methods for initializing the registry client.
type ManifestsResult ¶
ManifestsResult is the result of GetManifests.
type Matcher ¶
type Matcher interface {
Match() bool
}
Matcher provides a method for selecting which registry client to use.
type Registry ¶
type Registry interface { Tags(string) (tools.Versions, error) GetArchitecture(imageName, tag string) (string, error) Close() error Ping() error ImageRepoDetails() docker.ImageRepoDetails ShouldRefreshAuth() (bool, *time.Duration) RefreshAuth() error }
Registry provides APIs to interact with the OCI provider client.
type RegistryInternal ¶
type RegistryInternal interface { Matcher Registry Initializer }
RegistryInternal provides methods of registry clients for internal operations. It's exported for generating mocks for tests.
type TransportWrapper ¶
type TransportWrapper func(http.RoundTripper, *docker.ImageRepoDetails) (http.RoundTripper, error)
TransportWrapper wraps RoundTripper.