Documentation ¶
Index ¶
- Variables
- func GetLogLevel(s string) logf.Level
- func Integer(i int64) sql.NullInt64
- func NewLogger(w io.Writer, lv logf.Level) *logf.Logger
- func Numeric(f float64) sql.NullFloat64
- func Text(s string) sql.NullString
- type Affected
- type CVSS
- type DB
- func (db *DB) GetAPI() *myjvn.APIs
- func (db *DB) GetAffected(id string) []Affected
- func (db *DB) GetCVSS(id string) *CVSS
- func (db *DB) GetDB() *gorp.DbMap
- func (db *DB) GetDBFile() string
- func (db *DB) GetJVNRSS(start time.Time, month bool, keyword string) (*rss.JVNRSS, error)
- func (db *DB) GetJVNRSSByKeyword(keyword string) (*rss.JVNRSS, error)
- func (db *DB) GetLastUpdate() time.Time
- func (db *DB) GetLogger() *logf.Logger
- func (db *DB) GetRelated(id string) []Related
- func (db *DB) GetVULDEF(idlist []string) (*vuldef.VULDEF, error)
- func (db *DB) GetVulnview(id string) *Vulnview
- func (db *DB) GetVulnviewList(days int, score float64, product, cve string) ([]Vulnview, error)
- func (db *DB) Initialize() error
- func (db *DB) Update(month bool, keyword string) error
- func (db *DB) UpdateID(id string) error
- type History
- type Related
- type Vulnlist
- type Vulnview
Constants ¶
This section is empty.
Variables ¶
var ( //NullText is null text data NullText = sql.NullString{String: "", Valid: false} //NullInteger is null integer data NullInteger = sql.NullInt64{Int64: 0, Valid: false} //NullNumeric is null numeric data NullNumeric = sql.NullFloat64{Float64: 0.0, Valid: false} )
Functions ¶
func GetLogLevel ¶
Types ¶
type Affected ¶
type Affected struct { ID sql.NullString `db:"id,primarykey"` Name sql.NullString `db:"name,primarykey"` ProductName sql.NullString `db:"product_name,primarykey"` VersionNumber sql.NullString `db:"version_number,primarykey"` }
Affected is definition of affected table
func NewAffected ¶
NewAffected returns Affected instance
type CVSS ¶
type CVSS struct { ID sql.NullString `db:"id,primarykey"` Version sql.NullString `db:"version,primarykey"` BaseVector sql.NullString `db:"base_vector"` BaseScore sql.NullFloat64 `db:"base_score"` Severity sql.NullString `db:"severity"` }
CVSS is definition of cvss table
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB is type of database
func (*DB) GetAffected ¶
GetAffected returns []Affected instance
func (*DB) GetJVNRSSByKeyword ¶
GetJVNRSSByKeyword returns rss.JVNRSS (keyword condition)
func (*DB) GetLastUpdate ¶
GetLastUpdate returns last update time.Time
func (*DB) GetRelated ¶
GetRelated returns []Affected instance
func (*DB) GetVulnview ¶
GetVulnview returns Vulnview instance
func (*DB) GetVulnviewList ¶
GetVulnviewList returns []Vulnview instance
type History ¶
type History struct { ID sql.NullString `db:"id,primarykey"` HistoryNo sql.NullInt64 `db:"history_no,primarykey"` Description sql.NullString `db:"description"` DateTime sql.NullInt64 `db:"date_time"` }
History is definition of history table
func NewHistory ¶
NewHistory returns History instance
func (*History) GetDateTime ¶
GetDateTime returns time.Time instance of History.DateTime
type Related ¶
type Related struct { ID sql.NullString `db:"id,primarykey"` Type sql.NullString `db:"type,primarykey"` Name sql.NullString `db:"name,primarykey"` VulinfoID sql.NullString `db:"vulinfo_id,primarykey"` Title sql.NullString `db:"title"` URL sql.NullString `db:"url"` }
Related is definition of related table
func NewRelated ¶
NewRelated returns Related instance
type Vulnlist ¶
type Vulnlist struct { ID sql.NullString `db:"id,primarykey"` Title sql.NullString `db:"title"` Description sql.NullString `db:"description"` URI sql.NullString `db:"uri"` Creator sql.NullString `db:"creator"` Impact sql.NullString `db:"impact"` Solution sql.NullString `db:"solution"` DatePublic sql.NullInt64 `db:"date_public"` DatePublish sql.NullInt64 `db:"date_publish"` DateUpdate sql.NullInt64 `db:"date_update"` }
Vulnlist is definition of vulnlist table
func NewVulnlist ¶
func NewVulnlist(id, title, description, uri, creator, impact, solution string, datePublic, datePublish, dateUpdate int64) *Vulnlist
NewVulnlist returns Vulnlist instance
func (*Vulnlist) GetDatePublic ¶
GetDatePublic returns time.Time instance of Vulnlist.DatePublic
func (*Vulnlist) GetDatePublish ¶
GetDatePublish returns time.Time instance of Vulnlist.DatePublish
func (*Vulnlist) GetDateUpdate ¶
GetDateUpdate returns time.Time instance of Vulnlist.DateUpdate
type Vulnview ¶
type Vulnview struct { ID sql.NullString `db:"id"` Title sql.NullString `db:"title"` Description sql.NullString `db:"description"` URI sql.NullString `db:"uri"` Impact sql.NullString `db:"impact"` Solution sql.NullString `db:"solution"` CVSSScore sql.NullFloat64 `db:"cvss_score"` CVSSVector sql.NullString `db:"cvss_vector"` CVSSSeverity sql.NullString `db:"cvss_severity"` DatePublic sql.NullInt64 `db:"date_public"` DatePublish sql.NullInt64 `db:"date_publish"` DateUpdate sql.NullInt64 `db:"date_update"` }
Vulnview is definition of vulnview view
func (*Vulnview) GetDatePublic ¶
GetDatePublic returns time.Time instance of Vulnview.DatePublic
func (*Vulnview) GetDatePublish ¶
GetDatePublish returns time.Time instance of Vulnview.DatePublish
func (*Vulnview) GetDateUpdate ¶
GetDateUpdate returns time.Time instance of Vulnview.DateUpdate