Files
trivy/extractor/extractor.go
2019-04-07 18:01:27 +09:00

21 lines
443 B
Go

package extractor
import (
"context"
"io"
"github.com/pkg/errors"
)
var (
// ErrCouldNotExtract occurs when an extraction fails.
ErrCouldNotExtract = errors.New("Could not extract the archive")
)
type FileMap map[string][]byte
type Extractor interface {
Extract(ctx context.Context, imageName string, filenames []string) (FileMap, error)
ExtractFromFile(ctx context.Context, r io.ReadCloser, filenames []string) (FileMap, error)
}