diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-04-18 01:00:42 +0100 |
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-04-18 01:00:42 +0100 |
| commit | 7b148411b127ebf6fdefdb1b0decd2886cdfc17b (patch) | |
| tree | 56385615fe86dbb5ab7ce4a90d696d97ddf21d7e /src/logTypes.hpp | |
| parent | 1e551e618a63c869fde6a4b327566b38696a5f45 (diff) | |
| parent | fa6074eaf52be4254c17b74f20193aa96c940df8 (diff) | |
| download | webstat-7b148411b127ebf6fdefdb1b0decd2886cdfc17b.tar.bz2 webstat-7b148411b127ebf6fdefdb1b0decd2886cdfc17b.tar.xz webstat-7b148411b127ebf6fdefdb1b0decd2886cdfc17b.zip | |
Merge remote-tracking branch 'origin/no-crc32'HEADwebstat-0.4main
Diffstat (limited to 'src/logTypes.hpp')
| -rw-r--r-- | src/logTypes.hpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/logTypes.hpp b/src/logTypes.hpp index 71393b2..7f0473e 100644 --- a/src/logTypes.hpp +++ b/src/logTypes.hpp @@ -1,5 +1,6 @@ #pragma once +#include <md5.h> #include <optional> #include <scn/scan.h> #include <string> @@ -34,8 +35,15 @@ namespace WebStat { ContentType, }; - using Crc32Value = uint32_t; - using Entity = std::tuple<Crc32Value, EntityType, std::string_view>; + using EntityId = int32_t; + using EntityHash = std::array<uint8_t, MD5_DIGEST_LENGTH>; + + struct Entity { + EntityHash hash; + std::optional<EntityId> id; + EntityType type; + std::string_view value; + }; } namespace scn { |
