Documentation ¶
Overview ¶
provides helpers to build models based on keys or names
Index ¶
- Constants
- func Future(hours int) int64
- func Now() string
- type Account
- type Asset
- func (a *Asset) Attribute(name, value string) Attribute
- func (a *Asset) Class() string
- func (a *Asset) Is(value string) bool
- func (a *Asset) Merge(update Asset)
- func (a *Asset) Spawn(dns, name string) Asset
- func (a *Asset) System() bool
- func (a *Asset) Valid() bool
- func (a *Asset) Visit(config map[string]string) Asset
- type Attribute
- type Capability
- type File
- type History
- type Integration
- type Job
- type Risk
- func (r *Risk) Attribute(name, value string) Attribute
- func (r *Risk) Is(status string) bool
- func (r *Risk) Link() string
- func (r *Risk) Merge(update Risk)
- func (r *Risk) Proof(bits []byte) File
- func (r *Risk) Raw() string
- func (r *Risk) Set(status string)
- func (r *Risk) Severity() string
- func (r *Risk) State() string
- func (r *Risk) Valid() bool
- func (r *Risk) Visit(n Risk) Risk
- type SearchResult
Constants ¶
View Source
const ( // shared:status Deleted string = "D" // asset:status Active string = "A" ActiveLow string = "AL" ActiveHigh string = "AH" Frozen string = "F" FrozenLow string = "FL" FrozenHigh string = "FH" // job:status Queued string = "JQ" Running string = "JR" Fail string = "JF" Pass string = "JP" // risk:status Triage string = "T" TriageInfo string = "TI" TriageLow string = "TL" TriageMedium string = "TM" TriageHigh string = "TH" TriageCritical string = "TC" Ignored string = "I" IgnoredExposure string = "IE" IgnoredInfo string = "II" IgnoredLow string = "IL" IgnoredMedium string = "IM" IgnoredHigh string = "IH" IgnoredCritical string = "IC" Open string = "O" OpenExposure string = "OE" OpenInfo string = "OI" OpenLow string = "OL" OpenMedium string = "OM" OpenHigh string = "OH" OpenCritical string = "OC" OpenMaterial string = "OX" Remediated string = "R" RemediatedExposure string = "RE" RemediatedInfo string = "RI" RemediatedLow string = "RL" RemediatedMedium string = "RM" RemediatedHigh string = "RH" RemediatedCritical string = "RC" RemediatedMaterial string = "RX" // asset:source Discovered string = "discovered" Provided string = "provided" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Account ¶
type Account struct { Username string `dynamodbav:"username" json:"username"` Key string `dynamodbav:"key" json:"key"` // Attributes Name string `dynamodbav:"name" json:"name"` Member string `dynamodbav:"member" json:"member"` Value string `dynamodbav:"value,omitempty" json:"value"` Config map[string]string `dynamodbav:"config" json:"config"` Updated string `dynamodbav:"updated" json:"updated"` TTL int64 `dynamodbav:"ttl" json:"ttl"` }
type Asset ¶
type Asset struct { Username string `dynamodbav:"username" json:"username"` Key string `dynamodbav:"key" json:"key"` // Attributes Source string `dynamodbav:"source" json:"source"` DNS string `dynamodbav:"dns" json:"dns"` Name string `dynamodbav:"name" json:"name"` Status string `dynamodbav:"status" json:"status"` Config map[string]string `dynamodbav:"config" json:"config"` Created string `dynamodbav:"created" json:"created"` Visited string `dynamodbav:"visited" json:"visited"` TTL int64 `dynamodbav:"ttl" json:"ttl"` History []History `dynamodbav:"history" json:"history"` }
func FilterAssetsByKey ¶
func GetAssetFromKey ¶
type Attribute ¶
type Attribute struct { Username string `dynamodbav:"username" json:"username"` Key string `dynamodbav:"key" json:"key"` // Attributes Source string `dynamodbav:"source" json:"source"` Name string `dynamodbav:"name" json:"name"` Value string `dynamodbav:"value" json:"value"` Status string `dynamodbav:"status" json:"status"` Created string `dynamodbav:"created" json:"created"` Visited string `dynamodbav:"visited" json:"visited"` TTL int64 `dynamodbav:"ttl" json:"ttl"` }
func GetAttributeFromKey ¶
func NewAttribute ¶
type Capability ¶
type File ¶
type File struct { Username string `dynamodbav:"username" json:"username"` Key string `dynamodbav:"key" json:"key"` // Attributes Name string `dynamodbav:"name" json:"name"` Updated string `dynamodbav:"updated" json:"updated"` Bytes []byte `dynamodbav:"-" json:"-"` }
func FilterFilesByName ¶
type Integration ¶
type Integration interface {
Push(risk Risk)
}
type Job ¶
type Job struct { Username string `dynamodbav:"username" json:"username"` Key string `dynamodbav:"key" json:"key"` // Attributes DNS string `dynamodbav:"dns" json:"dns"` Source string `dynamodbav:"source" json:"source"` Comment string `dynamodbav:"comment" json:"comment"` Config map[string]string `dynamodbav:"config" json:"config"` Created string `dynamodbav:"created" json:"created"` Updated string `dynamodbav:"updated" json:"updated"` Status string `dynamodbav:"status" json:"status"` TTL int64 `dynamodbav:"ttl" json:"ttl"` Name string `dynamodbav:"name,omitempty" json:"name,omitempty"` Queue string `dynamodbav:"-"` Target Asset `dynamodbav:"-"` Origin Asset `dynamodbav:"-"` Stream chan interface{} `dynamodbav:"-" json:"-"` }
func ConstructJob ¶
type Risk ¶
type Risk struct { Username string `dynamodbav:"username" json:"username"` Key string `dynamodbav:"key" json:"key"` // Attributes DNS string `dynamodbav:"dns" json:"dns"` Name string `dynamodbav:"name" json:"name"` Source string `dynamodbav:"source" json:"source"` Status string `dynamodbav:"status" json:"status"` Created string `dynamodbav:"created" json:"created"` Updated string `dynamodbav:"updated" json:"updated"` Visited string `dynamodbav:"visited" json:"visited"` History []History `dynamodbav:"history" json:"history"` TTL int64 `dynamodbav:"ttl" json:"ttl"` Comment string `dynamodbav:"-" json:"comment"` }
func GetRiskFromKey ¶
type SearchResult ¶
type SearchResult struct { Offset map[string]string `json:"offset,omitempty"` Assets []Asset `json:"assets,omitempty"` Attributes []Attribute `json:"attributes,omitempty"` Risks []Risk `json:"risks,omitempty"` Files []File `json:"files,omitempty"` Jobs []Job `json:"jobs,omitempty"` Accounts []Account `json:"accounts,omitempty"` Term string `json:"-"` }
Click to show internal directories.
Click to hide internal directories.