Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CVEs ¶
type CVEs []CVE
CVEs is a list of CVE instances
func (*CVEs) AppendSingle ¶
AppendSingle appends a single CVE to the instance
type Hash ¶
type Hash struct { ID bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty" description:"Internally used ID for the hash"` Hash string `bson:"hash" json:"hash" description:"The hash string itself"` Files []struct { Name string `json:"name"` Hash string `json:"hash"` } `bson:"files" json:"files" description:"File hashes for the artifact"` Name string `bson:"name" json:"name" description:"Name of the artifact"` Cves CVEs `bson:"cves" json:"cves,omitempty" description:"All known related CVEs"` Submitter string `bson:"submitter" json:"submitter,omitempty" description:"User who submitted the hash"` }
Hash is a representation of a single hash stored in the databse.
type HashSearchResult ¶
type HashSearchResult struct {
Hashes []Hash `bson:"hashes" json:"hashes"`
}
HashSearchResult holds a list of hashs found during a search of the databse.
func NewHashSearchResult ¶
func NewHashSearchResult() *HashSearchResult
NewHashSearchResult creates a new HashSearchResult instance.
func (*HashSearchResult) AddHash ¶
func (hsr *HashSearchResult) AddHash(h Hash)
AddHash appens a hash to the Hashes attribute.
type Hashes ¶
type Hashes struct {
// contains filtered or unexported fields
}
Hashes represents a list of hashes
type MultipleHashRequest ¶
type MultipleHashRequest struct {
Hashes []SingleHashRequest `binding:"required" json:"hashes" description:"All hashes being requested"`
}
MultipleHashRequest represents multiple hashes being requested over HTTP
type SingleHashRequest ¶
type SingleHashRequest struct {
Hash string `binding:"required" json:"hash" description:"The hash being requested"`
}
SingleHashRequest represents a single hash request via HTTP
Click to show internal directories.
Click to hide internal directories.