Documentation ¶
Index ¶
Constants ¶
View Source
const ParamId = "issueId"
Variables ¶
This section is empty.
Functions ¶
func TransformHeader ¶
func TransformHeader(he []*HeaderMyEntity) http.Header
Types ¶
type CommentEntity ¶
type CommentEntity struct {
Text string `json:"text" description:"raw markdown text"`
}
type HeaderMyEntity ¶
type HttpMyEntity ¶
type HttpMyEntity struct { Status string `json:"status"` // The problem with header is that map isn't supported in swagger api // So we transform map[string][]string to []struct{key:string,values:[]string} Header []*HeaderMyEntity `json:"header"` Body *issue.HttpBody `json:"body,omitempty"` }
func (*HttpMyEntity) Transform ¶
func (he *HttpMyEntity) Transform() *issue.HttpEntity
type HttpTransactionEntity ¶
type HttpTransactionEntity struct { Id int `json:"id,omitempty"` Url string `json:"url,omitempty"` Params []string `json:"params,omitempty"` Method string `json:"method"` Request *HttpMyEntity `json:"request,omitempty"` Response *HttpMyEntity `json:"response,omitempty"` }
type IssueEntity ¶
type IssueEntity struct { Summary *string `json:"summary,omitempty" creating:"nonzero,min=3,max=120"` VulnType *int `json:"vulnType,omitempty" bson:"vulnType" description:"vulnerability type from vulndb"` Severity *issue.Severity `json:"severity,omitempty" description:"one of [high medium low info]"` References []*issue.Reference `json:"references,omitempty" bson:"references" description:"information about vulnerability"` Desc *string `json:"desc,omitempty"` Vector *VectorEntity `json:"vector,omitempty"` }
type IssueService ¶
type IssueService struct { *services.BaseService // contains filtered or unexported fields }
func New ¶
func New(base *services.BaseService) *IssueService
func (*IssueService) Register ¶
func (s *IssueService) Register(container *restful.Container)
func (*IssueService) TakeIssue ¶
func (s *IssueService) TakeIssue(fn func(*restful.Request, *restful.Response, *issue.TargetIssue)) restful.RouteFunction
type StatusEntity ¶
type TargetIssueEntity ¶
type TargetIssueEntity struct { Target string `json:"target,omitempty" creating:"nonzero,bsonId"` StatusEntity `json:",inline"` IssueEntity `json:",inline"` }
type VectorEntity ¶
type VectorEntity struct { Url string `json:"url,omitempty" description:"where this issue is happened"` HttpTransactions []*HttpTransactionEntity `json:"httpTransactions,omitempty" bson:"httpTransactions"` }
func (*VectorEntity) Transform ¶
func (v *VectorEntity) Transform() *issue.Vector
Click to show internal directories.
Click to hide internal directories.