Documentation ¶
Index ¶
Constants ¶
View Source
const ( ParamId = "scan-id" SessionParamId = "session-id" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ScanFunction ¶
type ScanService ¶
type ScanService struct {
*services.BaseService
}
func New ¶
func New(base *services.BaseService) *ScanService
func (*ScanService) Register ¶
func (s *ScanService) Register(container *restful.Container)
func (*ScanService) RegisterSessions ¶
func (s *ScanService) RegisterSessions(ws *restful.WebService)
func (*ScanService) TakeScan ¶
func (s *ScanService) TakeScan(fn ScanFunction) restful.RouteFunction
Decorate restful.RouteFunction. Look for scan by ParamId and add scan object in the end. If scan is not found then return Not Found. Also check project permission for current user.
func (*ScanService) TakeSession ¶
func (s *ScanService) TakeSession(fn SessionFunction) ScanFunction
Decorate ScanFunction. Look for session in scan by SessionParamId and add session object in the end. If session is not found then return Not Found.
type SessionFunction ¶
type SessionUpdateEntity ¶
type SessionUpdateEntity struct {
Status scan.ScanStatus `json:"status" description:"one of [working|finished|failed]"`
}
Click to show internal directories.
Click to hide internal directories.