Documentation ¶
Index ¶
- Variables
- func AttributeDescription() map[string]string
- func CopyDir(srcfs vfs.FileSystem, src string, dstfs vfs.FileSystem, dst string) (int64, int64, error)
- func SupportedMimeTypes() []string
- type Config
- type Handler
- func (h *Handler) Download(p common.Printer, racc cpi.ResourceAccess, path string, fs vfs.FileSystem) (bool, string, error)
- func (h *Handler) DownloadFromArtifactSet(pr common.Printer, set *artifactset.ArtifactSet, path string, ...) (bool, string, error)
- func (h *Handler) GetForArtifact(art oci.ArtifactAccess) (fs vfs.FileSystem, reader io.ReadCloser, err error)
- func (h *Handler) GetForArtifactSet(set *artifactset.ArtifactSet) (fs vfs.FileSystem, reader io.ReadCloser, err error)
- func (h *Handler) GetForResource(racc cpi.ResourceAccess) (fs vfs.FileSystem, reader io.ReadCloser, err error)
- func (h *Handler) SetArchiveMode(b bool) *Handler
- type RegistrationHandler
Constants ¶
This section is empty.
Variables ¶
var ( MimeOCIImageArtifactArchive = artifactset.MediaType(artdesc.MediaTypeImageManifest) MimeOCIImageArtifact = artdesc.ToContentMediaType(artdesc.MediaTypeImageManifest) )
var DefaultHandler = New()
Functions ¶
func AttributeDescription ¶
func CopyDir ¶
func CopyDir(srcfs vfs.FileSystem, src string, dstfs vfs.FileSystem, dst string) (int64, int64, error)
CopyDir recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory may exist. Symlinks are ignored and skipped.
func SupportedMimeTypes ¶
func SupportedMimeTypes() []string
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) DownloadFromArtifactSet ¶
func (h *Handler) DownloadFromArtifactSet(pr common.Printer, set *artifactset.ArtifactSet, path string, fs vfs.FileSystem) (bool, string, error)
func (*Handler) GetForArtifact ¶ added in v0.4.1
func (h *Handler) GetForArtifact(art oci.ArtifactAccess) (fs vfs.FileSystem, reader io.ReadCloser, err error)
GetForArtifact provides a virtual filesystem for an OCi image manifest. It returns nil without error, if the OCI artifact does not match the requirement.
func (*Handler) GetForArtifactSet ¶
func (h *Handler) GetForArtifactSet(set *artifactset.ArtifactSet) (fs vfs.FileSystem, reader io.ReadCloser, err error)
GetForArtifactSet provides a virtual filesystem for an OCi image manifest provided by the given artifact set matching the configured config types. It returns nil without error, if the OCI artifact does not match the requirement.
func (*Handler) GetForResource ¶
func (h *Handler) GetForResource(racc cpi.ResourceAccess) (fs vfs.FileSystem, reader io.ReadCloser, err error)
GetForResource provides a virtual filesystem for an OCi image manifest provided by the given resource matching the configured config types. It returns nil without error, if the OCI artifact does not match the requirement.
func (*Handler) SetArchiveMode ¶
type RegistrationHandler ¶
type RegistrationHandler struct{}
func (*RegistrationHandler) GetHandlers ¶
func (r *RegistrationHandler) GetHandlers(ctx cpi.Context) registrations.HandlerInfos
func (*RegistrationHandler) RegisterByName ¶
func (r *RegistrationHandler) RegisterByName(handler string, ctx download.Target, config download.HandlerConfig, olist ...download.HandlerOption) (bool, error)