Documentation
¶
Overview ¶
Package resolvers provides concrete implementations for the scope.Resolver interface for all supported data sources and scope options.
Index ¶
- type AllLayersResolver
- type DirectoryResolver
- func (s DirectoryResolver) FilesByGlob(patterns ...string) ([]file.Reference, error)
- func (s DirectoryResolver) FilesByPath(userPaths ...file.Path) ([]file.Reference, error)
- func (s DirectoryResolver) MultipleFileContentsByRef(f ...file.Reference) (map[file.Reference]string, error)
- func (s DirectoryResolver) String() string
- type ImageSquashResolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllLayersResolver ¶
type AllLayersResolver struct {
// contains filtered or unexported fields
}
AllLayersResolver implements path and content access for the AllLayers scope option for container image data sources.
func NewAllLayersResolver ¶
func NewAllLayersResolver(img *image.Image) (*AllLayersResolver, error)
NewAllLayersResolver returns a new resolver from the perspective of all image layers for the given image.
func (*AllLayersResolver) FilesByGlob ¶
func (r *AllLayersResolver) FilesByGlob(patterns ...string) ([]file.Reference, error)
FilesByGlob returns all file.References that match the given path glob pattern from any layer in the image.
func (*AllLayersResolver) FilesByPath ¶
FilesByPath returns all file.References that match the given paths from any layer in the image.
func (*AllLayersResolver) MultipleFileContentsByRef ¶
func (r *AllLayersResolver) MultipleFileContentsByRef(f ...file.Reference) (map[file.Reference]string, error)
MultipleFileContentsByRef returns the file contents for all file.References relative to the image. Note that a file.Reference is a path relative to a particular layer.
type DirectoryResolver ¶
type DirectoryResolver struct {
Path string
}
DirectoryResolver implements path and content access for the directory data source.
func (DirectoryResolver) FilesByGlob ¶
func (s DirectoryResolver) FilesByGlob(patterns ...string) ([]file.Reference, error)
FilesByGlob returns all file.References that match the given path glob pattern from any layer in the image.
func (DirectoryResolver) FilesByPath ¶
FilesByPath returns all file.References that match the given paths from the directory.
func (DirectoryResolver) MultipleFileContentsByRef ¶
func (s DirectoryResolver) MultipleFileContentsByRef(f ...file.Reference) (map[file.Reference]string, error)
MultipleFileContentsByRef returns the file contents for all file.References relative a directory.
func (DirectoryResolver) String ¶
func (s DirectoryResolver) String() string
Stringer to represent a directory path data source
type ImageSquashResolver ¶
type ImageSquashResolver struct {
// contains filtered or unexported fields
}
ImageSquashResolver implements path and content access for the Squashed scope option for container image data sources.
func NewImageSquashResolver ¶
func NewImageSquashResolver(img *image.Image) (*ImageSquashResolver, error)
NewImageSquashResolver returns a new resolver from the perspective of the squashed representation for the given image.
func (*ImageSquashResolver) FilesByGlob ¶
func (r *ImageSquashResolver) FilesByGlob(patterns ...string) ([]file.Reference, error)
FilesByGlob returns all file.References that match the given path glob pattern within the squashed representation of the image.
func (*ImageSquashResolver) FilesByPath ¶
FilesByPath returns all file.References that match the given paths within the squashed representation of the image.
func (*ImageSquashResolver) MultipleFileContentsByRef ¶
func (r *ImageSquashResolver) MultipleFileContentsByRef(f ...file.Reference) (map[file.Reference]string, error)
MultipleFileContentsByRef returns the file contents for all file.References relative to the image. Note that a file.Reference is a path relative to a particular layer, in this case only from the squashed representation.