Documentation ¶
Index ¶
- Constants
- Variables
- func NewCreateTargetEndpoint(s Service) goa.Endpoint
- func NewDeleteTargetTeamEndpoint(s Service) goa.Endpoint
- func NewDeleteTeamEndpoint(s Service) goa.Endpoint
- func NewGetFindingByTargetIssueAndAffectedResourceEndpoint(s Service) goa.Endpoint
- func NewGetTargetEndpoint(s Service) goa.Endpoint
- func NewGetTargetMTTREndpoint(s Service) goa.Endpoint
- func NewListFindingsByTargetEndpoint(s Service) goa.Endpoint
- func NewListTargetsEndpoint(s Service) goa.Endpoint
- func NewTargetsSummaryEndpoint(s Service) goa.Endpoint
- func NewViewedFinding(res *Finding, view string) *targetsviews.Finding
- func NewViewedFindingCollection(res FindingCollection, view string) targetsviews.FindingCollection
- func NewViewedTarget(res *Target, view string) *targetsviews.Target
- func NewViewedTargetCollection(res TargetCollection, view string) targetsviews.TargetCollection
- func NewViewedTargetSummaryCollection(res TargetSummaryCollection, view string) targetsviews.TargetSummaryCollection
- type Client
- func (c *Client) CreateTarget(ctx context.Context, p *CreateTargetPayload) (res *Target, err error)
- func (c *Client) DeleteTargetTeam(ctx context.Context, p *DeleteTargetTeamPayload) (err error)
- func (c *Client) DeleteTeam(ctx context.Context, p *DeleteTeamPayload) (err error)
- func (c *Client) GetFindingByTargetIssueAndAffectedResource(ctx context.Context, p *GetFindingByTargetIssueAndAffectedResourcePayload) (res *Finding, err error)
- func (c *Client) GetTarget(ctx context.Context, p *GetTargetPayload) (res *Target, err error)
- func (c *Client) GetTargetMTTR(ctx context.Context, p *GetTargetMTTRPayload) (res float32, err error)
- func (c *Client) ListFindingsByTarget(ctx context.Context, p *ListFindingsByTargetPayload) (res FindingCollection, err error)
- func (c *Client) ListTargets(ctx context.Context, p *ListTargetsPayload) (res TargetCollection, err error)
- func (c *Client) TargetsSummary(ctx context.Context, p *TargetsSummaryPayload) (res TargetSummaryCollection, err error)
- type CreateTargetPayload
- type DeleteTargetTeamPayload
- type DeleteTeamPayload
- type Endpoints
- type Finding
- type FindingCollection
- type GetFindingByTargetIssueAndAffectedResourcePayload
- type GetTargetMTTRPayload
- type GetTargetPayload
- type Issue
- type ListFindingsByTargetPayload
- type ListTargetsPayload
- type ResourceGroup
- type Service
- type Sourcewithnotarget
- type Target
- type TargetCollection
- type TargetSummary
- type TargetSummaryCollection
- type TargetsSummaryPayload
Constants ¶
const ServiceName = "targets"
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 = [9]string{"List targets", "Targets summary", "Get target", "Create target", "List findings by target", "Get finding by target, issue and affected resource", "Get target MTTR", "Delete target team", "Delete team"}
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 NewCreateTargetEndpoint ¶
NewCreateTargetEndpoint returns an endpoint function that calls the method "Create target" of service "targets".
func NewDeleteTargetTeamEndpoint ¶ added in v1.1.0
NewDeleteTargetTeamEndpoint returns an endpoint function that calls the method "Delete target team" of service "targets".
func NewDeleteTeamEndpoint ¶ added in v1.1.0
NewDeleteTeamEndpoint returns an endpoint function that calls the method "Delete team" of service "targets".
func NewGetFindingByTargetIssueAndAffectedResourceEndpoint ¶
NewGetFindingByTargetIssueAndAffectedResourceEndpoint returns an endpoint function that calls the method "Get finding by target, issue and affected resource" of service "targets".
func NewGetTargetEndpoint ¶
NewGetTargetEndpoint returns an endpoint function that calls the method "Get target" of service "targets".
func NewGetTargetMTTREndpoint ¶
NewGetTargetMTTREndpoint returns an endpoint function that calls the method "Get target MTTR" of service "targets".
func NewListFindingsByTargetEndpoint ¶
NewListFindingsByTargetEndpoint returns an endpoint function that calls the method "List findings by target" of service "targets".
func NewListTargetsEndpoint ¶
NewListTargetsEndpoint returns an endpoint function that calls the method "List targets" of service "targets".
func NewTargetsSummaryEndpoint ¶
NewTargetsSummaryEndpoint returns an endpoint function that calls the method "Targets summary" of service "targets".
func NewViewedFinding ¶
func NewViewedFinding(res *Finding, view string) *targetsviews.Finding
NewViewedFinding initializes viewed result type Finding from result type Finding using the given view.
func NewViewedFindingCollection ¶
func NewViewedFindingCollection(res FindingCollection, view string) targetsviews.FindingCollection
NewViewedFindingCollection initializes viewed result type FindingCollection from result type FindingCollection using the given view.
func NewViewedTarget ¶
func NewViewedTarget(res *Target, view string) *targetsviews.Target
NewViewedTarget initializes viewed result type Target from result type Target using the given view.
func NewViewedTargetCollection ¶
func NewViewedTargetCollection(res TargetCollection, view string) targetsviews.TargetCollection
NewViewedTargetCollection initializes viewed result type TargetCollection from result type TargetCollection using the given view.
func NewViewedTargetSummaryCollection ¶
func NewViewedTargetSummaryCollection(res TargetSummaryCollection, view string) targetsviews.TargetSummaryCollection
NewViewedTargetSummaryCollection initializes viewed result type TargetSummaryCollection from result type TargetSummaryCollection using the given view.
Types ¶
type Client ¶
type Client struct { ListTargetsEndpoint goa.Endpoint TargetsSummaryEndpoint goa.Endpoint GetTargetEndpoint goa.Endpoint CreateTargetEndpoint goa.Endpoint ListFindingsByTargetEndpoint goa.Endpoint GetFindingByTargetIssueAndAffectedResourceEndpoint goa.Endpoint GetTargetMTTREndpoint goa.Endpoint DeleteTargetTeamEndpoint goa.Endpoint DeleteTeamEndpoint goa.Endpoint }
Client is the "targets" service client.
func NewClient ¶
func NewClient(listTargets, targetsSummary, getTarget, createTarget, listFindingsByTarget, getFindingByTargetIssueAndAffectedResource, getTargetMTTR, deleteTargetTeam, deleteTeam goa.Endpoint) *Client
NewClient initializes a "targets" service client given the endpoints.
func (*Client) CreateTarget ¶
CreateTarget calls the "Create target" endpoint of the "targets" service.
func (*Client) DeleteTargetTeam ¶ added in v1.1.0
func (c *Client) DeleteTargetTeam(ctx context.Context, p *DeleteTargetTeamPayload) (err error)
DeleteTargetTeam calls the "Delete target team" endpoint of the "targets" service.
func (*Client) DeleteTeam ¶ added in v1.1.0
func (c *Client) DeleteTeam(ctx context.Context, p *DeleteTeamPayload) (err error)
DeleteTeam calls the "Delete team" endpoint of the "targets" service.
func (*Client) GetFindingByTargetIssueAndAffectedResource ¶
func (c *Client) GetFindingByTargetIssueAndAffectedResource(ctx context.Context, p *GetFindingByTargetIssueAndAffectedResourcePayload) (res *Finding, err error)
GetFindingByTargetIssueAndAffectedResource calls the "Get finding by target, issue and affected resource" endpoint of the "targets" service.
func (*Client) GetTargetMTTR ¶
func (c *Client) GetTargetMTTR(ctx context.Context, p *GetTargetMTTRPayload) (res float32, err error)
GetTargetMTTR calls the "Get target MTTR" endpoint of the "targets" service.
func (*Client) ListFindingsByTarget ¶
func (c *Client) ListFindingsByTarget(ctx context.Context, p *ListFindingsByTargetPayload) (res FindingCollection, err error)
ListFindingsByTarget calls the "List findings by target" endpoint of the "targets" service.
func (*Client) ListTargets ¶
func (c *Client) ListTargets(ctx context.Context, p *ListTargetsPayload) (res TargetCollection, err error)
ListTargets calls the "List targets" endpoint of the "targets" service.
func (*Client) TargetsSummary ¶
func (c *Client) TargetsSummary(ctx context.Context, p *TargetsSummaryPayload) (res TargetSummaryCollection, err error)
TargetsSummary calls the "Targets summary" endpoint of the "targets" service.
type CreateTargetPayload ¶
type CreateTargetPayload struct { // Target Identifier Identifier *string // Target Teams Teams []string }
CreateTargetPayload is the payload type of the targets service Create target method.
type DeleteTargetTeamPayload ¶ added in v1.1.0
type DeleteTargetTeamPayload struct { // Target ID TargetID *string // Team ID Team *string Auth string }
DeleteTargetTeamPayload is the payload type of the targets service Delete target team method.
type DeleteTeamPayload ¶ added in v1.1.0
DeleteTeamPayload is the payload type of the targets service Delete team method.
type Endpoints ¶
type Endpoints struct { ListTargets goa.Endpoint TargetsSummary goa.Endpoint GetTarget goa.Endpoint CreateTarget goa.Endpoint ListFindingsByTarget goa.Endpoint GetFindingByTargetIssueAndAffectedResource goa.Endpoint GetTargetMTTR goa.Endpoint DeleteTargetTeam goa.Endpoint DeleteTeam goa.Endpoint }
Endpoints wraps the "targets" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "targets" 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 targets service Get finding by target, issue and affected resource method.
func NewFinding ¶
func NewFinding(vres *targetsviews.Finding) *Finding
NewFinding initializes result type Finding from viewed result type Finding.
type FindingCollection ¶
type FindingCollection []*Finding
FindingCollection is the result type of the targets service List findings by target method.
func NewFindingCollection ¶
func NewFindingCollection(vres targetsviews.FindingCollection) FindingCollection
NewFindingCollection initializes result type FindingCollection from viewed result type FindingCollection.
type GetFindingByTargetIssueAndAffectedResourcePayload ¶
type GetFindingByTargetIssueAndAffectedResourcePayload struct { // Target ID TargetID *string // Issue ID IssueID *string // Resource identifier Resource *string }
GetFindingByTargetIssueAndAffectedResourcePayload is the payload type of the targets service Get finding by target, issue and affected resource method.
type GetTargetMTTRPayload ¶
type GetTargetMTTRPayload struct { // Target ID ID *string }
GetTargetMTTRPayload is the payload type of the targets service Get target MTTR method.
type GetTargetPayload ¶
type GetTargetPayload struct { // Target ID ID *string }
GetTargetPayload is the payload type of the targets service Get target 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 }
type ListFindingsByTargetPayload ¶
type ListFindingsByTargetPayload struct { // Target 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 // List of labels to filter by Labels *string }
ListFindingsByTargetPayload is the payload type of the targets service List findings by target method.
type ListTargetsPayload ¶
type ListTargetsPayload struct { // Targets team filter Team *string // Targets multiple team filter, separated by commas Teams *string // Targets identifier filter Identifier *string // Number of page requested Page *int // Number of results per page Size *int // Exact match in identifier filter Identifiermatch *bool // A list of asset identifiers Identifiers *string }
ListTargetsPayload is the payload type of the targets service List targets method.
type ResourceGroup ¶
type Service ¶
type Service interface { // ListTargets implements List targets. ListTargets(context.Context, *ListTargetsPayload) (res TargetCollection, err error) // TargetsSummary implements Targets summary. TargetsSummary(context.Context, *TargetsSummaryPayload) (res TargetSummaryCollection, err error) // GetTarget implements Get target. GetTarget(context.Context, *GetTargetPayload) (res *Target, err error) // CreateTarget implements Create target. CreateTarget(context.Context, *CreateTargetPayload) (res *Target, err error) // ListFindingsByTarget implements List findings by target. ListFindingsByTarget(context.Context, *ListFindingsByTargetPayload) (res FindingCollection, err error) // GetFindingByTargetIssueAndAffectedResource implements Get finding by target, // issue and affected resource. GetFindingByTargetIssueAndAffectedResource(context.Context, *GetFindingByTargetIssueAndAffectedResourcePayload) (res *Finding, err error) // GetTargetMTTR implements Get target MTTR. GetTargetMTTR(context.Context, *GetTargetMTTRPayload) (res float32, err error) // DeleteTargetTeam implements Delete target team. DeleteTargetTeam(context.Context, *DeleteTargetTeamPayload) (err error) // DeleteTeam implements Delete team. DeleteTeam(context.Context, *DeleteTeamPayload) (err error) }
Targets endpoint.
type Sourcewithnotarget ¶
type Target ¶
type Target struct { // Target ID ID *string // Target identifier Identifier *string // List of teams associated with target Teams []string }
Target is the result type of the targets service Get target method.
func NewTarget ¶
func NewTarget(vres *targetsviews.Target) *Target
NewTarget initializes result type Target from viewed result type Target.
type TargetCollection ¶
type TargetCollection []*Target
TargetCollection is the result type of the targets service List targets method.
func NewTargetCollection ¶
func NewTargetCollection(vres targetsviews.TargetCollection) TargetCollection
NewTargetCollection initializes result type TargetCollection from viewed result type TargetCollection.
type TargetSummary ¶
type TargetSummaryCollection ¶
type TargetSummaryCollection []*TargetSummary
TargetSummaryCollection is the result type of the targets service Targets summary method.
func NewTargetSummaryCollection ¶
func NewTargetSummaryCollection(vres targetsviews.TargetSummaryCollection) TargetSummaryCollection
NewTargetSummaryCollection initializes result type TargetSummaryCollection from viewed result type TargetSummaryCollection.
type TargetsSummaryPayload ¶
type TargetsSummaryPayload 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, findings_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 associated issues labels to filter by Labels *string }
TargetsSummaryPayload is the payload type of the targets service Targets summary method.