Skip to content

Instantly share code, notes, and snippets.

View nicktylah's full-sized avatar

Nick Tyler nicktylah

View GitHub Profile

Keybase proof

I hereby claim:

  • I am nicktylah on github.
  • I am nicktylah (https://keybase.io/nicktylah) on keybase.
  • I have a public key ASDihSarhcBr7eVEdYgmckrlKp9JulJFdaXgiJ-qxiWPVQo

To claim this, I am signing this object:

@nicktylah
nicktylah / index.js
Created February 5, 2016 22:58
requirebin sketch
// Generates AVRO binary corresponding to "fully-loaded" entities. Useful for test purposes.
var avsc = require('avsc');
var entityBatchPreAuthv5 = avsc.parse({"namespace":"com.goguardian.events","type":"record","name":"EntityBatchPreAuthv5","doc":"Represents a batch of EntityPreAuths submitted by a single extension. There is a one-to-one mapping between this avro record and a kinesis record (i.e. the kinesis record payload contains JSON which we deserialize using this schema). Note that the kinesis record contains JSON and not serialized avro binary.","fields":[{"name":"type","type":{"type":"enum","name":"KinesisRecordType","symbols":["ENTITIES"],"doc":"What is the type of this kinesis record"},"default":"ENTITIES"},{"name":"compRand","type":"string","doc":"The compRand from the extension"},{"name":"submissionTime","type":"long","doc":"Epoch millis that this was submitted at"},{"name":"extensionVersion","type":"string","doc":"The extension version (e.g. '2.0.2.9')"},{"name":"userAgent","type":"string","doc":