Documentation
¶
Index ¶
Constants ¶
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 ¶
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 ¶
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 ¶
Client is the "events" service client.
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 ¶
Endpoints wraps the "events" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "events" service with endpoints.
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 (YYY-MM-DD)
MinDate *string
// Maximum date filter (YYY-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.