issue

package
v0.0.0-...-c937b9e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2015 License: MIT Imports: 15 Imported by: 0

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 HeaderMyEntity struct {
	Key    string   `json:"key"`
	Values []string `json:"values,omitempty"`
}

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 StatusEntity struct {
	Confirmed *bool `json:"confirmed,omitempty"`
	False     *bool `json:"false,omitempty"`
	Muted     *bool `json:"muted,omitempty"`
	Resolved  *bool `json:"resolved,omitempty"`
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL