Documentation ¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PluginConfig ¶
type PluginConfig struct { // Name is the name of the plugin scanner. This should be unique as only one PluginRunner with the same Name can exist. Name string `yaml:"name" mapstructure:"name"` // ImageName is the name of the docker image that will be used to run the plugin scanner ImageName string `yaml:"image_name" mapstructure:"image_name"` // InputDir is a directory where the plugin scanner will read the asset filesystem InputDir string `yaml:"input_dir" mapstructure:"input_dir"` // ScannerConfig is a json string that will be passed to the scanner in the plugin ScannerConfig string `yaml:"scanner_config" mapstructure:"scanner_config"` // TimeoutSeconds defines the number of seconds before the scan is marked failed due to timeout TimeoutSeconds int `yaml:"timeout_seconds" mapstructure:"timeout_seconds"` // BinaryMode is a flag to indicate that the plugin should be run as a binary BinaryMode bool `yaml:"binary_mode" mapstructure:"binary_mode"` }
type PluginRunner ¶
type PluginRunner interface { Start(ctx context.Context) error WaitReady(ctx context.Context) error Metadata(ctx context.Context) (*plugintypes.Metadata, error) Run(ctx context.Context) error WaitDone(ctx context.Context) error Stop(ctx context.Context) error Logs(ctx context.Context) (io.ReadCloser, error) Result(ctx context.Context) (io.ReadCloser, error) Remove(ctx context.Context) error }
Click to show internal directories.
Click to hide internal directories.