resolvers

package
v0.1.0-beta.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package resolvers provides concrete implementations for the scope.Resolver interface for all supported data sources and scope options.

Index

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

func (r *AllLayersResolver) FilesByPath(paths ...file.Path) ([]file.Reference, error)

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

func (s DirectoryResolver) FilesByPath(userPaths ...file.Path) ([]file.Reference, error)

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

func (r *ImageSquashResolver) FilesByPath(paths ...file.Path) ([]file.Reference, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL