2021-07-15 04:25:34 +02:00
|
|
|
package paging
|
|
|
|
|
2021-10-23 22:47:12 +02:00
|
|
|
// EndpointStatusParams represents all parameters that can be used for paging purposes
|
|
|
|
type EndpointStatusParams struct {
|
2021-08-13 06:38:39 +02:00
|
|
|
EventsPage int // Number of the event page
|
|
|
|
EventsPageSize int // Size of the event page
|
|
|
|
ResultsPage int // Number of the result page
|
|
|
|
ResultsPageSize int // Size of the result page
|
2021-07-15 04:25:34 +02:00
|
|
|
}
|
|
|
|
|
2021-10-23 22:47:12 +02:00
|
|
|
// NewEndpointStatusParams creates a new EndpointStatusParams
|
|
|
|
func NewEndpointStatusParams() *EndpointStatusParams {
|
|
|
|
return &EndpointStatusParams{}
|
2021-07-15 04:25:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// WithEvents sets the values for EventsPage and EventsPageSize
|
2021-10-23 22:47:12 +02:00
|
|
|
func (params *EndpointStatusParams) WithEvents(page, pageSize int) *EndpointStatusParams {
|
2021-07-15 04:25:34 +02:00
|
|
|
params.EventsPage = page
|
|
|
|
params.EventsPageSize = pageSize
|
|
|
|
return params
|
|
|
|
}
|
|
|
|
|
|
|
|
// WithResults sets the values for ResultsPage and ResultsPageSize
|
2021-10-23 22:47:12 +02:00
|
|
|
func (params *EndpointStatusParams) WithResults(page, pageSize int) *EndpointStatusParams {
|
2021-07-15 04:25:34 +02:00
|
|
|
params.ResultsPage = page
|
|
|
|
params.ResultsPageSize = pageSize
|
|
|
|
return params
|
|
|
|
}
|