Documentation ¶
Index ¶
- Constants
- Variables
- func NewGetFindingByIssueTargetAndAffectedResourceEndpoint(s Service) goa.Endpoint
- func NewGetIssueEndpoint(s Service) goa.Endpoint
- func NewGetIssueMTTREndpoint(s Service) goa.Endpoint
- func NewIssuesSummaryEndpoint(s Service) goa.Endpoint
- func NewListFindingsByIssueEndpoint(s Service) goa.Endpoint
- func NewListIssuesEndpoint(s Service) goa.Endpoint
- func NewViewedFinding(res *Finding, view string) *issuesviews.Finding
- func NewViewedFindingCollection(res FindingCollection, view string) issuesviews.FindingCollection
- func NewViewedIssue(res *Issue, view string) *issuesviews.Issue
- func NewViewedIssueCollection(res IssueCollection, view string) issuesviews.IssueCollection
- func NewViewedIssueSummaryCollection(res IssueSummaryCollection, view string) issuesviews.IssueSummaryCollection
- type Client
- func (c *Client) GetFindingByIssueTargetAndAffectedResource(ctx context.Context, p *GetFindingByIssueTargetAndAffectedResourcePayload) (res *Finding, err error)
- func (c *Client) GetIssue(ctx context.Context, p *GetIssuePayload) (res *Issue, err error)
- func (c *Client) GetIssueMTTR(ctx context.Context, p *GetIssueMTTRPayload) (res float32, err error)
- func (c *Client) IssuesSummary(ctx context.Context, p *IssuesSummaryPayload) (res IssueSummaryCollection, err error)
- func (c *Client) ListFindingsByIssue(ctx context.Context, p *ListFindingsByIssuePayload) (res FindingCollection, err error)
- func (c *Client) ListIssues(ctx context.Context, p *ListIssuesPayload) (res IssueCollection, err error)
- type Endpoints
- type Finding
- type FindingCollection
- type GetFindingByIssueTargetAndAffectedResourcePayload
- type GetIssueMTTRPayload
- type GetIssuePayload
- type Issue
- type IssueCollection
- type IssueSummary
- type IssueSummaryCollection
- type IssuesSummaryPayload
- type ListFindingsByIssuePayload
- type ListIssuesPayload
- type ResourceGroup
- type Service
- type Sourcewithnotarget
- type Target
Constants ¶
const ServiceName = "issues"
ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.
Variables ¶
var MethodNames = [6]string{"List issues", "Issues summary", "Get issue", "List findings by issue", "Get finding by issue, target and affected resource", "Get issue MTTR"}
MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.
Functions ¶
func NewGetFindingByIssueTargetAndAffectedResourceEndpoint ¶
NewGetFindingByIssueTargetAndAffectedResourceEndpoint returns an endpoint function that calls the method "Get finding by issue, target and affected resource" of service "issues".
func NewGetIssueEndpoint ¶
NewGetIssueEndpoint returns an endpoint function that calls the method "Get issue" of service "issues".
func NewGetIssueMTTREndpoint ¶
NewGetIssueMTTREndpoint returns an endpoint function that calls the method "Get issue MTTR" of service "issues".
func NewIssuesSummaryEndpoint ¶
NewIssuesSummaryEndpoint returns an endpoint function that calls the method "Issues summary" of service "issues".
func NewListFindingsByIssueEndpoint ¶
NewListFindingsByIssueEndpoint returns an endpoint function that calls the method "List findings by issue" of service "issues".
func NewListIssuesEndpoint ¶
NewListIssuesEndpoint returns an endpoint function that calls the method "List issues" of service "issues".
func NewViewedFinding ¶
func NewViewedFinding(res *Finding, view string) *issuesviews.Finding
NewViewedFinding initializes viewed result type Finding from result type Finding using the given view.
func NewViewedFindingCollection ¶
func NewViewedFindingCollection(res FindingCollection, view string) issuesviews.FindingCollection
NewViewedFindingCollection initializes viewed result type FindingCollection from result type FindingCollection using the given view.
func NewViewedIssue ¶
func NewViewedIssue(res *Issue, view string) *issuesviews.Issue
NewViewedIssue initializes viewed result type Issue from result type Issue using the given view.
func NewViewedIssueCollection ¶
func NewViewedIssueCollection(res IssueCollection, view string) issuesviews.IssueCollection
NewViewedIssueCollection initializes viewed result type IssueCollection from result type IssueCollection using the given view.
func NewViewedIssueSummaryCollection ¶
func NewViewedIssueSummaryCollection(res IssueSummaryCollection, view string) issuesviews.IssueSummaryCollection
NewViewedIssueSummaryCollection initializes viewed result type IssueSummaryCollection from result type IssueSummaryCollection using the given view.
Types ¶
type Client ¶
type Client struct { ListIssuesEndpoint goa.Endpoint IssuesSummaryEndpoint goa.Endpoint GetIssueEndpoint goa.Endpoint ListFindingsByIssueEndpoint goa.Endpoint GetFindingByIssueTargetAndAffectedResourceEndpoint goa.Endpoint GetIssueMTTREndpoint goa.Endpoint }
Client is the "issues" service client.
func NewClient ¶
func NewClient(listIssues, issuesSummary, getIssue, listFindingsByIssue, getFindingByIssueTargetAndAffectedResource, getIssueMTTR goa.Endpoint) *Client
NewClient initializes a "issues" service client given the endpoints.
func (*Client) GetFindingByIssueTargetAndAffectedResource ¶
func (c *Client) GetFindingByIssueTargetAndAffectedResource(ctx context.Context, p *GetFindingByIssueTargetAndAffectedResourcePayload) (res *Finding, err error)
GetFindingByIssueTargetAndAffectedResource calls the "Get finding by issue, target and affected resource" endpoint of the "issues" service.
func (*Client) GetIssueMTTR ¶
GetIssueMTTR calls the "Get issue MTTR" endpoint of the "issues" service.
func (*Client) IssuesSummary ¶
func (c *Client) IssuesSummary(ctx context.Context, p *IssuesSummaryPayload) (res IssueSummaryCollection, err error)
IssuesSummary calls the "Issues summary" endpoint of the "issues" service.
func (*Client) ListFindingsByIssue ¶
func (c *Client) ListFindingsByIssue(ctx context.Context, p *ListFindingsByIssuePayload) (res FindingCollection, err error)
ListFindingsByIssue calls the "List findings by issue" endpoint of the "issues" service.
func (*Client) ListIssues ¶
func (c *Client) ListIssues(ctx context.Context, p *ListIssuesPayload) (res IssueCollection, err error)
ListIssues calls the "List issues" endpoint of the "issues" service.
type Endpoints ¶
type Endpoints struct { ListIssues goa.Endpoint IssuesSummary goa.Endpoint GetIssue goa.Endpoint ListFindingsByIssue goa.Endpoint GetFindingByIssueTargetAndAffectedResource goa.Endpoint GetIssueMTTR goa.Endpoint }
Endpoints wraps the "issues" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "issues" service with endpoints.
type Finding ¶
type Finding struct { // Finding ID ID *string // Issue Issue *Issue // Target Target *Target // Source Source *Sourcewithnotarget // Finding details Details *string // Finding impact details ImpactDetails *string // Finding status. Can be 'OPEN' or 'FIXED'. Status *string // Finding severity score Score *float32 // Other resources associated with the finding Resources []*ResourceGroup }
Finding is the result type of the issues service Get finding by issue, target and affected resource method.
func NewFinding ¶
func NewFinding(vres *issuesviews.Finding) *Finding
NewFinding initializes result type Finding from viewed result type Finding.
type FindingCollection ¶
type FindingCollection []*Finding
FindingCollection is the result type of the issues service List findings by issue method.
func NewFindingCollection ¶
func NewFindingCollection(vres issuesviews.FindingCollection) FindingCollection
NewFindingCollection initializes result type FindingCollection from viewed result type FindingCollection.
type GetFindingByIssueTargetAndAffectedResourcePayload ¶
type GetFindingByIssueTargetAndAffectedResourcePayload struct { // Issue ID IssueID *string // Target ID TargetID *string // Resource identifier Resource *string }
GetFindingByIssueTargetAndAffectedResourcePayload is the payload type of the issues service Get finding by issue, target and affected resource method.
type GetIssueMTTRPayload ¶
type GetIssueMTTRPayload struct { // Issue ID ID *string }
GetIssueMTTRPayload is the payload type of the issues service Get issue MTTR method.
type GetIssuePayload ¶
type GetIssuePayload struct { // Issue ID ID *string }
GetIssuePayload is the payload type of the issues service Get issue method.
type Issue ¶
type Issue struct { // Issue ID ID *string // Issue summary Summary *string // Common Weakness Enumeration ID CweID *int // Issue description Description *string // Recommendations to fix the issue Recommendations []string // Documentation reference for the issue ReferenceLinks []string // Labels associated with the issue Labels []string }
Issue is the result type of the issues service Get issue method.
func NewIssue ¶
func NewIssue(vres *issuesviews.Issue) *Issue
NewIssue initializes result type Issue from viewed result type Issue.
type IssueCollection ¶
type IssueCollection []*Issue
IssueCollection is the result type of the issues service List issues method.
func NewIssueCollection ¶
func NewIssueCollection(vres issuesviews.IssueCollection) IssueCollection
NewIssueCollection initializes result type IssueCollection from viewed result type IssueCollection.
type IssueSummary ¶
type IssueSummaryCollection ¶
type IssueSummaryCollection []*IssueSummary
IssueSummaryCollection is the result type of the issues service Issues summary method.
func NewIssueSummaryCollection ¶
func NewIssueSummaryCollection(vres issuesviews.IssueSummaryCollection) IssueSummaryCollection
NewIssueSummaryCollection initializes result type IssueSummaryCollection from viewed result type IssueSummaryCollection.
type IssuesSummaryPayload ¶
type IssuesSummaryPayload struct { // Targets team filter Team *string // Targets multiple team filter, separated by commas Teams *string // Finding status filter. Can be 'OPEN' or 'FIXED'. Status *string // Sorting criteria. Supported fields: max_score, targets_count (use - for // descending order. E.g.: -max_score) SortBy *string // Number of page requested Page *int // Number of results per page Size *int // A list of asset identifiers Identifiers *string // List of labels to filter by Labels *string }
IssuesSummaryPayload is the payload type of the issues service Issues summary method.
type ListFindingsByIssuePayload ¶
type ListFindingsByIssuePayload struct { // Issue ID ID *string // Finding status filter. Can be 'OPEN' or 'FIXED'. Status *string // Sorting criteria. Supported fields: score, -score (for descending order) SortBy *string // Number of page requested Page *int // Number of results per page Size *int // A list of asset identifiers Identifiers *string // List of labels to filter by Labels *string }
ListFindingsByIssuePayload is the payload type of the issues service List findings by issue method.
type ListIssuesPayload ¶
type ListIssuesPayload struct { // Number of page requested Page *int // Number of results per page Size *int }
ListIssuesPayload is the payload type of the issues service List issues method.
type ResourceGroup ¶
type Service ¶
type Service interface { // ListIssues implements List issues. ListIssues(context.Context, *ListIssuesPayload) (res IssueCollection, err error) // IssuesSummary implements Issues summary. IssuesSummary(context.Context, *IssuesSummaryPayload) (res IssueSummaryCollection, err error) // GetIssue implements Get issue. GetIssue(context.Context, *GetIssuePayload) (res *Issue, err error) // ListFindingsByIssue implements List findings by issue. ListFindingsByIssue(context.Context, *ListFindingsByIssuePayload) (res FindingCollection, err error) // GetFindingByIssueTargetAndAffectedResource implements Get finding by issue, // target and affected resource. GetFindingByIssueTargetAndAffectedResource(context.Context, *GetFindingByIssueTargetAndAffectedResourcePayload) (res *Finding, err error) // GetIssueMTTR implements Get issue MTTR. GetIssueMTTR(context.Context, *GetIssueMTTRPayload) (res float32, err error) }
Issues endpoint.