Documentation
¶
Index ¶
- Constants
- Variables
- func DefaultOutputIsStructured(config configuration.Configuration) bool
- func HandleContentTypeFindingsModel(input []workflow.Data, invocation workflow.InvocationContext, ...) ([]workflow.Data, error)
- func HandleContentTypeOther(input []workflow.Data, invocation workflow.InvocationContext, ...) ([]workflow.Data, error)
- func HandleContentTypeUnifiedModel(input []workflow.Data, invocation workflow.InvocationContext, ...) ([]workflow.Data, error)
- type FileWriter
- type MimeType2Template
- type WriterEntry
- type WriterMap
Constants ¶
View Source
const ( OUTPUT_CONFIG_KEY_JSON = "json" OUTPUT_CONFIG_KEY_JSON_FILE = "json-file-output" OUTPUT_CONFIG_KEY_SARIF = "sarif" OUTPUT_CONFIG_KEY_SARIF_FILE = "sarif-file-output" OUTPUT_CONFIG_TEMPLATE_FILE = "internal_template_file" OUTPUT_CONFIG_KEY_FILE_WRITERS = "internal_output_file_writers" OUTPUT_CONFIG_KEY_DEFAULT_WRITER_LUT = "internal_default_writer_mimetype_lut" OUTPUT_CONFIG_KEY_NO_DEFAULT_WRITER = "internal_no_default_writer" DEFAULT_WRITER = "default" DEFAULT_MIME_TYPE = presenters.DefaultMimeType SARIF_MIME_TYPE = presenters.ApplicationSarifMimeType JSON_MIME_TYPE = presenters.ApplicationJSONMimeType )
Variables ¶
View Source
var ApplicationSarifTemplates = presenters.ApplicationSarifTemplates
View Source
var ApplicationSarifTemplatesUfm = presenters.ApplicationSarifTemplatesUfm
View Source
var DefaultTemplateFiles = presenters.DefaultTemplateFiles
DefaultTemplateFiles is an instance of TemplatePathsStruct with the template paths.
Functions ¶
func DefaultOutputIsStructured ¶
func DefaultOutputIsStructured(config configuration.Configuration) bool
func HandleContentTypeOther ¶
func HandleContentTypeUnifiedModel ¶
func HandleContentTypeUnifiedModel(input []workflow.Data, invocation workflow.InvocationContext, writers WriterMap) ([]workflow.Data, error)
HandleContentTypeUnifiedModel handles the unified model content type.
Types ¶
type FileWriter ¶
type FileWriter struct {
NameConfigKey string // defines the configuration key to look up the filename under
MimeType string // defines the final mime type of the rendering
TemplateFiles []string // defines the set of template files to use for rendering
WriteEmptyContent bool // specifies if anything should be written at all if the input data is empty
}
FileWriter is a public structure used to configure file based rendering
type MimeType2Template ¶
type MimeType2Template struct {
// contains filtered or unexported fields
}
type WriterEntry ¶
type WriterEntry struct {
// contains filtered or unexported fields
}
WriterEntry is an internal structure to handle all template based writers
func (*WriterEntry) GetWriter ¶
func (we *WriterEntry) GetWriter() io.WriteCloser
type WriterMap ¶
type WriterMap interface {
PopWritersByMimetype(mimeType string) []*WriterEntry
Length() int
AvailableMimetypes() []string
String() string
}
func GetWritersFromConfiguration ¶
func GetWritersFromConfiguration(config configuration.Configuration, outputDestination iUtils.OutputDestination) WriterMap
Click to show internal directories.
Click to hide internal directories.