Documentation ¶
Index ¶
- func DecodeFindRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DecodeListRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DecodeSubmitRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func EncodeFindError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, ...) func(context.Context, http.ResponseWriter, error) error
- func EncodeFindResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeListResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeSubmitError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, ...) func(context.Context, http.ResponseWriter, error) error
- func EncodeSubmitResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func FindVulnerabilitiesPath(id uint64) string
- func ListVulnerabilitiesPath() string
- func Mount(mux goahttp.Muxer, h *Server)
- func MountFindHandler(mux goahttp.Muxer, h http.Handler)
- func MountListHandler(mux goahttp.Muxer, h http.Handler)
- func MountSubmitHandler(mux goahttp.Muxer, h http.Handler)
- func NewFindHandler(endpoint endpoint.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewFindPayload(id uint64) *vulnerabilities.FindPayload
- func NewListHandler(endpoint endpoint.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewListLimitPayload(limit *int32) *vulnerabilities.LimitPayload
- func NewSubmitHandler(endpoint endpoint.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewSubmitPayload(body *SubmitRequestBody) *vulnerabilities.SubmitPayload
- func SubmitVulnerabilitiesPath() string
- type ErrorNamer
- type FindNoMatchResponseBody
- type FindResponseBody
- type ListResponseBody
- type MountPoint
- type Server
- type SubmitNoMatchResponseBody
- type SubmitRequestBody
- type VulnerabilityResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeFindRequest ¶
func DecodeFindRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeFindRequest returns a decoder for requests sent to the vulnerabilities find endpoint.
func DecodeListRequest ¶
func DecodeListRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeListRequest returns a decoder for requests sent to the vulnerabilities list endpoint.
func DecodeSubmitRequest ¶
func DecodeSubmitRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeSubmitRequest returns a decoder for requests sent to the vulnerabilities submit endpoint.
func EncodeFindError ¶
func EncodeFindError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error
EncodeFindError returns an encoder for errors returned by the find vulnerabilities endpoint.
func EncodeFindResponse ¶
func EncodeFindResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeFindResponse returns an encoder for responses returned by the vulnerabilities find endpoint.
func EncodeListResponse ¶
func EncodeListResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeListResponse returns an encoder for responses returned by the vulnerabilities list endpoint.
func EncodeSubmitError ¶
func EncodeSubmitError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error
EncodeSubmitError returns an encoder for errors returned by the submit vulnerabilities endpoint.
func EncodeSubmitResponse ¶
func EncodeSubmitResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeSubmitResponse returns an encoder for responses returned by the vulnerabilities submit endpoint.
func FindVulnerabilitiesPath ¶
FindVulnerabilitiesPath returns the URL path to the vulnerabilities service find HTTP endpoint.
func ListVulnerabilitiesPath ¶
func ListVulnerabilitiesPath() string
ListVulnerabilitiesPath returns the URL path to the vulnerabilities service list HTTP endpoint.
func MountFindHandler ¶
MountFindHandler configures the mux to serve the "vulnerabilities" service "find" endpoint.
func MountListHandler ¶
MountListHandler configures the mux to serve the "vulnerabilities" service "list" endpoint.
func MountSubmitHandler ¶
MountSubmitHandler configures the mux to serve the "vulnerabilities" service "submit" endpoint.
func NewFindHandler ¶
func NewFindHandler( endpoint endpoint.Endpoint, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(err error) goahttp.Statuser, ) http.Handler
NewFindHandler creates a HTTP handler which loads the HTTP request and calls the "vulnerabilities" service "find" endpoint.
func NewFindPayload ¶
func NewFindPayload(id uint64) *vulnerabilities.FindPayload
NewFindPayload builds a vulnerabilities service find endpoint payload.
func NewListHandler ¶
func NewListHandler( endpoint endpoint.Endpoint, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(err error) goahttp.Statuser, ) http.Handler
NewListHandler creates a HTTP handler which loads the HTTP request and calls the "vulnerabilities" service "list" endpoint.
func NewListLimitPayload ¶
func NewListLimitPayload(limit *int32) *vulnerabilities.LimitPayload
NewListLimitPayload builds a vulnerabilities service list endpoint payload.
func NewSubmitHandler ¶
func NewSubmitHandler( endpoint endpoint.Endpoint, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(err error) goahttp.Statuser, ) http.Handler
NewSubmitHandler creates a HTTP handler which loads the HTTP request and calls the "vulnerabilities" service "submit" endpoint.
func NewSubmitPayload ¶
func NewSubmitPayload(body *SubmitRequestBody) *vulnerabilities.SubmitPayload
NewSubmitPayload builds a vulnerabilities service submit endpoint payload.
func SubmitVulnerabilitiesPath ¶
func SubmitVulnerabilitiesPath() string
SubmitVulnerabilitiesPath returns the URL path to the vulnerabilities service submit HTTP endpoint.
Types ¶
type ErrorNamer ¶
type ErrorNamer interface {
ErrorName() string
}
ErrorNamer is an interface implemented by generated error structs that exposes the name of the error as defined in the design.
type FindNoMatchResponseBody ¶
type FindNoMatchResponseBody string
FindNoMatchResponseBody is the type of the "vulnerabilities" service "find" endpoint HTTP response body for the "no_match" error.
func NewFindNoMatchResponseBody ¶
func NewFindNoMatchResponseBody(res vulnerabilities.NoMatch) FindNoMatchResponseBody
NewFindNoMatchResponseBody builds the HTTP response body from the result of the "find" endpoint of the "vulnerabilities" service.
type FindResponseBody ¶
type FindResponseBody struct { // Unique ID of the vulnerability ID uint64 `form:"id" json:"id" xml:"id"` // Title of the vulnerability Title *string `form:"title,omitempty" json:"title,omitempty" xml:"title,omitempty"` // Description of the vulnerability Description *string `form:"description,omitempty" json:"description,omitempty" xml:"description,omitempty"` // If the vulnerability is exploitable Exploitable *bool `form:"exploitable,omitempty" json:"exploitable,omitempty" xml:"exploitable,omitempty"` // Severity score of the vulnerability CvssScore *float32 `form:"cvss_score,omitempty" json:"cvss_score,omitempty" xml:"cvss_score,omitempty"` // If the vulnerability is patchable IsPatchable *bool `form:"is_patchable,omitempty" json:"is_patchable,omitempty" xml:"is_patchable,omitempty"` // If the vulnerability is upgradeable IsUpgradeable *bool `form:"is_upgradeable,omitempty" json:"is_upgradeable,omitempty" xml:"is_upgradeable,omitempty"` }
FindResponseBody is the type of the "vulnerabilities" service "find" endpoint HTTP response body.
func NewFindResponseBody ¶
func NewFindResponseBody(res *vulnerabilities.Vulnerability) *FindResponseBody
NewFindResponseBody builds the HTTP response body from the result of the "find" endpoint of the "vulnerabilities" service.
type ListResponseBody ¶
type ListResponseBody []*VulnerabilityResponse
ListResponseBody is the type of the "vulnerabilities" service "list" endpoint HTTP response body.
func NewListResponseBody ¶
func NewListResponseBody(res []*vulnerabilities.Vulnerability) ListResponseBody
NewListResponseBody builds the HTTP response body from the result of the "list" endpoint of the "vulnerabilities" service.
type MountPoint ¶
type MountPoint struct { // Method is the name of the service method served by the mounted HTTP handler. Method string // Verb is the HTTP method used to match requests to the mounted handler. Verb string // Pattern is the HTTP request path pattern used to match requests to the // mounted handler. Pattern string }
MountPoint holds information about the mounted endpoints.
type Server ¶
Server lists the vulnerabilities service endpoint HTTP handlers.
func New ¶
func New( e *vulnerabilities.Endpoints, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(err error) goahttp.Statuser, ) *Server
New instantiates HTTP handlers for all the vulnerabilities service endpoints using the provided encoder and decoder. The handlers are mounted on the given mux using the HTTP verb and path defined in the design. errhandler is called whenever a response fails to be encoded. formatter is used to format errors returned by the service methods prior to encoding. Both errhandler and formatter are optional and can be nil.
type SubmitNoMatchResponseBody ¶
type SubmitNoMatchResponseBody string
SubmitNoMatchResponseBody is the type of the "vulnerabilities" service "submit" endpoint HTTP response body for the "no_match" error.
func NewSubmitNoMatchResponseBody ¶
func NewSubmitNoMatchResponseBody(res vulnerabilities.NoMatch) SubmitNoMatchResponseBody
NewSubmitNoMatchResponseBody builds the HTTP response body from the result of the "submit" endpoint of the "vulnerabilities" service.
type SubmitRequestBody ¶
type SubmitRequestBody struct { // Title of the vulnerability Title *string `form:"title,omitempty" json:"title,omitempty" xml:"title,omitempty"` // Description of the vulnerability Description *string `form:"description,omitempty" json:"description,omitempty" xml:"description,omitempty"` // If the vulnerability is exploitable Exploitable *bool `form:"exploitable,omitempty" json:"exploitable,omitempty" xml:"exploitable,omitempty"` // Severity score of the vulnerability CvssScore *float32 `form:"cvss_score,omitempty" json:"cvss_score,omitempty" xml:"cvss_score,omitempty"` // If the vulnerability is patchable IsPatchable *bool `form:"is_patchable,omitempty" json:"is_patchable,omitempty" xml:"is_patchable,omitempty"` // If the vulnerability is upgradeable IsUpgradeable *bool `form:"is_upgradeable,omitempty" json:"is_upgradeable,omitempty" xml:"is_upgradeable,omitempty"` }
SubmitRequestBody is the type of the "vulnerabilities" service "submit" endpoint HTTP request body.
type VulnerabilityResponse ¶
type VulnerabilityResponse struct { // Unique ID of the vulnerability ID uint64 `form:"id" json:"id" xml:"id"` // Title of the vulnerability Title *string `form:"title,omitempty" json:"title,omitempty" xml:"title,omitempty"` // Description of the vulnerability Description *string `form:"description,omitempty" json:"description,omitempty" xml:"description,omitempty"` // If the vulnerability is exploitable Exploitable *bool `form:"exploitable,omitempty" json:"exploitable,omitempty" xml:"exploitable,omitempty"` // Severity score of the vulnerability CvssScore *float32 `form:"cvss_score,omitempty" json:"cvss_score,omitempty" xml:"cvss_score,omitempty"` // If the vulnerability is patchable IsPatchable *bool `form:"is_patchable,omitempty" json:"is_patchable,omitempty" xml:"is_patchable,omitempty"` // If the vulnerability is upgradeable IsUpgradeable *bool `form:"is_upgradeable,omitempty" json:"is_upgradeable,omitempty" xml:"is_upgradeable,omitempty"` }
VulnerabilityResponse is used to define fields on response body types.