Documentation ¶
Index ¶
- Constants
- func Format(outputFormat FormatName, outputIndent string, scheme interface{}, ...) ([]byte, error)
- func ValidateOutputFormat(outputFormat FormatName, schemeType converter.SchemeType) error
- type FormatName
- type HumanFormatter
- type JsonFormatter
- type NewFormatFunc
- type OutputFormatter
- type UnsupportedScheme
Constants ¶
View Source
const DefaultOutputIndent = " "
Variables ¶
This section is empty.
Functions ¶
func Format ¶
func Format(outputFormat FormatName, outputIndent string, scheme interface{}, failedOnly bool) ([]byte, error)
func ValidateOutputFormat ¶
func ValidateOutputFormat(outputFormat FormatName, schemeType converter.SchemeType) error
Types ¶
type FormatName ¶
type FormatName = string
const ( Human FormatName = "human" Json FormatName = "json" Sarif FormatName = "sarif" )
func OutputFormats ¶
func OutputFormats() []FormatName
type HumanFormatter ¶
type HumanFormatter struct {
// contains filtered or unexported fields
}
func (*HumanFormatter) Format ¶
func (f *HumanFormatter) Format(output interface{}, failedOnly bool) ([]byte, error)
func (*HumanFormatter) IsSchemeSupported ¶
func (f *HumanFormatter) IsSchemeSupported(schemeType string) bool
type JsonFormatter ¶
type JsonFormatter struct {
// contains filtered or unexported fields
}
func (*JsonFormatter) Format ¶
func (f *JsonFormatter) Format(scheme interface{}, failedOnly bool) ([]byte, error)
func (*JsonFormatter) IsSchemeSupported ¶
func (f *JsonFormatter) IsSchemeSupported(schemeType string) bool
type NewFormatFunc ¶
type NewFormatFunc func(indent string) OutputFormatter
type OutputFormatter ¶
type OutputFormatter interface { Format(scheme interface{}, failedOnly bool) ([]byte, error) IsSchemeSupported(schemeType string) bool }
func NewHumanFormatter ¶
func NewHumanFormatter(indent string) OutputFormatter
func NewJsonFormatter ¶
func NewJsonFormatter(indent string) OutputFormatter
type UnsupportedScheme ¶
type UnsupportedScheme struct {
// contains filtered or unexported fields
}
func (UnsupportedScheme) Error ¶
func (e UnsupportedScheme) Error() string
Click to show internal directories.
Click to hide internal directories.