issues

package
v1.1.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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

func NewGetFindingByIssueTargetAndAffectedResourceEndpoint(s Service) goa.Endpoint

NewGetFindingByIssueTargetAndAffectedResourceEndpoint returns an endpoint function that calls the method "Get finding by issue, target and affected resource" of service "issues".

func NewGetIssueEndpoint

func NewGetIssueEndpoint(s Service) goa.Endpoint

NewGetIssueEndpoint returns an endpoint function that calls the method "Get issue" of service "issues".

func NewGetIssueMTTREndpoint

func NewGetIssueMTTREndpoint(s Service) goa.Endpoint

NewGetIssueMTTREndpoint returns an endpoint function that calls the method "Get issue MTTR" of service "issues".

func NewIssuesSummaryEndpoint

func NewIssuesSummaryEndpoint(s Service) goa.Endpoint

NewIssuesSummaryEndpoint returns an endpoint function that calls the method "Issues summary" of service "issues".

func NewListFindingsByIssueEndpoint

func NewListFindingsByIssueEndpoint(s Service) goa.Endpoint

NewListFindingsByIssueEndpoint returns an endpoint function that calls the method "List findings by issue" of service "issues".

func NewListIssuesEndpoint

func NewListIssuesEndpoint(s Service) goa.Endpoint

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) GetIssue

func (c *Client) GetIssue(ctx context.Context, p *GetIssuePayload) (res *Issue, err error)

GetIssue calls the "Get issue" endpoint of the "issues" service.

func (*Client) GetIssueMTTR

func (c *Client) GetIssueMTTR(ctx context.Context, p *GetIssueMTTRPayload) (res float32, err error)

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

func NewEndpoints(s Service) *Endpoints

NewEndpoints wraps the methods of the "issues" service with endpoints.

func (*Endpoints) Use

func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint)

Use applies the given middleware to all the "issues" service 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 IssueSummary struct {
	// Issue ID
	IssueID *string
	// Issue summary
	Summary *string
	// Number of affected targets for issue
	TargetsCount *int
	// Number of affected resources for issue
	ResourcesCount *int
	// Max score for issue
	MaxScore *float32
}

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 ResourceGroup struct {
	// Name of the resource group
	Name *string
	// Column names of the resource group in the order that should be rendered
	Attributes []string
	// List containing the resource rows as hashmap
	Resources []map[string]string
}

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.

type Sourcewithnotarget

type Sourcewithnotarget struct {
	// Source ID
	ID *string
	// Source name
	Name *string
	// Source component
	Component *string
	// Source instance
	Instance *string
	// Source options
	Options *string
	// Time on which the source scanned the target
	Time *string
}

type Target

type Target struct {
	// Target ID
	ID *string
	// Target identifier
	Identifier *string
	// List of teams associated with target
	Teams []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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