Description
The raw CF API allows for using the created_ats/updated_ats query parameters multiple times, so you can search within ranges.
For example to search for audit_events between 13:00 and 14:00 :
cf curl "/v3/audit_events?created_ats[gt]=2025-02-06T13:00:00Z&created_ats[lt]=2025-02-06T14:00:00Z"
The go-cfclient however only allows one client.ListOptions{CreatedAts, UpdatedAts}, check this code
I also wonder why you can provide multiple timestamps here, shouldn't that have been a slice of TimeStampFilter instead?
Now with audit_events you can now get away with this since the created_at is always the same as the updated_at and you use the first one for [gt] and the second one for [lt], i.e. :
var createdAts, updatedAts client.TimestampFilter
createdAts = client.TimestampFilter{Timestamp: []time.Time{afterTime}, Operator: client.FilterModifierGreaterThan}
updatedAts = client.TimestampFilter{Timestamp: []time.Time{beforeTime}, Operator: client.FilterModifierLessThan}
auditListOptions := client.AuditEventListOptions{ListOptions: &client.ListOptions{CreateAts: createdAts, UpdatedAts: updatedAts}}
But it would be nice if we could use multiple (at least 2) TimestampFilter's.