Documentation
¶
Index ¶
- type Option
- type Source
- func (s *Source) Copy(ctx context.Context, dest *destination.Destination, ...) error
- func (s *Source) Directory() string
- func (s *Source) GetCopiedImage() *archive.Image
- func (s *Source) ImageBySet(set map[string]map[string]bool) *archive.Image
- func (s *Source) Init(ctx context.Context) error
- func (s *Source) InspectRAW(ctx context.Context) ([]byte, string, error)
- func (s *Source) MIME() string
- func (s *Source) Name() string
- func (s *Source) Project() string
- func (s *Source) Reference() (imagetypes.ImageReference, error)
- func (s *Source) ReferenceName() string
- func (s *Source) ReferenceNameWithoutTransport() string
- func (s *Source) ReferenceNameWithoutTransportAndTag() string
- func (s *Source) Registry() string
- func (s *Source) SystemContext() *imagetypes.SystemContext
- func (s *Source) Tag() string
- func (s *Source) Type() types.ImageType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option struct { // Image Type. Type types.ImageType // Directory, need to provide if Type is dir / oci / docker-archive Directory string // Registry, need to provide if Type is docker, docker-daemon, docker-archive Registry string // Project (also called namespace on some public cloud providers), // need to provide if Type is docker / docker-daemon / docker-archive Project string // Image name, need to provide if Type is docker / docker-daemon / docker-archive Name string // Image tag, need to provide if Type is docker / docker-daemon / docker-archive Tag string // Digest is used to identify the Digest of the image to be copied, // only available when Type is docker. Digest digest.Digest SystemContext *imagetypes.SystemContext }
Option is used for create the Source object.
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source represents the source image to be copied. The type of the source image can be: docker, docker-daemon, docker-archive, oci or dir
func NewSource ¶
NewSource is the constructor to create a Source object. Need to call Init method after creating the Source object before use.
func (*Source) GetCopiedImage ¶
func (*Source) ImageBySet ¶
func (*Source) InspectRAW ¶
func (*Source) Reference ¶
func (s *Source) Reference() (imagetypes.ImageReference, error)
func (*Source) ReferenceName ¶
ReferenceName returns the reference with transport of the source image.
Example: docker://docker.io/library/hello-world:latest docker-daemon://docker.io/library/nginx:1.23 oci:./path/to/oci-image
func (*Source) ReferenceNameWithoutTransport ¶
func (*Source) ReferenceNameWithoutTransportAndTag ¶
func (*Source) SystemContext ¶
func (s *Source) SystemContext() *imagetypes.SystemContext
Click to show internal directories.
Click to hide internal directories.