proxygen
|
Classes | |
struct | ParameterisedIdentifier |
class | StructuredHeaderItem |
class | StructuredHeadersUtilitiesTest |
Typedefs | |
using | ParameterisedList = std::vector< StructuredHeaders::ParameterisedIdentifier > |
using | Dictionary = std::unordered_map< std::string, StructuredHeaderItem > |
Enumerations | |
enum | DecodeError : uint8_t { DecodeError::OK = 0, DecodeError::VALUE_TOO_LONG = 1, DecodeError::INVALID_CHARACTER = 2, DecodeError::UNDECODEABLE_BINARY_CONTENT = 3, DecodeError::UNEXPECTED_END_OF_BUFFER = 4, DecodeError::UNPARSEABLE_NUMERIC_TYPE = 5, DecodeError::DUPLICATE_KEY = 6 } |
enum | EncodeError : uint8_t { EncodeError::OK = 0, EncodeError::EMPTY_DATA_STRUCTURE = 1, EncodeError::BAD_IDENTIFIER = 2, EncodeError::BAD_STRING = 3, EncodeError::ITEM_TYPE_MISMATCH = 4, EncodeError::ENCODING_NULL_ITEM = 5 } |
Variables | |
static const int | kMaxValidIntegerLength = 19 |
static const int | kMaxValidFloatLength = 16 |
static const std::map< DecodeError, std::string > | decodeErrorDescription |
static const std::map< EncodeError, std::string > | encodeErrorDescription |
using proxygen::StructuredHeaders::Dictionary = typedef std::unordered_map<std::string, StructuredHeaderItem> |
Definition at line 61 of file StructuredHeadersConstants.h.
using proxygen::StructuredHeaders::ParameterisedList = typedef std::vector<StructuredHeaders::ParameterisedIdentifier> |
Definition at line 59 of file StructuredHeadersConstants.h.
|
strong |
Enumerator | |
---|---|
OK | |
VALUE_TOO_LONG | |
INVALID_CHARACTER | |
UNDECODEABLE_BINARY_CONTENT | |
UNEXPECTED_END_OF_BUFFER | |
UNPARSEABLE_NUMERIC_TYPE | |
DUPLICATE_KEY |
Definition at line 63 of file StructuredHeadersConstants.h.
|
strong |
Enumerator | |
---|---|
OK | |
EMPTY_DATA_STRUCTURE | |
BAD_IDENTIFIER | |
BAD_STRING | |
ITEM_TYPE_MISMATCH | |
ENCODING_NULL_ITEM |
Definition at line 73 of file StructuredHeadersConstants.h.
std::string proxygen::StructuredHeaders::decodeBase64 | ( | const std::string & | encoded | ) |
Definition at line 105 of file StructuredHeadersUtilities.cpp.
References folly::test::begin(), count, folly::test::end(), string, and uint32_t.
Referenced by proxygen::StructuredHeadersBuffer::parseBinaryContent(), and TEST_F().
std::string proxygen::StructuredHeaders::encodeBase64 | ( | const std::string & | input | ) |
Definition at line 126 of file StructuredHeadersUtilities.cpp.
Referenced by proxygen::StructuredHeadersEncoder::encodeBinaryContent(), proxygen::StructuredHeadersBuffer::parseBinaryContent(), and TEST_F().
bool proxygen::StructuredHeaders::isLcAlpha | ( | char | c | ) |
Definition at line 20 of file StructuredHeadersUtilities.cpp.
Referenced by isValidIdentifier(), isValidIdentifierChar(), proxygen::StructuredHeadersBuffer::parseIdentifier(), and TEST_F().
bool proxygen::StructuredHeaders::isValidEncodedBinaryContent | ( | const std::string & | s | ) |
Definition at line 68 of file StructuredHeadersUtilities.cpp.
References isValidEncodedBinaryContentChar().
Referenced by proxygen::StructuredHeadersBuffer::parseBinaryContent(), and TEST_F().
bool proxygen::StructuredHeaders::isValidEncodedBinaryContentChar | ( | char | c | ) |
Definition at line 29 of file StructuredHeadersUtilities.cpp.
Referenced by isValidEncodedBinaryContent(), proxygen::StructuredHeadersBuffer::parseBinaryContent(), and TEST_F().
bool proxygen::StructuredHeaders::isValidIdentifier | ( | const std::string & | s | ) |
Definition at line 45 of file StructuredHeadersUtilities.cpp.
References c, isLcAlpha(), and isValidIdentifierChar().
Referenced by proxygen::StructuredHeadersEncoder::encodeIdentifier(), and TEST_F().
bool proxygen::StructuredHeaders::isValidIdentifierChar | ( | char | c | ) |
Definition at line 24 of file StructuredHeadersUtilities.cpp.
References isLcAlpha().
Referenced by isValidIdentifier(), proxygen::StructuredHeadersBuffer::parseIdentifier(), and TEST_F().
bool proxygen::StructuredHeaders::isValidString | ( | const std::string & | s | ) |
Definition at line 59 of file StructuredHeadersUtilities.cpp.
References c, and isValidStringChar().
Referenced by proxygen::StructuredHeadersEncoder::encodeString(), and TEST_F().
bool proxygen::StructuredHeaders::isValidStringChar | ( | char | c | ) |
Definition at line 34 of file StructuredHeadersUtilities.cpp.
Referenced by isValidString(), proxygen::StructuredHeadersBuffer::parseString(), and TEST_F().
bool proxygen::StructuredHeaders::itemTypeMatchesContent | ( | const StructuredHeaderItem & | input | ) |
Definition at line 87 of file StructuredHeadersUtilities.cpp.
References proxygen::StructuredHeaders::StructuredHeaderItem::BINARYCONTENT, proxygen::StructuredHeaders::StructuredHeaderItem::DOUBLE, proxygen::StructuredHeaders::StructuredHeaderItem::IDENTIFIER, proxygen::StructuredHeaders::StructuredHeaderItem::INT64, int64_t, proxygen::StructuredHeaders::StructuredHeaderItem::NONE, proxygen::StructuredHeaders::StructuredHeaderItem::STRING, string, proxygen::StructuredHeaders::StructuredHeaderItem::tag, and proxygen::StructuredHeaders::StructuredHeaderItem::value.
Referenced by proxygen::StructuredHeadersEncoder::encodeItem(), and TEST_F().
proxygen::StructuredHeaders::TEST_F | ( | StructuredHeadersUtilitiesTest | , |
TestLcalpha | |||
) |
Definition at line 20 of file StructuredHeadersUtilitiesTest.cpp.
References c, EXPECT_FALSE, EXPECT_TRUE, i, isLcAlpha(), uint32_t, and uint8_t.
proxygen::StructuredHeaders::TEST_F | ( | StructuredHeadersUtilitiesTest | , |
TestIsValidIdentifierChar | |||
) |
Definition at line 31 of file StructuredHeadersUtilitiesTest.cpp.
References c, EXPECT_FALSE, EXPECT_TRUE, i, isValidIdentifierChar(), uint32_t, and uint8_t.
proxygen::StructuredHeaders::TEST_F | ( | StructuredHeadersUtilitiesTest | , |
test_isValidEncodedBinaryContentChar_alphanumeric | |||
) |
Definition at line 44 of file StructuredHeadersUtilitiesTest.cpp.
References EXPECT_TRUE, and isValidEncodedBinaryContentChar().
proxygen::StructuredHeaders::TEST_F | ( | StructuredHeadersUtilitiesTest | , |
test_isValidEncodedBinaryContentChar_allowed_symbols | |||
) |
Definition at line 52 of file StructuredHeadersUtilitiesTest.cpp.
References EXPECT_TRUE, and isValidEncodedBinaryContentChar().
proxygen::StructuredHeaders::TEST_F | ( | StructuredHeadersUtilitiesTest | , |
test_isValidEncodedBinaryContentChar_disallowed_symbols | |||
) |
Definition at line 59 of file StructuredHeadersUtilitiesTest.cpp.
References EXPECT_FALSE, and isValidEncodedBinaryContentChar().
proxygen::StructuredHeaders::TEST_F | ( | StructuredHeadersUtilitiesTest | , |
TestIsValidStringCharAllowed | |||
) |
Definition at line 67 of file StructuredHeadersUtilitiesTest.cpp.
References EXPECT_TRUE, and isValidStringChar().
proxygen::StructuredHeaders::TEST_F | ( | StructuredHeadersUtilitiesTest | , |
TestIsValidStringCharDisallowed | |||
) |
Definition at line 77 of file StructuredHeadersUtilitiesTest.cpp.
References EXPECT_FALSE, and isValidStringChar().
proxygen::StructuredHeaders::TEST_F | ( | StructuredHeadersUtilitiesTest | , |
TestIsValidIdentifierAllowed | |||
) |
Definition at line 84 of file StructuredHeadersUtilitiesTest.cpp.
References EXPECT_TRUE, and isValidIdentifier().
proxygen::StructuredHeaders::TEST_F | ( | StructuredHeadersUtilitiesTest | , |
TestIsValidIdentifierDisallowed | |||
) |
Definition at line 90 of file StructuredHeadersUtilitiesTest.cpp.
References EXPECT_FALSE, and isValidIdentifier().
proxygen::StructuredHeaders::TEST_F | ( | StructuredHeadersUtilitiesTest | , |
TestIsValidStringAllowed | |||
) |
Definition at line 97 of file StructuredHeadersUtilitiesTest.cpp.
References EXPECT_TRUE, and isValidString().
proxygen::StructuredHeaders::TEST_F | ( | StructuredHeadersUtilitiesTest | , |
TestIsValidStringDisallowed | |||
) |
Definition at line 104 of file StructuredHeadersUtilitiesTest.cpp.
References EXPECT_FALSE, and isValidString().
proxygen::StructuredHeaders::TEST_F | ( | StructuredHeadersUtilitiesTest | , |
TestGoodBinaryContent | |||
) |
Definition at line 111 of file StructuredHeadersUtilitiesTest.cpp.
References EXPECT_TRUE, and isValidEncodedBinaryContent().
proxygen::StructuredHeaders::TEST_F | ( | StructuredHeadersUtilitiesTest | , |
TestBadBinaryContent | |||
) |
Definition at line 117 of file StructuredHeadersUtilitiesTest.cpp.
References EXPECT_FALSE, and isValidEncodedBinaryContent().
proxygen::StructuredHeaders::TEST_F | ( | StructuredHeadersUtilitiesTest | , |
Test_DecodeBinaryContent | |||
) |
Definition at line 124 of file StructuredHeadersUtilitiesTest.cpp.
References decodeBase64(), EXPECT_EQ, and string.
proxygen::StructuredHeaders::TEST_F | ( | StructuredHeadersUtilitiesTest | , |
Test_EncodeBinaryContent | |||
) |
Definition at line 133 of file StructuredHeadersUtilitiesTest.cpp.
References encodeBase64(), EXPECT_EQ, and string.
proxygen::StructuredHeaders::TEST_F | ( | StructuredHeadersUtilitiesTest | , |
Test_BinaryContentEmpty | |||
) |
Definition at line 142 of file StructuredHeadersUtilitiesTest.cpp.
References decodeBase64(), encodeBase64(), EXPECT_EQ, and string.
proxygen::StructuredHeaders::TEST_F | ( | StructuredHeadersUtilitiesTest | , |
TestItemTypeMatchesContentGood | |||
) |
Definition at line 149 of file StructuredHeadersUtilitiesTest.cpp.
References proxygen::StructuredHeaders::StructuredHeaderItem::BINARYCONTENT, proxygen::StructuredHeaders::StructuredHeaderItem::DOUBLE, EXPECT_TRUE, proxygen::StructuredHeaders::StructuredHeaderItem::IDENTIFIER, proxygen::StructuredHeaders::StructuredHeaderItem::INT64, int64_t, itemTypeMatchesContent(), proxygen::StructuredHeaders::StructuredHeaderItem::NONE, proxygen::StructuredHeaders::StructuredHeaderItem::STRING, proxygen::StructuredHeaders::StructuredHeaderItem::tag, and proxygen::StructuredHeaders::StructuredHeaderItem::value.
proxygen::StructuredHeaders::TEST_F | ( | StructuredHeadersUtilitiesTest | , |
TestItemTypeMatchesContentBad | |||
) |
Definition at line 175 of file StructuredHeadersUtilitiesTest.cpp.
References proxygen::StructuredHeaders::StructuredHeaderItem::BINARYCONTENT, proxygen::StructuredHeaders::StructuredHeaderItem::DOUBLE, EXPECT_FALSE, proxygen::StructuredHeaders::StructuredHeaderItem::IDENTIFIER, proxygen::StructuredHeaders::StructuredHeaderItem::INT64, int64_t, itemTypeMatchesContent(), proxygen::StructuredHeaders::StructuredHeaderItem::STRING, proxygen::StructuredHeaders::StructuredHeaderItem::tag, and proxygen::StructuredHeaders::StructuredHeaderItem::value.
|
static |
Definition at line 83 of file StructuredHeadersConstants.h.
Referenced by proxygen::StructuredHeadersBuffer::handleDecodeError().
|
static |
Definition at line 94 of file StructuredHeadersConstants.h.
Referenced by proxygen::StructuredHeadersEncoder::handleEncodeError().
|
static |
Definition at line 21 of file StructuredHeadersConstants.h.
Referenced by proxygen::StructuredHeadersBuffer::parseNumber(), and proxygen::StructuredHeadersEncoder::StructuredHeadersEncoder().
|
static |
Definition at line 20 of file StructuredHeadersConstants.h.
Referenced by proxygen::StructuredHeadersBuffer::parseNumber().