Documentation
¶
Index ¶
- Constants
- Variables
- func ExportFullReport(ctx context.Context, s *db.Statistics, reportFile string, reportTime time.Time, ...) (reportFileNames []string, err error)
- func IsNoneReportFormat(reportFormat []string) bool
- func IsPdfOrHtmlReportFormat(reportFormats []string) bool
- func RenderConsoleReport(s *db.Statistics, reportTime time.Time, wafName string, url string, ...) error
- func SendReportByEmail(ctx context.Context, s *db.Statistics, email string, reportTime time.Time, ...) error
- func ValidateReportFormat(formats []string) error
- type ErrorResponse
Constants ¶
View Source
const ( NoneFormat = "none" JsonFormat = "json" HtmlFormat = "html" PdfFormat = "pdf" )
Variables ¶
View Source
var ( ReportFormatsSet = map[string]any{ NoneFormat: nil, JsonFormat: nil, HtmlFormat: nil, PdfFormat: nil, } ReportFormats = slices.Collect(maps.Keys(ReportFormatsSet)) )
Functions ¶
func ExportFullReport ¶
func ExportFullReport( ctx context.Context, s *db.Statistics, reportFile string, reportTime time.Time, wafName string, url string, openApiFile string, args []string, ignoreUnresolved bool, includePayloads bool, formats []string, ) (reportFileNames []string, err error)
ExportFullReport saves full report on disk in different formats: HTML, PDF, JSON.
func IsNoneReportFormat ¶ added in v0.5.5
func IsPdfOrHtmlReportFormat ¶ added in v0.5.5
func RenderConsoleReport ¶
func RenderConsoleReport( s *db.Statistics, reportTime time.Time, wafName string, url string, args []string, ignoreUnresolved bool, format string, ) error
RenderConsoleReport prints a console report in selected format.
func SendReportByEmail ¶
func ValidateReportFormat ¶ added in v0.5.5
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Msg string `json:"msg"`
}
func (*ErrorResponse) Error ¶
func (e *ErrorResponse) Error() string
Click to show internal directories.
Click to hide internal directories.