in datahub/implement.go [1636:1662]
func (datahub *DataHubPB) GetBlobRecords(projectName, topicName, shardId, cursor string, limit int) (*GetRecordsResult, error) {
if !util.CheckProjectName(projectName) {
return nil, NewInvalidParameterErrorWithMessage(projectNameInvalid)
}
if !util.CheckTopicName(topicName) {
return nil, NewInvalidParameterErrorWithMessage(topicNameInvalid)
}
if !util.CheckShardId(shardId) {
return nil, NewInvalidParameterErrorWithMessage(shardIdInvalid)
}
path := fmt.Sprintf(shardPath, projectName, topicName, shardId)
reqPara := &RequestParameter{
Header: map[string]string{
httpHeaderContentType: httpProtoContent,
httpHeaderRequestAction: httpSubscribeContent},
}
grr := &GetPBRecordRequest{
Cursor: cursor,
Limit: limit,
}
respBody, commonResp, err := datahub.Client.Post(path, grr, reqPara)
if err != nil {
return nil, err
}
return NewGetPBRecordsResult(respBody, nil, commonResp)
}