report

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2016 License: GPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JSONDirPattern = regexp.MustCompile(`^\d{8}_\d{4}$`)

JSONDirPattern is file name pattern of JSON directory

Functions

func CheckIfAzureContainerExists added in v0.1.5

func CheckIfAzureContainerExists() error

CheckIfAzureContainerExists check the existence of Azure storage container

func CheckIfBucketExists added in v0.1.5

func CheckIfBucketExists() error

CheckIfBucketExists check the existence of S3 bucket

func LoadOneScanHistory added in v0.1.6

func LoadOneScanHistory(jsonDir string) (scanHistory models.ScanHistory, err error)

LoadOneScanHistory read JSON data

func RunTui

func RunTui(jsonDirName string) subcommands.ExitStatus

RunTui execute main logic

func ToPlainTextSummary

func ToPlainTextSummary(r models.ScanResult) string

ToPlainTextSummary format summary for plain text.

Types

type AzureBlobWriter added in v0.1.5

type AzureBlobWriter struct{}

AzureBlobWriter writes results to AzureBlob

func (AzureBlobWriter) Write added in v0.1.5

func (w AzureBlobWriter) Write(scanResults []models.ScanResult) (err error)

Write results to Azure Blob storage

type JSONDirs added in v0.1.6

type JSONDirs []string

JSONDirs array of json files path.

func GetValidJSONDirs added in v0.1.6

func GetValidJSONDirs() (jsonDirs JSONDirs, err error)

GetValidJSONDirs return valid json directory as array

func (JSONDirs) Len added in v0.1.6

func (d JSONDirs) Len() int

func (JSONDirs) Less added in v0.1.6

func (d JSONDirs) Less(i, j int) bool

func (JSONDirs) Swap added in v0.1.6

func (d JSONDirs) Swap(i, j int)

type JSONWriter

type JSONWriter struct {
	ScannedAt time.Time
}

JSONWriter writes results to file.

func (JSONWriter) Write

func (w JSONWriter) Write(scanResults []models.ScanResult) (err error)

type LogrusWriter

type LogrusWriter struct {
}

LogrusWriter write to logfile

func (LogrusWriter) Write

func (w LogrusWriter) Write(scanResults []models.ScanResult) error

type MailWriter

type MailWriter struct{}

MailWriter send mail

func (MailWriter) Write

func (w MailWriter) Write(scanResults []models.ScanResult) (err error)

type ResultWriter

type ResultWriter interface {
	Write([]models.ScanResult) error
}

ResultWriter Interface

type S3Writer added in v0.1.5

type S3Writer struct{}

S3Writer writes results to S3

func (S3Writer) Write added in v0.1.5

func (w S3Writer) Write(scanResults []models.ScanResult) (err error)

Write results to S3

type SlackWriter

type SlackWriter struct{}

SlackWriter send report to slack

func (SlackWriter) Write

func (w SlackWriter) Write(scanResults []models.ScanResult) error

type StdoutWriter added in v0.1.5

type StdoutWriter struct{}

StdoutWriter write to stdout

func (StdoutWriter) Write added in v0.1.5

func (w StdoutWriter) Write(scanResults []models.ScanResult) error

type TextFileWriter added in v0.1.5

type TextFileWriter struct {
	ScannedAt time.Time
}

TextFileWriter writes results to file.

func (TextFileWriter) Write added in v0.1.5

func (w TextFileWriter) Write(scanResults []models.ScanResult) (err error)

Jump to

Keyboard shortcuts

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