Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(860)

Unified Diff: plaso/storage/identifiers.py

Issue 325050043: [plaso] Added event data support to ZIP and GZIP storage (Closed)
Patch Set: Added event data support to ZIP and GZIP storage Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: plaso/storage/identifiers.py
diff --git a/plaso/storage/identifiers.py b/plaso/storage/identifiers.py
index 5fd3879fec7b143abef90c7d604297791597f3d6..c55ba5a544d1f2edb93a9317ddb4734fe003eba6 100644
--- a/plaso/storage/identifiers.py
+++ b/plaso/storage/identifiers.py
@@ -4,6 +4,32 @@
from plaso.containers import interface as containers_interface
+class FakeIdentifier(containers_interface.AttributeContainerIdentifier):
+ """Fake attribute container identifier intended for testing.
+
+ Attributes:
+ attribute_values_hash (int): hash value of the attribute values.
+ """
+
+ def __init__(self, attribute_values_hash):
+ """Initializes a fake attribute container identifier.
+
+ Args:
+ attribute_values_hash (int): hash value of the attribute values.
+ """
+ super(FakeIdentifier, self).__init__()
+ self.attribute_values_hash = attribute_values_hash
+
+ def CopyToString(self):
+ """Copies the identifier to a string representation.
+
+ Returns:
+ str: unique identifier or None.
+ """
+ if self.attribute_values_hash is not None:
+ return u'{0:d}'.format(self.attribute_values_hash)
+
+
class SerializedStreamIdentifier(
containers_interface.AttributeContainerIdentifier):
"""Serialized stream attribute container identifier.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b