Documentation ¶
Index ¶
- func CheckIfImageExistsInLocal(ref name.Reference) (bool, v1.Image, error)
- func FilesystemScanHandler(data interface{}) interface{}
- func GetImage(input string, config *types.RegistryConfig) (v1.Image, error)
- func ImageScanHandler(data interface{}) interface{}
- func Init()
- func ParametersStoreWatcher(data interface{}) interface{}
- func ReadFiles(image v1.Image) error
- func ReadTarballAsImage(path string) (v1.Image, error)
- func TarballScanHandler(data interface{}) interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckIfImageExistsInLocal ¶
CheckIfImageExistsInLocal checks if the given image reference exists locally. It returns a boolean indicating whether the image exists, the image object if it exists, and an error if any.
func FilesystemScanHandler ¶
func FilesystemScanHandler(data interface{}) interface{}
func GetImage ¶
GetImage retrieves a Docker image given its name or digest. It first checks if the image exists locally, and if not, it pulls it from the remote registry. Returns the image object and an error if any.
func ImageScanHandler ¶
func ImageScanHandler(data interface{}) interface{}
ImageScanHandler scans the given image for files and reads them. It takes in a string parameter as the image name and returns the same parameter.
func Init ¶
func Init()
Init initializes the stream by watching for changes in the parameters store key and scan elapsed store key. It also attaches handlers for image scan event, tarball scan event, and filesystem check event.
func ParametersStoreWatcher ¶
func ParametersStoreWatcher(data interface{}) interface{}
ParametersStoreWatcher watches for changes in the parameters store and emits events based on the scan type.
func ReadFiles ¶
ReadFiles reads the layers of a given v1.Image and processes its contents. It returns an error if there's any issue encountered while reading the layers or processing its contents.
func ReadTarballAsImage ¶
ReadTarballAsImage reads a tarball from the given path and returns it as a v1.Image.
func TarballScanHandler ¶
func TarballScanHandler(data interface{}) interface{}
TarballScanHandler scans a tarball file and reads its contents as an image instance. It then sets the image instance to the stream and reads the files in the image.
Types ¶
This section is empty.