Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteQueryUnescaper ¶
type ByteQueryUnescaper struct{}
ByteQueryUnescaper is a URL query decoder that operates with []byte instead of string.
func (*ByteQueryUnescaper) QueryUnescape ¶
func (s *ByteQueryUnescaper) QueryUnescape(q []byte) ([]byte, error)
QueryUnescape is like net/url.QueryUnescape but with only one encoding and with []byte.
type MixpanelEvent ¶
type MixpanelEvent struct { Pstart time.Time // the time that we started processing EventTime json.Number // the time that the server recieved the event UUID string // UUID of the event as assigned by the edge ClientIP string // the ipv4 of the client Event string // the type of the event EdgeType string // the type of the edge (internal/external) UserAgent string // the user agent from an edge request Properties json.RawMessage // the raw bytes of the json properties sub object Failure reporter.FailMode // a flag for failure modes }
MixpanelEvent is a decoded Mixpanel Event with Properties/source information.
func DecodeBase64 ¶
func DecodeBase64(matches ParseResult, escaper URLEscaper) ([]MixpanelEvent, error)
DecodeBase64 base64 decodes and json unmarshals a ParseResult into MixpanelEvents.
func MakeErrorEvent ¶
func MakeErrorEvent(line Parseable, uuid string, when string, edgeType string) *MixpanelEvent
MakeErrorEvent returns an event indicating an error happened while parsing the event.
func MakePanickedEvent ¶
func MakePanickedEvent(line Parseable) *MixpanelEvent
MakePanickedEvent returns an event inidicating a panic happened while parsing the event.
type ParseResult ¶
ParseResult is a base 64-encoded byte array with a UUID and time attached.
type Parser ¶
type Parser interface {
Parse(Parseable) ([]MixpanelEvent, error)
}
Parser is an interface for turning Parseables into one or more MixpanelEvents.
type URLEscaper ¶
URLEscaper is an interface for unescape URL query encoding in a byte stream.