Documentation ¶
Index ¶
Constants ¶
View Source
const ( TypeEmpty = ReportType("empty") TypeRaw = ReportType("raw") TypeMulti = ReportType("multi") TypeIssues = ReportType("issues") TypeTechs = ReportType("techs") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Report ¶
type Report struct { Id bson.ObjectId `json:"id,omitempty" bson:"_id"` Type ReportType `json:"type" description:"one of [raw,issues,techs,multi,empty]"` Created time.Time `json:"created,omitempty" description:"when report is created"` Updated time.Time `json:"updated,omitempty" description:"when report is updated"` Scan bson.ObjectId `json:"scan,omitempty" description:"scan id"` ScanSession bson.ObjectId `json:"scanSession,omitempty" bson:"scanSession" description:"scan session id"` Raw `json:",inline,omitempty" bson:"raw,inline"` Multi []*Report `json:"multi,omitempty" bson:"multi,omitempty"` Issues []*issue.Issue `json:"issues,omitempty" bson:"issues,omitempty"` Techs []*tech.Tech `json:"techs,omitempty"` }
func (*Report) GetAllIssues ¶
get all issues from the report and underlying multi reports
func (*Report) GetAllTechs ¶
get all techs from the report and underlying multi reports
func (*Report) SetScanSession ¶
type ReportList ¶
type ReportList struct { pagination.Meta `json:",inline"` Results []*Report `json:"results"` }
type ReportType ¶
type ReportType string
func (ReportType) Convert ¶
func (t ReportType) Convert(text string) (interface{}, error)
func (ReportType) Enum ¶
func (t ReportType) Enum() []interface{}
func (ReportType) MarshalJSON ¶
func (t ReportType) MarshalJSON() ([]byte, error)
It's a hack to show custom type as string in swagger
Click to show internal directories.
Click to hide internal directories.