Documentation
¶
Index ¶
- func BuildFindPayload(vulnerabilitiesFindID string) (*vulnerabilities.FindPayload, error)
- func BuildListPayload(vulnerabilitiesListLimit string) (*vulnerabilities.LimitPayload, error)
- func BuildSubmitPayload(vulnerabilitiesSubmitBody string) (*vulnerabilities.SubmitPayload, error)
- func DecodeFindResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func DecodeListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func DecodeSubmitResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func EncodeListRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
- func EncodeSubmitRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
- func FindVulnerabilitiesPath(id uint64) string
- func ListVulnerabilitiesPath() string
- func NewFindNoMatch(body FindNoMatchResponseBody) vulnerabilities.NoMatch
- func NewFindVulnerabilityOK(body *FindResponseBody) *vulnerabilities.Vulnerability
- func NewListVulnerabilityOK(body []*VulnerabilityResponse) []*vulnerabilities.Vulnerability
- func NewSubmitNoMatch(body SubmitNoMatchResponseBody) vulnerabilities.NoMatch
- func SubmitVulnerabilitiesPath() string
- func ValidateFindResponseBody(body *FindResponseBody) (err error)
- func ValidateVulnerabilityResponse(body *VulnerabilityResponse) (err error)
- type Client
- func (c *Client) BuildFindRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) BuildListRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) BuildSubmitRequest(ctx context.Context, v interface{}) (*http.Request, error)
- func (c *Client) Find() endpoint.Endpoint
- func (c *Client) List() endpoint.Endpoint
- func (c *Client) Submit() endpoint.Endpoint
- type FindNoMatchResponseBody
- type FindResponseBody
- type ListResponseBody
- type SubmitNoMatchResponseBody
- type SubmitRequestBody
- type VulnerabilityResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildFindPayload ¶
func BuildFindPayload(vulnerabilitiesFindID string) (*vulnerabilities.FindPayload, error)
BuildFindPayload builds the payload for the vulnerabilities find endpoint from CLI flags.
func BuildListPayload ¶
func BuildListPayload(vulnerabilitiesListLimit string) (*vulnerabilities.LimitPayload, error)
BuildListPayload builds the payload for the vulnerabilities list endpoint from CLI flags.
func BuildSubmitPayload ¶
func BuildSubmitPayload(vulnerabilitiesSubmitBody string) (*vulnerabilities.SubmitPayload, error)
BuildSubmitPayload builds the payload for the vulnerabilities submit endpoint from CLI flags.
func DecodeFindResponse ¶
func DecodeFindResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeFindResponse returns a decoder for responses returned by the vulnerabilities find endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeFindResponse may return the following errors:
- "no_match" (type vulnerabilities.NoMatch): http.StatusNotFound
- error: internal error
func DecodeListResponse ¶
func DecodeListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeListResponse returns a decoder for responses returned by the vulnerabilities list endpoint. restoreBody controls whether the response body should be restored after having been read.
func DecodeSubmitResponse ¶
func DecodeSubmitResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeSubmitResponse returns a decoder for responses returned by the vulnerabilities submit endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeSubmitResponse may return the following errors:
- "no_match" (type vulnerabilities.NoMatch): http.StatusNotFound
- error: internal error
func EncodeListRequest ¶
func EncodeListRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
EncodeListRequest returns an encoder for requests sent to the vulnerabilities list server.
func EncodeSubmitRequest ¶
func EncodeSubmitRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
EncodeSubmitRequest returns an encoder for requests sent to the vulnerabilities submit server.
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 NewFindNoMatch ¶
func NewFindNoMatch(body FindNoMatchResponseBody) vulnerabilities.NoMatch
NewFindNoMatch builds a vulnerabilities service find endpoint no_match error.
func NewFindVulnerabilityOK ¶
func NewFindVulnerabilityOK(body *FindResponseBody) *vulnerabilities.Vulnerability
NewFindVulnerabilityOK builds a "vulnerabilities" service "find" endpoint result from a HTTP "OK" response.
func NewListVulnerabilityOK ¶
func NewListVulnerabilityOK(body []*VulnerabilityResponse) []*vulnerabilities.Vulnerability
NewListVulnerabilityOK builds a "vulnerabilities" service "list" endpoint result from a HTTP "OK" response.
func NewSubmitNoMatch ¶
func NewSubmitNoMatch(body SubmitNoMatchResponseBody) vulnerabilities.NoMatch
NewSubmitNoMatch builds a vulnerabilities service submit endpoint no_match error.
func SubmitVulnerabilitiesPath ¶
func SubmitVulnerabilitiesPath() string
SubmitVulnerabilitiesPath returns the URL path to the vulnerabilities service submit HTTP endpoint.
func ValidateFindResponseBody ¶
func ValidateFindResponseBody(body *FindResponseBody) (err error)
ValidateFindResponseBody runs the validations defined on FindResponseBody
func ValidateVulnerabilityResponse ¶
func ValidateVulnerabilityResponse(body *VulnerabilityResponse) (err error)
ValidateVulnerabilityResponse runs the validations defined on VulnerabilityResponse
Types ¶
type Client ¶
type Client struct { // Find Doer is the HTTP client used to make requests to the find endpoint. FindDoer goahttp.Doer // List Doer is the HTTP client used to make requests to the list endpoint. ListDoer goahttp.Doer // Submit Doer is the HTTP client used to make requests to the submit endpoint. SubmitDoer goahttp.Doer // RestoreResponseBody controls whether the response bodies are reset after // decoding so they can be read again. RestoreResponseBody bool // contains filtered or unexported fields }
Client lists the vulnerabilities service endpoint HTTP clients.
func NewClient ¶
func NewClient( scheme string, host string, doer goahttp.Doer, enc func(*http.Request) goahttp.Encoder, dec func(*http.Response) goahttp.Decoder, restoreBody bool, ) *Client
NewClient instantiates HTTP clients for all the vulnerabilities service servers.
func (*Client) BuildFindRequest ¶
BuildFindRequest instantiates a HTTP request object with method and path set to call the "vulnerabilities" service "find" endpoint
func (*Client) BuildListRequest ¶
BuildListRequest instantiates a HTTP request object with method and path set to call the "vulnerabilities" service "list" endpoint
func (*Client) BuildSubmitRequest ¶
BuildSubmitRequest instantiates a HTTP request object with method and path set to call the "vulnerabilities" service "submit" endpoint
func (*Client) Find ¶
Find returns an endpoint that makes HTTP requests to the vulnerabilities service find server.
type FindNoMatchResponseBody ¶
type FindNoMatchResponseBody string
FindNoMatchResponseBody is the type of the "vulnerabilities" service "find" endpoint HTTP response body for the "no_match" error.
type FindResponseBody ¶
type FindResponseBody struct { // Unique ID of the vulnerability ID *uint64 `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // 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.
type ListResponseBody ¶
type ListResponseBody []*VulnerabilityResponse
ListResponseBody is the type of the "vulnerabilities" service "list" endpoint HTTP response body.
type SubmitNoMatchResponseBody ¶
type SubmitNoMatchResponseBody string
SubmitNoMatchResponseBody is the type of the "vulnerabilities" service "submit" endpoint HTTP response body for the "no_match" error.
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.
func NewSubmitRequestBody ¶
func NewSubmitRequestBody(p *vulnerabilities.SubmitPayload) *SubmitRequestBody
NewSubmitRequestBody builds the HTTP request body from the payload of the "submit" endpoint of the "vulnerabilities" service.
type VulnerabilityResponse ¶
type VulnerabilityResponse struct { // Unique ID of the vulnerability ID *uint64 `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // 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.