source

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotSupportedFile = errors.New("invalid file format")

ErrNotSupportedFile - error representing when a file format is not supported by KICS

Functions

This section is empty.

Types

type FileSystemSourceProvider

type FileSystemSourceProvider struct {
	// contains filtered or unexported fields
}

FileSystemSourceProvider provides a path to be scanned and a list of files which will not be scanned

func NewFileSystemSourceProvider

func NewFileSystemSourceProvider(path string, excludes []string) (*FileSystemSourceProvider, error)

NewFileSystemSourceProvider initializes a FileSystemSourceProvider with path and files that will be ignored

func (*FileSystemSourceProvider) GetBasePath added in v1.1.3

func (s *FileSystemSourceProvider) GetBasePath() string

GetBasePath returns base path of FileSystemSourceProvider

func (*FileSystemSourceProvider) GetSources

func (s *FileSystemSourceProvider) GetSources(ctx context.Context, _ string, extensions model.Extensions, sink Sink) error

GetSources tries to open file or directory and execute sink function on it

type Sink

type Sink func(ctx context.Context, filename string, content io.ReadCloser) error

Sink defines a sink function to be passed as reference to functions

Jump to

Keyboard shortcuts

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