scan

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: 18 Imported by: 2

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 ScanFunction func(*restful.Request, *restful.Response, *scan.Scan)

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 SessionFunction func(*restful.Request, *restful.Response, *scan.Scan, *scan.Session)

type SessionUpdateEntity

type SessionUpdateEntity struct {
	Status scan.ScanStatus `json:"status" description:"one of [working|finished|failed]"`
}

Jump to

Keyboard shortcuts

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