AvroSchemaDecoder.d.ts 968 B

1234567891011121314151617181920212223242526272829
  1. import { Reader } from '@jsonjoy.com/buffers/lib/Reader';
  2. import type { AvroSchema } from './types';
  3. export declare class AvroSchemaDecoder {
  4. readonly reader: Reader;
  5. private decoder;
  6. private validator;
  7. private namedSchemas;
  8. constructor(reader?: Reader);
  9. decode(data: Uint8Array, schema: AvroSchema): unknown;
  10. private readValue;
  11. private readRecord;
  12. private readEnum;
  13. private readArray;
  14. private readMap;
  15. private readUnion;
  16. private readFixed;
  17. readNull(schema: AvroSchema): null;
  18. readBoolean(schema: AvroSchema): boolean;
  19. readInt(schema: AvroSchema): number;
  20. readLong(schema: AvroSchema): number | bigint;
  21. readFloat(schema: AvroSchema): number;
  22. readDouble(schema: AvroSchema): number;
  23. readBytes(schema: AvroSchema): Uint8Array;
  24. readString(schema: AvroSchema): string;
  25. private validateSchemaType;
  26. private resolveSchema;
  27. private collectNamedSchemas;
  28. private getFullName;
  29. }