events

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "events"

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 = [1]string{"List finding events"}

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 NewListFindingEventsEndpoint

func NewListFindingEventsEndpoint(s Service) goa.Endpoint

NewListFindingEventsEndpoint returns an endpoint function that calls the method "List finding events" of service "events".

func NewViewedEventCollection

func NewViewedEventCollection(res EventCollection, view string) eventsviews.EventCollection

NewViewedEventCollection initializes viewed result type EventCollection from result type EventCollection using the given view.

Types

type Client

type Client struct {
	ListFindingEventsEndpoint goa.Endpoint
}

Client is the "events" service client.

func NewClient

func NewClient(listFindingEvents goa.Endpoint) *Client

NewClient initializes a "events" service client given the endpoints.

func (*Client) ListFindingEvents

func (c *Client) ListFindingEvents(ctx context.Context, p *ListFindingEventsPayload) (res EventCollection, err error)

ListFindingEvents calls the "List finding events" endpoint of the "events" service.

type Endpoints

type Endpoints struct {
	ListFindingEvents goa.Endpoint
}

Endpoints wraps the "events" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

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

func (*Endpoints) Use

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

Use applies the given middleware to all the "events" service endpoints.

type Event

type Event struct {
	// Finding event ID
	ID *string
	// Finding ID
	FindingID *string
	// Source ID
	SourceID *string
	// Finding severity score
	Score *float32
	// Event time
	Time *string
}

type EventCollection

type EventCollection []*Event

EventCollection is the result type of the events service List finding events method.

func NewEventCollection

func NewEventCollection(vres eventsviews.EventCollection) EventCollection

NewEventCollection initializes result type EventCollection from viewed result type EventCollection.

type ListFindingEventsPayload

type ListFindingEventsPayload struct {
	// Minimum issues score filter
	MinScore *int
	// Maximum issues score filter
	MaxScore *int
	// Minimum date filter (YYYY-MM-DD)
	MinDate *string
	// Maximum date filter (YYYY-MM-DD)
	MaxDate *string
	// Number of page requested
	Page *int
	// Number of results per page
	Size *int
}

ListFindingEventsPayload is the payload type of the events service List finding events method.

type Service

type Service interface {
	// ListFindingEvents implements List finding events.
	ListFindingEvents(context.Context, *ListFindingEventsPayload) (res EventCollection, err error)
}

Finding events endpoint.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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