Skip to main content

web

import "redn3t.com/odirscan/internal/web"

Package web provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.6.0 DO NOT EDIT.

Index

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

type AnalysisFinding

AnalysisFinding defines model for AnalysisFinding.

type AnalysisFinding struct {
Extension *string `json:"extension,omitempty"`
Filename *string `json:"filename,omitempty"`
InterestScore *float64 `json:"interest_score,omitempty"`
Mime *string `json:"mime,omitempty"`
Size *int64 `json:"size,omitempty"`
Tags *[]string `json:"tags,omitempty"`
Url *string `json:"url,omitempty"`
}

type AnalysisHealthcheckResult

AnalysisHealthcheckResult defines model for AnalysisHealthcheckResult.

type AnalysisHealthcheckResult struct {
AnalysisId *openapi_types.UUID `json:"analysis_id,omitempty"`
ScanId *openapi_types.UUID `json:"scan_id,omitempty"`
Status *AnalysisStatus `json:"status,omitempty"`
UserId *string `json:"user_id,omitempty"`
}

type AnalysisResult

AnalysisResult defines model for AnalysisResult.

type AnalysisResult struct {
AnalysisId *openapi_types.UUID `json:"analysis_id,omitempty"`

// FailureReason Present when status is FAILED; describes why the analysis failed.
FailureReason *string `json:"failure_reason,omitempty"`
Findings *[]AnalysisFinding `json:"findings,omitempty"`
Page *int `json:"page,omitempty"`
PageSize *int `json:"page_size,omitempty"`
ScanId *openapi_types.UUID `json:"scan_id,omitempty"`
Status *AnalysisStatus `json:"status,omitempty"`

// Total Total number of analysis findings.
Total *int `json:"total,omitempty"`
UserId *string `json:"user_id,omitempty"`
}

type AnalysisStatus

AnalysisStatus defines model for AnalysisStatus.

type AnalysisStatus string

Defines values for AnalysisStatus.

const (
AnalysisStatusDONE AnalysisStatus = "DONE"
AnalysisStatusFAILED AnalysisStatus = "FAILED"
AnalysisStatusPENDING AnalysisStatus = "PENDING"
AnalysisStatusRUNNING AnalysisStatus = "RUNNING"
)

func (AnalysisStatus) Valid

func (e AnalysisStatus) Valid() bool

Valid indicates whether the value is a known member of the AnalysisStatus enum.

type AnalyzeRequest

AnalyzeRequest defines model for AnalyzeRequest.

type AnalyzeRequest struct {
// Overwrite If true and an analysis already exists for this scan, reset it and re-run. If false (default), a second request returns 409.
Overwrite *bool `json:"overwrite,omitempty"`
}

type AnalyzeRequestResult

AnalyzeRequestResult defines model for AnalyzeRequestResult.

type AnalyzeRequestResult struct {
AnalysisId *openapi_types.UUID `json:"analysis_id,omitempty"`
ScanId *openapi_types.UUID `json:"scan_id,omitempty"`
UserId *string `json:"user_id,omitempty"`
}

type AnalyzeScan202JSONResponse

type AnalyzeScan202JSONResponse AnalyzeRequestResult

func (AnalyzeScan202JSONResponse) VisitAnalyzeScanResponse

func (response AnalyzeScan202JSONResponse) VisitAnalyzeScanResponse(w http.ResponseWriter) error

type AnalyzeScan404Response

type AnalyzeScan404Response struct {
}

func (AnalyzeScan404Response) VisitAnalyzeScanResponse

func (response AnalyzeScan404Response) VisitAnalyzeScanResponse(w http.ResponseWriter) error

type AnalyzeScan409Response

type AnalyzeScan409Response struct {
}

func (AnalyzeScan409Response) VisitAnalyzeScanResponse

func (response AnalyzeScan409Response) VisitAnalyzeScanResponse(w http.ResponseWriter) error

type AnalyzeScan500Response

type AnalyzeScan500Response struct {
}

func (AnalyzeScan500Response) VisitAnalyzeScanResponse

func (response AnalyzeScan500Response) VisitAnalyzeScanResponse(w http.ResponseWriter) error

type AnalyzeScanJSONRequestBody

AnalyzeScanJSONRequestBody defines body for AnalyzeScan for application/json ContentType.

type AnalyzeScanJSONRequestBody = AnalyzeRequest

type AnalyzeScanRequestObject

type AnalyzeScanRequestObject struct {
ScanId ScanId `json:"scan_id"`
Body *AnalyzeScanJSONRequestBody
}

type AnalyzeScanResponseObject

type AnalyzeScanResponseObject interface {
VisitAnalyzeScanResponse(w http.ResponseWriter) error
}

type CreateScan202JSONResponse

type CreateScan202JSONResponse ScanRequestResult

func (CreateScan202JSONResponse) VisitCreateScanResponse

func (response CreateScan202JSONResponse) VisitCreateScanResponse(w http.ResponseWriter) error

type CreateScan400Response

type CreateScan400Response struct {
}

func (CreateScan400Response) VisitCreateScanResponse

func (response CreateScan400Response) VisitCreateScanResponse(w http.ResponseWriter) error

type CreateScan504Response

type CreateScan504Response struct {
}

func (CreateScan504Response) VisitCreateScanResponse

func (response CreateScan504Response) VisitCreateScanResponse(w http.ResponseWriter) error

type CreateScanJSONRequestBody

CreateScanJSONRequestBody defines body for CreateScan for application/json ContentType.

type CreateScanJSONRequestBody = ScanRequest

type CreateScanRequestObject

type CreateScanRequestObject struct {
Body *CreateScanJSONRequestBody
}

type CreateScanResponseObject

type CreateScanResponseObject interface {
VisitCreateScanResponse(w http.ResponseWriter) error
}

type GetAnalysis200JSONResponse

type GetAnalysis200JSONResponse AnalysisResult

func (GetAnalysis200JSONResponse) VisitGetAnalysisResponse

func (response GetAnalysis200JSONResponse) VisitGetAnalysisResponse(w http.ResponseWriter) error

type GetAnalysis400Response

type GetAnalysis400Response struct {
}

func (GetAnalysis400Response) VisitGetAnalysisResponse

func (response GetAnalysis400Response) VisitGetAnalysisResponse(w http.ResponseWriter) error

type GetAnalysis404Response

type GetAnalysis404Response struct {
}

func (GetAnalysis404Response) VisitGetAnalysisResponse

func (response GetAnalysis404Response) VisitGetAnalysisResponse(w http.ResponseWriter) error

type GetAnalysis500Response

type GetAnalysis500Response struct {
}

func (GetAnalysis500Response) VisitGetAnalysisResponse

func (response GetAnalysis500Response) VisitGetAnalysisResponse(w http.ResponseWriter) error

type GetAnalysisHealthcheck200JSONResponse

type GetAnalysisHealthcheck200JSONResponse AnalysisHealthcheckResult

func (GetAnalysisHealthcheck200JSONResponse) VisitGetAnalysisHealthcheckResponse

func (response GetAnalysisHealthcheck200JSONResponse) VisitGetAnalysisHealthcheckResponse(w http.ResponseWriter) error

type GetAnalysisHealthcheck400Response

type GetAnalysisHealthcheck400Response struct {
}

func (GetAnalysisHealthcheck400Response) VisitGetAnalysisHealthcheckResponse

func (response GetAnalysisHealthcheck400Response) VisitGetAnalysisHealthcheckResponse(w http.ResponseWriter) error

type GetAnalysisHealthcheck404Response

type GetAnalysisHealthcheck404Response struct {
}

func (GetAnalysisHealthcheck404Response) VisitGetAnalysisHealthcheckResponse

func (response GetAnalysisHealthcheck404Response) VisitGetAnalysisHealthcheckResponse(w http.ResponseWriter) error

type GetAnalysisHealthcheck500Response

type GetAnalysisHealthcheck500Response struct {
}

func (GetAnalysisHealthcheck500Response) VisitGetAnalysisHealthcheckResponse

func (response GetAnalysisHealthcheck500Response) VisitGetAnalysisHealthcheckResponse(w http.ResponseWriter) error

type GetAnalysisHealthcheckRequestObject

type GetAnalysisHealthcheckRequestObject struct {
ScanId ScanId `json:"scan_id"`
}

type GetAnalysisHealthcheckResponseObject

type GetAnalysisHealthcheckResponseObject interface {
VisitGetAnalysisHealthcheckResponse(w http.ResponseWriter) error
}

type GetAnalysisParams

GetAnalysisParams defines parameters for GetAnalysis.

type GetAnalysisParams struct {
Page *int `form:"page,omitempty" json:"page,omitempty"`
PageSize *int `form:"page_size,omitempty" json:"page_size,omitempty"`
}

type GetAnalysisRequestObject

type GetAnalysisRequestObject struct {
ScanId ScanId `json:"scan_id"`
Params GetAnalysisParams
}

type GetAnalysisResponseObject

type GetAnalysisResponseObject interface {
VisitGetAnalysisResponse(w http.ResponseWriter) error
}

type GetScan200JSONResponse

type GetScan200JSONResponse ScanResult

func (GetScan200JSONResponse) VisitGetScanResponse

func (response GetScan200JSONResponse) VisitGetScanResponse(w http.ResponseWriter) error

type GetScan400Response

type GetScan400Response struct {
}

func (GetScan400Response) VisitGetScanResponse

func (response GetScan400Response) VisitGetScanResponse(w http.ResponseWriter) error

type GetScan404Response

type GetScan404Response struct {
}

func (GetScan404Response) VisitGetScanResponse

func (response GetScan404Response) VisitGetScanResponse(w http.ResponseWriter) error

type GetScanHealthcheck200JSONResponse

type GetScanHealthcheck200JSONResponse ScanHealthcheckResult

func (GetScanHealthcheck200JSONResponse) VisitGetScanHealthcheckResponse

func (response GetScanHealthcheck200JSONResponse) VisitGetScanHealthcheckResponse(w http.ResponseWriter) error

type GetScanHealthcheck400Response

type GetScanHealthcheck400Response struct {
}

func (GetScanHealthcheck400Response) VisitGetScanHealthcheckResponse

func (response GetScanHealthcheck400Response) VisitGetScanHealthcheckResponse(w http.ResponseWriter) error

type GetScanHealthcheck404Response

type GetScanHealthcheck404Response struct {
}

func (GetScanHealthcheck404Response) VisitGetScanHealthcheckResponse

func (response GetScanHealthcheck404Response) VisitGetScanHealthcheckResponse(w http.ResponseWriter) error

type GetScanHealthcheck500Response

type GetScanHealthcheck500Response struct {
}

func (GetScanHealthcheck500Response) VisitGetScanHealthcheckResponse

func (response GetScanHealthcheck500Response) VisitGetScanHealthcheckResponse(w http.ResponseWriter) error

type GetScanHealthcheckRequestObject

type GetScanHealthcheckRequestObject struct {
ScanId ScanId `json:"scan_id"`
}

type GetScanHealthcheckResponseObject

type GetScanHealthcheckResponseObject interface {
VisitGetScanHealthcheckResponse(w http.ResponseWriter) error
}

type GetScanRequestObject

type GetScanRequestObject struct {
ScanId ScanId `json:"scan_id"`
}

type GetScanResponseObject

type GetScanResponseObject interface {
VisitGetScanResponse(w http.ResponseWriter) error
}

type GetScanResults200JSONResponse

type GetScanResults200JSONResponse ScanResultsPage

func (GetScanResults200JSONResponse) VisitGetScanResultsResponse

func (response GetScanResults200JSONResponse) VisitGetScanResultsResponse(w http.ResponseWriter) error

type GetScanResults404Response

type GetScanResults404Response struct {
}

func (GetScanResults404Response) VisitGetScanResultsResponse

func (response GetScanResults404Response) VisitGetScanResultsResponse(w http.ResponseWriter) error

type GetScanResultsParams

GetScanResultsParams defines parameters for GetScanResults.

type GetScanResultsParams struct {
Page *int `form:"page,omitempty" json:"page,omitempty"`
PageSize *int `form:"page_size,omitempty" json:"page_size,omitempty"`
}

type GetScanResultsRequestObject

type GetScanResultsRequestObject struct {
ScanId ScanId `json:"scan_id"`
Params GetScanResultsParams
}

type GetScanResultsResponseObject

type GetScanResultsResponseObject interface {
VisitGetScanResultsResponse(w http.ResponseWriter) error
}

type InvalidParamFormatError

type InvalidParamFormatError struct {
ParamName string
Err error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type ListScans200JSONResponse

type ListScans200JSONResponse []ScanResult

func (ListScans200JSONResponse) VisitListScansResponse

func (response ListScans200JSONResponse) VisitListScansResponse(w http.ResponseWriter) error

type ListScans400Response

type ListScans400Response struct {
}

func (ListScans400Response) VisitListScansResponse

func (response ListScans400Response) VisitListScansResponse(w http.ResponseWriter) error

type ListScans500Response

type ListScans500Response struct {
}

func (ListScans500Response) VisitListScansResponse

func (response ListScans500Response) VisitListScansResponse(w http.ResponseWriter) error

type ListScansParams

ListScansParams defines parameters for ListScans.

type ListScansParams struct {
UserId string `form:"user_id" json:"user_id"`
}

type ListScansRequestObject

type ListScansRequestObject struct {
Params ListScansParams
}

type ListScansResponseObject

type ListScansResponseObject interface {
VisitListScansResponse(w http.ResponseWriter) error
}

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type RequiredHeaderError

type RequiredHeaderError struct {
ParamName string
Err error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type ScanFinding

ScanFinding defines model for ScanFinding.

type ScanFinding struct {
ContentLength *int64 `json:"content_length,omitempty"`
ContentType *string `json:"content_type,omitempty"`
LastModified *time.Time `json:"last_modified,omitempty"`
ScanTime *time.Time `json:"scan_time,omitempty"`
Url *string `json:"url,omitempty"`
}

type ScanHealthcheckResult

ScanHealthcheckResult defines model for ScanHealthcheckResult.

type ScanHealthcheckResult struct {
ScanId *openapi_types.UUID `json:"scan_id,omitempty"`
Status *ScanStatus `json:"status,omitempty"`
UserId *string `json:"user_id,omitempty"`
}

type ScanId

ScanId defines model for ScanId.

type ScanId = openapi_types.UUID

type ScanRequest

ScanRequest defines model for ScanRequest.

type ScanRequest struct {
Urls []string `json:"urls"`

// UserId Injected by upstream auth infrastructure; treated as opaque.
UserId *string `json:"user_id,omitempty"`
}

type ScanRequestResult

ScanRequestResult defines model for ScanRequestResult.

type ScanRequestResult struct {
ScanId *openapi_types.UUID `json:"scan_id,omitempty"`

// StreamUrl Relative path to the WebSocket stream for this scan.
StreamUrl *string `json:"stream_url,omitempty"`
UserId *string `json:"user_id,omitempty"`
}

type ScanResult

ScanResult defines model for ScanResult.

type ScanResult struct {
// FailureReason Present when status is FAILED; describes why the scan failed.
FailureReason *string `json:"failure_reason,omitempty"`
ScanId *openapi_types.UUID `json:"scan_id,omitempty"`
Stats *ScanStats `json:"stats,omitempty"`
Status *ScanStatus `json:"status,omitempty"`

// Urls URLs submitted by the user for this scan.
Urls *[]string `json:"urls,omitempty"`
UserId *string `json:"user_id,omitempty"`
}

type ScanResultsPage

ScanResultsPage defines model for ScanResultsPage.

type ScanResultsPage struct {
Findings *[]ScanFinding `json:"findings,omitempty"`
Page *int `json:"page,omitempty"`
PageSize *int `json:"page_size,omitempty"`
Stats *ScanStats `json:"stats,omitempty"`

// Total Total number of findings for the scan.
Total *int `json:"total,omitempty"`
}

type ScanStats

ScanStats defines model for ScanStats.

type ScanStats struct {
// DurationMs Total scan duration in milliseconds.
DurationMs *int64 `json:"duration_ms,omitempty"`

// ErrorCount Number of HTTP errors encountered during scanning.
ErrorCount *int `json:"error_count,omitempty"`

// FindingCount Number of files found.
FindingCount *int `json:"finding_count,omitempty"`

// FolderCount Number of directories crawled.
FolderCount *int `json:"folder_count,omitempty"`

// SkippedCount Number of URLs filtered by MIME type or subdir keyword.
SkippedCount *int `json:"skipped_count,omitempty"`

// TotalBytes Sum of Content-Length across all findings.
TotalBytes *int64 `json:"total_bytes,omitempty"`
}

type ScanStatus

ScanStatus defines model for ScanStatus.

type ScanStatus string

Defines values for ScanStatus.

const (
ScanStatusDONE ScanStatus = "DONE"
ScanStatusFAILED ScanStatus = "FAILED"
ScanStatusPENDING ScanStatus = "PENDING"
ScanStatusRUNNING ScanStatus = "RUNNING"
)

func (ScanStatus) Valid

func (e ScanStatus) Valid() bool

Valid indicates whether the value is a known member of the ScanStatus enum.

type ServeMux

ServeMux is an abstraction of http.ServeMux.

type ServeMux interface {
HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
ServeHTTP(w http.ResponseWriter, r *http.Request)
}

type Server

type Server struct {
// contains filtered or unexported fields
}

func New

func New(cfg config.WebConfig, nc *nats.Conn, pool *pgxpool.Pool, rt *store.RoutingTable) *Server

func (*Server) AnalyzeScan

func (s *Server) AnalyzeScan(ctx context.Context, req AnalyzeScanRequestObject) (AnalyzeScanResponseObject, error)

func (*Server) CreateScan

func (s *Server) CreateScan(ctx context.Context, req CreateScanRequestObject) (CreateScanResponseObject, error)

func (*Server) GetAnalysis

func (s *Server) GetAnalysis(ctx context.Context, req GetAnalysisRequestObject) (GetAnalysisResponseObject, error)

func (*Server) GetAnalysisHealthcheck

func (s *Server) GetAnalysisHealthcheck(ctx context.Context, req GetAnalysisHealthcheckRequestObject) (GetAnalysisHealthcheckResponseObject, error)

func (*Server) GetScan

func (s *Server) GetScan(ctx context.Context, req GetScanRequestObject) (GetScanResponseObject, error)

func (*Server) GetScanHealthcheck

func (s *Server) GetScanHealthcheck(ctx context.Context, req GetScanHealthcheckRequestObject) (GetScanHealthcheckResponseObject, error)

func (*Server) GetScanResults

func (s *Server) GetScanResults(ctx context.Context, req GetScanResultsRequestObject) (GetScanResultsResponseObject, error)

func (*Server) ListScans

func (s *Server) ListScans(ctx context.Context, req ListScansRequestObject) (ListScansResponseObject, error)

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(ctx context.Context) error

func (*Server) StreamScan

func (s *Server) StreamScan(ctx context.Context, req StreamScanRequestObject) (StreamScanResponseObject, error)

type ServerInterface

ServerInterface represents all server handlers.

type ServerInterface interface {
// Submit a new scan request
// (POST /api/scan)
CreateScan(w http.ResponseWriter, r *http.Request)
// Retrieve scan status and metadata
// (GET /api/scan/{scan_id})
GetScan(w http.ResponseWriter, r *http.Request, scanId ScanId)
// Retrieve analysis status and results
// (GET /api/scan/{scan_id}/analysis)
GetAnalysis(w http.ResponseWriter, r *http.Request, scanId ScanId, params GetAnalysisParams)
// Check whether an analysis is still in-flight
// (GET /api/scan/{scan_id}/analysis/healthcheck)
GetAnalysisHealthcheck(w http.ResponseWriter, r *http.Request, scanId ScanId)
// Submit a scan result for analysis
// (POST /api/scan/{scan_id}/analyze)
AnalyzeScan(w http.ResponseWriter, r *http.Request, scanId ScanId)
// Check whether a scan is still in-flight
// (GET /api/scan/{scan_id}/healthcheck)
GetScanHealthcheck(w http.ResponseWriter, r *http.Request, scanId ScanId)
// Retrieve paginated findings for a completed scan
// (GET /api/scan/{scan_id}/results)
GetScanResults(w http.ResponseWriter, r *http.Request, scanId ScanId, params GetScanResultsParams)
// Stream live scan output over WebSocket
// (GET /api/scan/{scan_id}/stream)
StreamScan(w http.ResponseWriter, r *http.Request, scanId ScanId)
// List all scans for a user
// (GET /api/scans)
ListScans(w http.ResponseWriter, r *http.Request, params ListScansParams)
}

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

func NewStrictHandlerWithOptions

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface

type ServerInterfaceWrapper

ServerInterfaceWrapper converts contexts to parameters.

type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

func (*ServerInterfaceWrapper) AnalyzeScan

func (siw *ServerInterfaceWrapper) AnalyzeScan(w http.ResponseWriter, r *http.Request)

AnalyzeScan operation middleware

func (*ServerInterfaceWrapper) CreateScan

func (siw *ServerInterfaceWrapper) CreateScan(w http.ResponseWriter, r *http.Request)

CreateScan operation middleware

func (*ServerInterfaceWrapper) GetAnalysis

func (siw *ServerInterfaceWrapper) GetAnalysis(w http.ResponseWriter, r *http.Request)

GetAnalysis operation middleware

func (*ServerInterfaceWrapper) GetAnalysisHealthcheck

func (siw *ServerInterfaceWrapper) GetAnalysisHealthcheck(w http.ResponseWriter, r *http.Request)

GetAnalysisHealthcheck operation middleware

func (*ServerInterfaceWrapper) GetScan

func (siw *ServerInterfaceWrapper) GetScan(w http.ResponseWriter, r *http.Request)

GetScan operation middleware

func (*ServerInterfaceWrapper) GetScanHealthcheck

func (siw *ServerInterfaceWrapper) GetScanHealthcheck(w http.ResponseWriter, r *http.Request)

GetScanHealthcheck operation middleware

func (*ServerInterfaceWrapper) GetScanResults

func (siw *ServerInterfaceWrapper) GetScanResults(w http.ResponseWriter, r *http.Request)

GetScanResults operation middleware

func (*ServerInterfaceWrapper) ListScans

func (siw *ServerInterfaceWrapper) ListScans(w http.ResponseWriter, r *http.Request)

ListScans operation middleware

func (*ServerInterfaceWrapper) StreamScan

func (siw *ServerInterfaceWrapper) StreamScan(w http.ResponseWriter, r *http.Request)

StreamScan operation middleware

type StdHTTPServerOptions

type StdHTTPServerOptions struct {
BaseURL string
BaseRouter ServeMux
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StreamScan101Response

type StreamScan101Response struct {
}

func (StreamScan101Response) VisitStreamScanResponse

func (response StreamScan101Response) VisitStreamScanResponse(w http.ResponseWriter) error

type StreamScan200Response

type StreamScan200Response struct {
}

func (StreamScan200Response) VisitStreamScanResponse

func (response StreamScan200Response) VisitStreamScanResponse(w http.ResponseWriter) error

type StreamScan400Response

type StreamScan400Response struct {
}

func (StreamScan400Response) VisitStreamScanResponse

func (response StreamScan400Response) VisitStreamScanResponse(w http.ResponseWriter) error

type StreamScan500Response

type StreamScan500Response struct {
}

func (StreamScan500Response) VisitStreamScanResponse

func (response StreamScan500Response) VisitStreamScanResponse(w http.ResponseWriter) error

type StreamScanRequestObject

type StreamScanRequestObject struct {
ScanId ScanId `json:"scan_id"`
}

type StreamScanResponseObject

type StreamScanResponseObject interface {
VisitStreamScanResponse(w http.ResponseWriter) error
}

type StrictHTTPServerOptions

type StrictHTTPServerOptions struct {
RequestErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictHandlerFunc

type StrictHandlerFunc = strictnethttp.StrictHTTPHandlerFunc

type StrictMiddlewareFunc

type StrictMiddlewareFunc = strictnethttp.StrictHTTPMiddlewareFunc

type StrictServerInterface

StrictServerInterface represents all server handlers.

type StrictServerInterface interface {
// Submit a new scan request
// (POST /api/scan)
CreateScan(ctx context.Context, request CreateScanRequestObject) (CreateScanResponseObject, error)
// Retrieve scan status and metadata
// (GET /api/scan/{scan_id})
GetScan(ctx context.Context, request GetScanRequestObject) (GetScanResponseObject, error)
// Retrieve analysis status and results
// (GET /api/scan/{scan_id}/analysis)
GetAnalysis(ctx context.Context, request GetAnalysisRequestObject) (GetAnalysisResponseObject, error)
// Check whether an analysis is still in-flight
// (GET /api/scan/{scan_id}/analysis/healthcheck)
GetAnalysisHealthcheck(ctx context.Context, request GetAnalysisHealthcheckRequestObject) (GetAnalysisHealthcheckResponseObject, error)
// Submit a scan result for analysis
// (POST /api/scan/{scan_id}/analyze)
AnalyzeScan(ctx context.Context, request AnalyzeScanRequestObject) (AnalyzeScanResponseObject, error)
// Check whether a scan is still in-flight
// (GET /api/scan/{scan_id}/healthcheck)
GetScanHealthcheck(ctx context.Context, request GetScanHealthcheckRequestObject) (GetScanHealthcheckResponseObject, error)
// Retrieve paginated findings for a completed scan
// (GET /api/scan/{scan_id}/results)
GetScanResults(ctx context.Context, request GetScanResultsRequestObject) (GetScanResultsResponseObject, error)
// Stream live scan output over WebSocket
// (GET /api/scan/{scan_id}/stream)
StreamScan(ctx context.Context, request StreamScanRequestObject) (StreamScanResponseObject, error)
// List all scans for a user
// (GET /api/scans)
ListScans(ctx context.Context, request ListScansRequestObject) (ListScansResponseObject, error)
}

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
ParamName string
Count int
}

func (*TooManyValuesForParamError) Error

func (e *TooManyValuesForParamError) Error() string

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
ParamName string
Err error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type UnmarshalingParamError

type UnmarshalingParamError struct {
ParamName string
Err error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

Generated by gomarkdoc