MCPcopy Create free account
hub / github.com/apache/cloudberry / toXML

Method toXML

gpcontrib/gpcloud/test/mock_classes.h:78–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76 }
77
78 vector<uint8_t> toXML() {
79 stringstream sstr;
80 sstr << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
81 << "<ListBucketResult>"
82 << "<Name>" << name << "</Name>"
83 << "<Prefix>" << prefix << "</Prefix>"
84 << "<Marker>" << marker << "</Marker>"
85 << "<IsTruncated>" << (isTruncated ? "true" : "false") << "</IsTruncated>";
86
87 for (vector<BucketContent>::iterator it = contents.begin(); it != contents.end(); it++) {
88 sstr << "<Contents>"
89 << "<Key>" << it->name << "</Key>"
90 << "<Size>" << it->size << "</Size>"
91 << "</Contents>";
92 }
93 sstr << "</ListBucketResult>";
94 string xml = sstr.str();
95 return vector<uint8_t>(xml.begin(), xml.end());
96 }
97
98 private:
99 string name;

Callers 3

TEST_FFunction · 0.80
TEST_FFunction · 0.80

Calls 3

beginMethod · 0.45
endMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected