report

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Assets = assets.NewFileSystem(map[string][]string{"/": []string{"cvss.md", "template-detail.md", "template-list-simple.md", "template-list.md"}}, map[string]*assets.File{
	"/template-detail.md": &assets.File{
		Path:     "/template-detail.md",
		FileMode: 0x1b6,
		Mtime:    time.Unix(1526389430, 1526389430806757400),
		Data:     []byte(_Assets2e246b9906b9934683a55e514f8552196d6256de),
	}, "/template-list-simple.md": &assets.File{
		Path:     "/template-list-simple.md",
		FileMode: 0x1b6,
		Mtime:    time.Unix(1526382058, 1526382058573133500),
		Data:     []byte(_Assets12ec10cd20a0fc6f3fd5d9740c76f5d14a1e1bbd),
	}, "/template-list.md": &assets.File{
		Path:     "/template-list.md",
		FileMode: 0x1b6,
		Mtime:    time.Unix(1526382058, 1526382058573133500),
		Data:     []byte(_Assets6a710ffe05355fd8de925514584ec37062ef3c9c),
	}, "/": &assets.File{
		Path:     "/",
		FileMode: 0x800001ff,
		Mtime:    time.Unix(1526382058, 1526382058573133500),
		Data:     nil,
	}, "/cvss.md": &assets.File{
		Path:     "/cvss.md",
		FileMode: 0x1b6,
		Mtime:    time.Unix(1526382058, 1526382058557533500),
		Data:     []byte(_Assetse7f56da64dd0492253908aa8f211da1ca94f89dd),
	}}, "")

Assets returns go-assets FileSystem

Functions

func Info

func Info(db *database.DB, id string, tf io.Reader, f Format) (io.Reader, error)

Info returns io.Reader for detail info

func ListData

func ListData(db *database.DB, days int, score float64, product, cve string, f Format, tf io.Reader) (io.Reader, error)

ListData returns io.Reader for listing

Types

type AffectInfo

type AffectInfo struct {
	ID            string
	Name          string
	ProductName   string
	VersionNumber string
}

AffectInfo is "Affected" dataset for report

type CVSSInfo

type CVSSInfo struct {
	ID         string
	Version    string
	BaseVector string
	BaseReport string
	BaseScore  string
	Severity   string
}

CVSSInfo is "CVSS" dataset for report

type Format

type Format int

Format is type of output-format

const (
	FormUnknown Format = iota
	FormHTML
	FormMarkdown
	FormCSV
)

Output format

func TypeofFormat

func TypeofFormat(s string) Format

TypeofFormat returns type of Format

func (Format) String

func (f Format) String() string

type RelatedInfo

type RelatedInfo struct {
	ID        string
	Type      string
	Name      string
	VulinfoID string
	Title     string
	URL       string
}

RelatedInfo is "Related" dataset for report

type VulnDetail

type VulnDetail struct {
	Info       VulnInfo
	Affects    []AffectInfo
	CVSS       CVSSInfo
	Relattions []RelatedInfo
}

VulnDetail is detail infot for report

type VulnInfo

type VulnInfo struct {
	ID          string
	Title       string
	Description string
	URI         string
	Impact      string
	Solution    string
	CVSSVector  string
	Severity    string
	DatePublic  string
	DatePublish string
	DateUpdate  string
}

VulnInfo is "Vulnview" dataset for report

Jump to

Keyboard shortcuts

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