// DeleteTopicRecords deletes a topic's records from partition to an offset.
// If user has no rights for that action it returns `ErrResourceNotAccessible`,
// if negative value of "toOffset" then it returns `ErrResourceNotGood`.
//
// All input arguments are required.
DeleteTopicRecords deletes a topic's records from partition to an offset.
If user has no rights for that action it returns `ErrResourceNotAccessible`,
if negative value of "toOffset" then it returns `ErrResourceNotGood`.

All input arguments are required.
// DeleteTopicRecords deletes a topic ' s records from partition to an offset . // If user has no rights for that action it returns ` ErrResourceNotAccessible ` // if negative value of " toOffset " then it returns ` ErrResourceNotGood ` . // // All input arguments are required .
func (c *Client) DeleteTopicRecords(topicName string, fromPartition int, toOffset int64) error {
	if topicName == "" {
		return errRequired("topicName")
	}
	path := fmt.Sprintf(topicRecordsPath, topicName, fromPartition, toOffset)
	if toOffset < 0 || fromPartition < 0 {
		return NewResourceError(http.StatusBadRequest, c.Config.Host+"/"+path, "DELETE", "offset and partition should be positive numbers")
	}
	resp, err := c.Do(http.MethodDelete, path, "", nil)
	if err != nil {
		return err
	}
	return resp.Body.Close()
}
func ( c * Client ) DeleteTopicRecords ( topicName string , fromPartition int , toOffset int64 ) error { if topicName == " " { return errRequired ( " " ) } path := fmt . Sprintf ( topicRecordsPath , topicName , fromPartition , toOffset ) if toOffset < 0 || fromPartition < 0 { return NewResourceError ( http . StatusBadRequest , c . Config . Host + " " + path , " " , " " ) } resp , err := c . Do ( http . MethodDelete , path , " " , nil ) if err != nil { return err } return resp . Body . Close ( ) }
DeleteTopicRecords deletes a topic's records from partition to an offset.
DeleteTopicRecords deletes a topic ' s records from partition to an offset .