client

package
v1.1.14 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildListFindingEventsPayload

func BuildListFindingEventsPayload(eventsListFindingEventsMinScore string, eventsListFindingEventsMaxScore string, eventsListFindingEventsMinDate string, eventsListFindingEventsMaxDate string, eventsListFindingEventsPage string, eventsListFindingEventsSize string) (*events.ListFindingEventsPayload, error)

BuildListFindingEventsPayload builds the payload for the events List finding events endpoint from CLI flags.

func DecodeListFindingEventsResponse

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

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

func EncodeListFindingEventsRequest

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

EncodeListFindingEventsRequest returns an encoder for requests sent to the events List finding events server.

func ListFindingEventsEventsPath

func ListFindingEventsEventsPath() string

ListFindingEventsEventsPath returns the URL path to the events service List finding events HTTP endpoint.

func NewListFindingEventsEventCollectionOK

func NewListFindingEventsEventCollectionOK(body ListFindingEventsResponseBody) eventsviews.EventCollectionView

NewListFindingEventsEventCollectionOK builds a "events" service "List finding events" endpoint result from a HTTP "OK" response.

Types

type Client

type Client struct {
	// ListFindingEvents Doer is the HTTP client used to make requests to the List
	// finding events endpoint.
	ListFindingEventsDoer 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 events 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 events service servers.

func (*Client) BuildListFindingEventsRequest

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

BuildListFindingEventsRequest instantiates a HTTP request object with method and path set to call the "events" service "List finding events" endpoint

func (*Client) ListFindingEvents

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

ListFindingEvents returns an endpoint that makes HTTP requests to the events service List finding events server.

type EventResponse

type EventResponse struct {
	// Finding event ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Finding ID
	FindingID *string `form:"finding_id,omitempty" json:"finding_id,omitempty" xml:"finding_id,omitempty"`
	// Source ID
	SourceID *string `form:"source_id,omitempty" json:"source_id,omitempty" xml:"source_id,omitempty"`
	// Finding severity score
	Score *float32 `form:"score,omitempty" json:"score,omitempty" xml:"score,omitempty"`
	// Event time
	Time *string `form:"time,omitempty" json:"time,omitempty" xml:"time,omitempty"`
}

EventResponse is used to define fields on response body types.

type ListFindingEventsResponseBody

type ListFindingEventsResponseBody []*EventResponse

ListFindingEventsResponseBody is the type of the "events" service "List finding events" endpoint HTTP response body.

Jump to

Keyboard shortcuts

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