package
0.0.7
Repository: https://github.com/xmidt-org/interpreter.git
Documentation: pkg.go.dev

# Functions

BirthdateAlignmentValidator returns a ValidatorFunc that validates that the birthdate is within a certain bounds of the timestamps in the event destination (if available).
BirthdateValidator returns a ValidatorFunc that checks if an Event's birthdate is valid, meaning greater than 0 and within the bounds deemed valid by the TimeValidation parameter.
BootDurationValidator returns a ValidatorFunc that validates that all unix timestamps in the destination of an event are at least a certain time duration from the boot-time of the event, ensuring that the boot cycle is not suspiciously fast.
BootTimeValidator returns a ValidatorFunc that checks if an Event's boot-time is valid (meaning parsable), greater than 0, and within the bounds deemed valid by the TimeValidation parameters.
ConsistentDeviceIDValidator returns a ValidatorFunc that validates that all occurrences of the device id in an event's source, destination, or metadata are consistent.
DefaultValidator is a Validator that always returns true and nil.
DestinationValidator takes in a string and returns a ValidatorFunc that checks if an Event's event type is valid and matches the type being searched for.
EventTypeValidator returns a ValidatorFunc that validates that the event-type provided in the destination matches one of the possible outcomes.
ParseTag is used to convert a string to a Tag.
No description provided by the author

# Constants

duplicate event detected.
No description provided by the author
event type does not match what is being searched for.
No description provided by the author
not a true reboot.
No description provided by the author
event destination's unix timestamps are too close to the boot-time of the event.
No description provided by the author
occurrences of device id in the event is inconsistent.
No description provided by the author
metadata values for certain metadata keys are inconsistent.
No description provided by the author
birthdate does not fall within a certain time range.
No description provided by the author
default tag when event destination's unix timestamps are not in proper time range of event boot-time.
No description provided by the author
boot-time is either too far in the past or too far in the future.
No description provided by the author
default tag when there is something wrong with the event destination.
No description provided by the author
wrong event order.
No description provided by the author
event type is not one of the possible event types.
No description provided by the author
birthdate is not within a certain time range of the timestamps in the event destination.
No description provided by the author
boot-time does not exist in the event's metadata.
No description provided by the author
device id is missing from the destination.
No description provided by the author
session is missing offline event.
No description provided by the author
session is missing online event.
No description provided by the author
used for multiple errors or cases where there are multiple error tags.
No description provided by the author
event does not have the newest boot-time and therefore is an old event.
No description provided by the author
not an event.
No description provided by the author
no reboot found.
No description provided by the author
boot-time is suspiciously old but not old enough to be deemed invalid.
No description provided by the author
No description provided by the author
No description provided by the author
multiple events in an event list have the same transcation uuid.
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

BootDurationErr is an error that is returned when the device boot duration is deemed invalid.
EventWithError is a type of error that connects errors with a specific event.
InconsistentIDErr is an error returned when the ids in an event is inconsistent.
InvalidBirthdateErr is an error returned when the birthdate of an event is invalid.
InvalidBootTimeErr is an error returned when the boot-time of an event is invalid.
InvalidDestinationErr is an error that is returned whenever there is something wrong with an event's destination.
InvalidEventErr is a Tag Error that wraps an underlying error.
TimeValidator implements the TimeValidation interface and makes sure that times are in a certain time frame.

# Interfaces

ErrorWithFields is an optional interface for errors to implement if the error should include extra fields as information.
TaggedError is an optional interface for errors to implement if the error should include a Tag.
TaggedErrors is an optional interface for errors to implement if the error should include multiple tags.
TimeValidation sees if a given time is within the time frame it is set to validate.
Validator validates an event, returning false and an error if the event is not valid and true if the event is valid.

# Type aliases

Errors is a Multierror that also acts as an error, so that a log-friendly string can be returned but each error in the list can also be accessed.
Tag is an enum used to flag the problems with an event.
ValidatorFunc is a function that checks if an Event is valid.
Validators are a list of objects that implement the Validator interface.