Documentation ¶
Index ¶
- func GenerateDockerConfig(c Client) ([]byte, error)
- type AuthConfig
- type Client
- type DockerConfig
- type ECRClient
- func (e *ECRClient) CopyImage(ctx context.Context, srcRef ctypes.ImageReference, srcCreds string, ...) error
- func (e *ECRClient) CreateRepository(ctx context.Context, name string) error
- func (e *ECRClient) Credentials() string
- func (e *ECRClient) Endpoint() string
- func (e *ECRClient) ImageExists(ctx context.Context, imageRef ctypes.ImageReference) bool
- func (e *ECRClient) IsOrigin(imageRef ctypes.ImageReference) bool
- func (e *ECRClient) PullImage() error
- func (e *ECRClient) PutImage() error
- func (e *ECRClient) RepositoryExists() bool
- type GARAPI
- type GARClient
- func (e *GARClient) CopyImage(ctx context.Context, srcRef ctypes.ImageReference, srcCreds string, ...) error
- func (e *GARClient) CreateRepository(ctx context.Context, name string) error
- func (e *GARClient) Credentials() string
- func (e *GARClient) DockerConfig() ([]byte, error)
- func (e *GARClient) Endpoint() string
- func (e *GARClient) ImageExists(ctx context.Context, imageRef ctypes.ImageReference) bool
- func (e *GARClient) IsOrigin(imageRef ctypes.ImageReference) bool
- func (e *GARClient) PullImage() error
- func (e *GARClient) PutImage() error
- func (e *GARClient) RepositoryExists() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateDockerConfig ¶ added in v1.5.0
Types ¶
type AuthConfig ¶ added in v1.5.0
type AuthConfig struct {
Auth string `json:"auth,omitempty"`
}
type Client ¶
type Client interface { CreateRepository(ctx context.Context, name string) error RepositoryExists() bool CopyImage(ctx context.Context, src ctypes.ImageReference, srcCreds string, dest ctypes.ImageReference, destCreds string) error PullImage() error PutImage() error ImageExists(ctx context.Context, ref ctypes.ImageReference) bool // Endpoint returns the domain of the registry Endpoint() string Credentials() string // IsOrigin returns true if the imageRef originates from this registry IsOrigin(imageRef ctypes.ImageReference) bool }
Client provides methods required to be implemented by the various target registry clients, e.g. ECR, Docker, Quay.
type DockerConfig ¶ added in v1.5.0
type DockerConfig struct {
AuthConfigs map[string]AuthConfig `json:"auths"`
}
type ECRClient ¶
type ECRClient struct {
// contains filtered or unexported fields
}
func NewDummyECRClient ¶ added in v1.5.0
func NewDummyECRClient(region string, targetAccount string, role string, options config.ECROptions, authToken []byte) *ECRClient
For testing purposes
func NewMockECRClient ¶ added in v1.1.0
func (*ECRClient) CopyImage ¶
func (e *ECRClient) CopyImage(ctx context.Context, srcRef ctypes.ImageReference, srcCreds string, destRef ctypes.ImageReference, destCreds string) error
func (*ECRClient) CreateRepository ¶
func (*ECRClient) Credentials ¶
func (*ECRClient) ImageExists ¶
func (*ECRClient) IsOrigin ¶ added in v1.5.0
func (e *ECRClient) IsOrigin(imageRef ctypes.ImageReference) bool
IsOrigin returns true if the references origin is from this registry
func (*ECRClient) RepositoryExists ¶
type GARClient ¶ added in v1.5.0
type GARClient struct {
// contains filtered or unexported fields
}
func NewMockGARClient ¶ added in v1.5.0
func (*GARClient) CopyImage ¶ added in v1.5.0
func (e *GARClient) CopyImage(ctx context.Context, srcRef ctypes.ImageReference, srcCreds string, destRef ctypes.ImageReference, destCreds string) error
func (*GARClient) CreateRepository ¶ added in v1.5.0
CreateRepository is empty since repositories are not created for artifact registry
func (*GARClient) Credentials ¶ added in v1.5.0
func (*GARClient) DockerConfig ¶ added in v1.5.0
func (*GARClient) ImageExists ¶ added in v1.5.0
func (*GARClient) IsOrigin ¶ added in v1.5.0
func (e *GARClient) IsOrigin(imageRef ctypes.ImageReference) bool
IsOrigin returns true if the references origin is from this registry
func (*GARClient) RepositoryExists ¶ added in v1.5.0
Click to show internal directories.
Click to hide internal directories.