func (c *Client) SearchEvents(from, to time.Time, query string) ([]events.EventFields, error) {
	q, err := url.ParseQuery(query)
	if err != nil {
		return nil, trace.BadParameter("query")
	}
	q.Set("from", from.Format(time.RFC3339))
	q.Set("to", to.Format(time.RFC3339))
	response, err := c.Get(c.Endpoint("events"), q)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	retval := make([]events.EventFields, 0)
	if err := json.Unmarshal(response.Bytes(), &retval); err != nil {
		return nil, trace.Wrap(err)
	}
	return retval, nil
}
// SearchEvents returns events that fit the criteria
SearchEvents returns events that fit the criteria
// SearchEvents returns events that fit the criteria
func (c *Client) SearchEvents(from, to time.Time, query string) ([]events.EventFields, error) {
	q, err := url.ParseQuery(query)
	if err != nil {
		return nil, trace.BadParameter("query")
	}
	q.Set("from", from.Format(time.RFC3339))
	q.Set("to", to.Format(time.RFC3339))
	response, err := c.Get(c.Endpoint("events"), q)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	retval := make([]events.EventFields, 0)
	if err := json.Unmarshal(response.Bytes(), &retval); err != nil {
		return nil, trace.Wrap(err)
	}
	return retval, nil
}
func ( c * Client ) SearchEvents ( from , to time . Time , query string ) ( [ ] events . EventFields , error ) { q , err := url . ParseQuery ( query ) if err != nil { return nil , trace . BadParameter ( " " ) } q . Set ( " " , from . Format ( time . RFC3339 ) ) q . Set ( " " , to . Format ( time . RFC3339 ) ) response , err := c . Get ( c . Endpoint ( " " ) , q ) if err != nil { return nil , trace . Wrap ( err ) } retval := make ( [ ] events . EventFields , 0 ) if err := json . Unmarshal ( response . Bytes ( ) , & retval ) ; err != nil { return nil , trace . Wrap ( err ) } return retval , nil }
SearchEvents returns events that fit the criteria
SearchEvents returns events that fit the criteria