client

package
v1.1.33 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildGetFindingByIssueTargetAndAffectedResourcePayload

func BuildGetFindingByIssueTargetAndAffectedResourcePayload(issuesGetFindingByIssueTargetAndAffectedResourceIssueID string, issuesGetFindingByIssueTargetAndAffectedResourceTargetID string, issuesGetFindingByIssueTargetAndAffectedResourceResource string) (*issues.GetFindingByIssueTargetAndAffectedResourcePayload, error)

BuildGetFindingByIssueTargetAndAffectedResourcePayload builds the payload for the issues Get finding by issue, target and affected resource endpoint from CLI flags.

func BuildGetIssueMTTRPayload

func BuildGetIssueMTTRPayload(issuesGetIssueMTTRID string) (*issues.GetIssueMTTRPayload, error)

BuildGetIssueMTTRPayload builds the payload for the issues Get issue MTTR endpoint from CLI flags.

func BuildGetIssuePayload

func BuildGetIssuePayload(issuesGetIssueID string) (*issues.GetIssuePayload, error)

BuildGetIssuePayload builds the payload for the issues Get issue endpoint from CLI flags.

func BuildIssuesSummaryPayload

func BuildIssuesSummaryPayload(issuesIssuesSummaryTeam string, issuesIssuesSummaryTeams string, issuesIssuesSummaryStatus string, issuesIssuesSummarySortBy string, issuesIssuesSummaryPage string, issuesIssuesSummarySize string, issuesIssuesSummaryIdentifiers string, issuesIssuesSummaryLabels string) (*issues.IssuesSummaryPayload, error)

BuildIssuesSummaryPayload builds the payload for the issues Issues summary endpoint from CLI flags.

func BuildListFindingsByIssuePayload

func BuildListFindingsByIssuePayload(issuesListFindingsByIssueID string, issuesListFindingsByIssueStatus string, issuesListFindingsByIssueSortBy string, issuesListFindingsByIssuePage string, issuesListFindingsByIssueSize string, issuesListFindingsByIssueIdentifiers string, issuesListFindingsByIssueLabels string) (*issues.ListFindingsByIssuePayload, error)

BuildListFindingsByIssuePayload builds the payload for the issues List findings by issue endpoint from CLI flags.

func BuildListIssuesPayload

func BuildListIssuesPayload(issuesListIssuesPage string, issuesListIssuesSize string) (*issues.ListIssuesPayload, error)

BuildListIssuesPayload builds the payload for the issues List issues endpoint from CLI flags.

func DecodeGetFindingByIssueTargetAndAffectedResourceResponse

func DecodeGetFindingByIssueTargetAndAffectedResourceResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)

DecodeGetFindingByIssueTargetAndAffectedResourceResponse returns a decoder for responses returned by the issues Get finding by issue, target and affected resource endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeGetIssueMTTRResponse

func DecodeGetIssueMTTRResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)

DecodeGetIssueMTTRResponse returns a decoder for responses returned by the issues Get issue MTTR endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeGetIssueResponse

func DecodeGetIssueResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)

DecodeGetIssueResponse returns a decoder for responses returned by the issues Get issue endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeIssuesSummaryResponse

func DecodeIssuesSummaryResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)

DecodeIssuesSummaryResponse returns a decoder for responses returned by the issues Issues summary endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeListFindingsByIssueResponse

func DecodeListFindingsByIssueResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)

DecodeListFindingsByIssueResponse returns a decoder for responses returned by the issues List findings by issue endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeListIssuesResponse

func DecodeListIssuesResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)

DecodeListIssuesResponse returns a decoder for responses returned by the issues List issues endpoint. restoreBody controls whether the response body should be restored after having been read.

func EncodeIssuesSummaryRequest

func EncodeIssuesSummaryRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error

EncodeIssuesSummaryRequest returns an encoder for requests sent to the issues Issues summary server.

func EncodeListFindingsByIssueRequest

func EncodeListFindingsByIssueRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error

EncodeListFindingsByIssueRequest returns an encoder for requests sent to the issues List findings by issue server.

func EncodeListIssuesRequest

func EncodeListIssuesRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error

EncodeListIssuesRequest returns an encoder for requests sent to the issues List issues server.

func GetFindingByIssueTargetAndAffectedResourceIssuesPath

func GetFindingByIssueTargetAndAffectedResourceIssuesPath(issueID string, targetID string, resource string) string

GetFindingByIssueTargetAndAffectedResourceIssuesPath returns the URL path to the issues service Get finding by issue, target and affected resource HTTP endpoint.

func GetIssueIssuesPath

func GetIssueIssuesPath(id string) string

GetIssueIssuesPath returns the URL path to the issues service Get issue HTTP endpoint.

func GetIssueMTTRIssuesPath

func GetIssueMTTRIssuesPath(id string) string

GetIssueMTTRIssuesPath returns the URL path to the issues service Get issue MTTR HTTP endpoint.

func IssuesSummaryIssuesPath

func IssuesSummaryIssuesPath() string

IssuesSummaryIssuesPath returns the URL path to the issues service Issues summary HTTP endpoint.

func ListFindingsByIssueIssuesPath

func ListFindingsByIssueIssuesPath(id string) string

ListFindingsByIssueIssuesPath returns the URL path to the issues service List findings by issue HTTP endpoint.

func ListIssuesIssuesPath

func ListIssuesIssuesPath() string

ListIssuesIssuesPath returns the URL path to the issues service List issues HTTP endpoint.

func NewGetFindingByIssueTargetAndAffectedResourceFindingOK

func NewGetFindingByIssueTargetAndAffectedResourceFindingOK(body *GetFindingByIssueTargetAndAffectedResourceResponseBody) *issuesviews.FindingView

NewGetFindingByIssueTargetAndAffectedResourceFindingOK builds a "issues" service "Get finding by issue, target and affected resource" endpoint result from a HTTP "OK" response.

func NewGetIssueIssueOK

func NewGetIssueIssueOK(body *GetIssueResponseBody) *issuesviews.IssueView

NewGetIssueIssueOK builds a "issues" service "Get issue" endpoint result from a HTTP "OK" response.

func NewIssuesSummaryIssueSummaryCollectionOK

func NewIssuesSummaryIssueSummaryCollectionOK(body IssuesSummaryResponseBody) issuesviews.IssueSummaryCollectionView

NewIssuesSummaryIssueSummaryCollectionOK builds a "issues" service "Issues summary" endpoint result from a HTTP "OK" response.

func NewListFindingsByIssueFindingCollectionOK

func NewListFindingsByIssueFindingCollectionOK(body ListFindingsByIssueResponseBody) issuesviews.FindingCollectionView

NewListFindingsByIssueFindingCollectionOK builds a "issues" service "List findings by issue" endpoint result from a HTTP "OK" response.

func NewListIssuesIssueCollectionOK

func NewListIssuesIssueCollectionOK(body ListIssuesResponseBody) issuesviews.IssueCollectionView

NewListIssuesIssueCollectionOK builds a "issues" service "List issues" endpoint result from a HTTP "OK" response.

Types

type Client

type Client struct {
	// ListIssues Doer is the HTTP client used to make requests to the List issues
	// endpoint.
	ListIssuesDoer goahttp.Doer

	// IssuesSummary Doer is the HTTP client used to make requests to the Issues
	// summary endpoint.
	IssuesSummaryDoer goahttp.Doer

	// GetIssue Doer is the HTTP client used to make requests to the Get issue
	// endpoint.
	GetIssueDoer goahttp.Doer

	// ListFindingsByIssue Doer is the HTTP client used to make requests to the
	// List findings by issue endpoint.
	ListFindingsByIssueDoer goahttp.Doer

	// GetFindingByIssueTargetAndAffectedResource Doer is the HTTP client used to
	// make requests to the Get finding by issue, target and affected resource
	// endpoint.
	GetFindingByIssueTargetAndAffectedResourceDoer goahttp.Doer

	// GetIssueMTTR Doer is the HTTP client used to make requests to the Get issue
	// MTTR endpoint.
	GetIssueMTTRDoer 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 issues 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 issues service servers.

func (*Client) BuildGetFindingByIssueTargetAndAffectedResourceRequest

func (c *Client) BuildGetFindingByIssueTargetAndAffectedResourceRequest(ctx context.Context, v any) (*http.Request, error)

BuildGetFindingByIssueTargetAndAffectedResourceRequest instantiates a HTTP request object with method and path set to call the "issues" service "Get finding by issue, target and affected resource" endpoint

func (*Client) BuildGetIssueMTTRRequest

func (c *Client) BuildGetIssueMTTRRequest(ctx context.Context, v any) (*http.Request, error)

BuildGetIssueMTTRRequest instantiates a HTTP request object with method and path set to call the "issues" service "Get issue MTTR" endpoint

func (*Client) BuildGetIssueRequest

func (c *Client) BuildGetIssueRequest(ctx context.Context, v any) (*http.Request, error)

BuildGetIssueRequest instantiates a HTTP request object with method and path set to call the "issues" service "Get issue" endpoint

func (*Client) BuildIssuesSummaryRequest

func (c *Client) BuildIssuesSummaryRequest(ctx context.Context, v any) (*http.Request, error)

BuildIssuesSummaryRequest instantiates a HTTP request object with method and path set to call the "issues" service "Issues summary" endpoint

func (*Client) BuildListFindingsByIssueRequest

func (c *Client) BuildListFindingsByIssueRequest(ctx context.Context, v any) (*http.Request, error)

BuildListFindingsByIssueRequest instantiates a HTTP request object with method and path set to call the "issues" service "List findings by issue" endpoint

func (*Client) BuildListIssuesRequest

func (c *Client) BuildListIssuesRequest(ctx context.Context, v any) (*http.Request, error)

BuildListIssuesRequest instantiates a HTTP request object with method and path set to call the "issues" service "List issues" endpoint

func (*Client) GetFindingByIssueTargetAndAffectedResource

func (c *Client) GetFindingByIssueTargetAndAffectedResource() goa.Endpoint

GetFindingByIssueTargetAndAffectedResource returns an endpoint that makes HTTP requests to the issues service Get finding by issue, target and affected resource server.

func (*Client) GetIssue

func (c *Client) GetIssue() goa.Endpoint

GetIssue returns an endpoint that makes HTTP requests to the issues service Get issue server.

func (*Client) GetIssueMTTR

func (c *Client) GetIssueMTTR() goa.Endpoint

GetIssueMTTR returns an endpoint that makes HTTP requests to the issues service Get issue MTTR server.

func (*Client) IssuesSummary

func (c *Client) IssuesSummary() goa.Endpoint

IssuesSummary returns an endpoint that makes HTTP requests to the issues service Issues summary server.

func (*Client) ListFindingsByIssue

func (c *Client) ListFindingsByIssue() goa.Endpoint

ListFindingsByIssue returns an endpoint that makes HTTP requests to the issues service List findings by issue server.

func (*Client) ListIssues

func (c *Client) ListIssues() goa.Endpoint

ListIssues returns an endpoint that makes HTTP requests to the issues service List issues server.

type FindingResponse

type FindingResponse struct {
	// Finding ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Issue
	Issue *IssueResponse `form:"issue,omitempty" json:"issue,omitempty" xml:"issue,omitempty"`
	// Target
	Target *TargetResponse `form:"target,omitempty" json:"target,omitempty" xml:"target,omitempty"`
	// Source
	Source *SourcewithnotargetResponse `form:"source,omitempty" json:"source,omitempty" xml:"source,omitempty"`
	// Finding details
	Details *string `form:"details,omitempty" json:"details,omitempty" xml:"details,omitempty"`
	// Finding impact details
	ImpactDetails *string `form:"impact_details,omitempty" json:"impact_details,omitempty" xml:"impact_details,omitempty"`
	// Finding status. Can be 'OPEN' or 'FIXED'.
	Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"`
	// Finding severity score
	Score *float32 `form:"score,omitempty" json:"score,omitempty" xml:"score,omitempty"`
	// Other resources associated with the finding
	Resources []*ResourceGroupResponse `form:"resources,omitempty" json:"resources,omitempty" xml:"resources,omitempty"`
}

FindingResponse is used to define fields on response body types.

type GetFindingByIssueTargetAndAffectedResourceResponseBody

type GetFindingByIssueTargetAndAffectedResourceResponseBody struct {
	// Finding ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Issue
	Issue *IssueResponseBody `form:"issue,omitempty" json:"issue,omitempty" xml:"issue,omitempty"`
	// Target
	Target *TargetResponseBody `form:"target,omitempty" json:"target,omitempty" xml:"target,omitempty"`
	// Source
	Source *SourcewithnotargetResponseBody `form:"source,omitempty" json:"source,omitempty" xml:"source,omitempty"`
	// Finding details
	Details *string `form:"details,omitempty" json:"details,omitempty" xml:"details,omitempty"`
	// Finding impact details
	ImpactDetails *string `form:"impact_details,omitempty" json:"impact_details,omitempty" xml:"impact_details,omitempty"`
	// Finding status. Can be 'OPEN' or 'FIXED'.
	Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"`
	// Finding severity score
	Score *float32 `form:"score,omitempty" json:"score,omitempty" xml:"score,omitempty"`
	// Other resources associated with the finding
	Resources []*ResourceGroupResponseBody `form:"resources,omitempty" json:"resources,omitempty" xml:"resources,omitempty"`
}

GetFindingByIssueTargetAndAffectedResourceResponseBody is the type of the "issues" service "Get finding by issue, target and affected resource" endpoint HTTP response body.

type GetIssueResponseBody

type GetIssueResponseBody struct {
	// Issue ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Issue summary
	Summary *string `form:"summary,omitempty" json:"summary,omitempty" xml:"summary,omitempty"`
	// Common Weakness Enumeration ID
	CweID *int `form:"cwe_id,omitempty" json:"cwe_id,omitempty" xml:"cwe_id,omitempty"`
	// Issue description
	Description *string `form:"description,omitempty" json:"description,omitempty" xml:"description,omitempty"`
	// Recommendations to fix the issue
	Recommendations []string `form:"recommendations,omitempty" json:"recommendations,omitempty" xml:"recommendations,omitempty"`
	// Documentation reference for the issue
	ReferenceLinks []string `form:"reference_links,omitempty" json:"reference_links,omitempty" xml:"reference_links,omitempty"`
	// Labels associated with the issue
	Labels []string `form:"labels,omitempty" json:"labels,omitempty" xml:"labels,omitempty"`
}

GetIssueResponseBody is the type of the "issues" service "Get issue" endpoint HTTP response body.

type IssueResponse

type IssueResponse struct {
	// Issue ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Issue summary
	Summary *string `form:"summary,omitempty" json:"summary,omitempty" xml:"summary,omitempty"`
	// Common Weakness Enumeration ID
	CweID *int `form:"cwe_id,omitempty" json:"cwe_id,omitempty" xml:"cwe_id,omitempty"`
	// Issue description
	Description *string `form:"description,omitempty" json:"description,omitempty" xml:"description,omitempty"`
	// Recommendations to fix the issue
	Recommendations []string `form:"recommendations,omitempty" json:"recommendations,omitempty" xml:"recommendations,omitempty"`
	// Documentation reference for the issue
	ReferenceLinks []string `form:"reference_links,omitempty" json:"reference_links,omitempty" xml:"reference_links,omitempty"`
	// Labels associated with the issue
	Labels []string `form:"labels,omitempty" json:"labels,omitempty" xml:"labels,omitempty"`
}

IssueResponse is used to define fields on response body types.

type IssueResponseBody

type IssueResponseBody struct {
	// Issue ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Issue summary
	Summary *string `form:"summary,omitempty" json:"summary,omitempty" xml:"summary,omitempty"`
	// Common Weakness Enumeration ID
	CweID *int `form:"cwe_id,omitempty" json:"cwe_id,omitempty" xml:"cwe_id,omitempty"`
	// Issue description
	Description *string `form:"description,omitempty" json:"description,omitempty" xml:"description,omitempty"`
	// Recommendations to fix the issue
	Recommendations []string `form:"recommendations,omitempty" json:"recommendations,omitempty" xml:"recommendations,omitempty"`
	// Documentation reference for the issue
	ReferenceLinks []string `form:"reference_links,omitempty" json:"reference_links,omitempty" xml:"reference_links,omitempty"`
	// Labels associated with the issue
	Labels []string `form:"labels,omitempty" json:"labels,omitempty" xml:"labels,omitempty"`
}

IssueResponseBody is used to define fields on response body types.

type IssueSummaryResponse

type IssueSummaryResponse struct {
	// Issue ID
	IssueID *string `form:"issue_id,omitempty" json:"issue_id,omitempty" xml:"issue_id,omitempty"`
	// Issue summary
	Summary *string `form:"summary,omitempty" json:"summary,omitempty" xml:"summary,omitempty"`
	// Number of affected targets for issue
	TargetsCount *int `form:"targets_count,omitempty" json:"targets_count,omitempty" xml:"targets_count,omitempty"`
	// Number of affected resources for issue
	ResourcesCount *int `form:"resources_count,omitempty" json:"resources_count,omitempty" xml:"resources_count,omitempty"`
	// Max score for issue
	MaxScore *float32 `form:"max_score,omitempty" json:"max_score,omitempty" xml:"max_score,omitempty"`
}

IssueSummaryResponse is used to define fields on response body types.

type IssuesSummaryResponseBody

type IssuesSummaryResponseBody []*IssueSummaryResponse

IssuesSummaryResponseBody is the type of the "issues" service "Issues summary" endpoint HTTP response body.

type ListFindingsByIssueResponseBody

type ListFindingsByIssueResponseBody []*FindingResponse

ListFindingsByIssueResponseBody is the type of the "issues" service "List findings by issue" endpoint HTTP response body.

type ListIssuesResponseBody

type ListIssuesResponseBody []*IssueResponse

ListIssuesResponseBody is the type of the "issues" service "List issues" endpoint HTTP response body.

type ResourceGroupResponse

type ResourceGroupResponse struct {
	// Name of the resource group
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Column names of the resource group in the order that should be rendered
	Attributes []string `form:"attributes,omitempty" json:"attributes,omitempty" xml:"attributes,omitempty"`
	// List containing the resource rows as hashmap
	Resources []map[string]string `form:"resources,omitempty" json:"resources,omitempty" xml:"resources,omitempty"`
}

ResourceGroupResponse is used to define fields on response body types.

type ResourceGroupResponseBody

type ResourceGroupResponseBody struct {
	// Name of the resource group
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Column names of the resource group in the order that should be rendered
	Attributes []string `form:"attributes,omitempty" json:"attributes,omitempty" xml:"attributes,omitempty"`
	// List containing the resource rows as hashmap
	Resources []map[string]string `form:"resources,omitempty" json:"resources,omitempty" xml:"resources,omitempty"`
}

ResourceGroupResponseBody is used to define fields on response body types.

type SourcewithnotargetResponse

type SourcewithnotargetResponse struct {
	// Source ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Source name
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Source component
	Component *string `form:"component,omitempty" json:"component,omitempty" xml:"component,omitempty"`
	// Source instance
	Instance *string `form:"instance,omitempty" json:"instance,omitempty" xml:"instance,omitempty"`
	// Source options
	Options *string `form:"options,omitempty" json:"options,omitempty" xml:"options,omitempty"`
	// Time on which the source scanned the target
	Time *string `form:"time,omitempty" json:"time,omitempty" xml:"time,omitempty"`
}

SourcewithnotargetResponse is used to define fields on response body types.

type SourcewithnotargetResponseBody

type SourcewithnotargetResponseBody struct {
	// Source ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Source name
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Source component
	Component *string `form:"component,omitempty" json:"component,omitempty" xml:"component,omitempty"`
	// Source instance
	Instance *string `form:"instance,omitempty" json:"instance,omitempty" xml:"instance,omitempty"`
	// Source options
	Options *string `form:"options,omitempty" json:"options,omitempty" xml:"options,omitempty"`
	// Time on which the source scanned the target
	Time *string `form:"time,omitempty" json:"time,omitempty" xml:"time,omitempty"`
}

SourcewithnotargetResponseBody is used to define fields on response body types.

type TargetResponse

type TargetResponse struct {
	// Target ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Target identifier
	Identifier *string `form:"identifier,omitempty" json:"identifier,omitempty" xml:"identifier,omitempty"`
	// List of teams associated with target
	Teams []string `form:"teams,omitempty" json:"teams,omitempty" xml:"teams,omitempty"`
}

TargetResponse is used to define fields on response body types.

type TargetResponseBody

type TargetResponseBody struct {
	// Target ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Target identifier
	Identifier *string `form:"identifier,omitempty" json:"identifier,omitempty" xml:"identifier,omitempty"`
	// List of teams associated with target
	Teams []string `form:"teams,omitempty" json:"teams,omitempty" xml:"teams,omitempty"`
}

TargetResponseBody is used to define fields on response body types.

Jump to

Keyboard shortcuts

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