Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @aws-sdk/eventstream-codec

Index

References

BinaryHeaderValue

Re-exports BinaryHeaderValue

BooleanHeaderValue

Re-exports BooleanHeaderValue

ByteHeaderValue

Re-exports ByteHeaderValue

EventStreamCodec

Re-exports EventStreamCodec

Int64

Re-exports Int64

IntegerHeaderValue

Re-exports IntegerHeaderValue

LongHeaderValue

Re-exports LongHeaderValue

Message

Re-exports Message

MessageHeaderValue

Re-exports MessageHeaderValue

MessageHeaders

Re-exports MessageHeaders

ShortHeaderValue

Re-exports ShortHeaderValue

StringHeaderValue

Re-exports StringHeaderValue

TimestampHeaderValue

Re-exports TimestampHeaderValue

UuidHeaderValue

Re-exports UuidHeaderValue

Type aliases

BinaryHeaderValue

BinaryHeaderValue: HeaderValue<"binary", Uint8Array>

BooleanHeaderValue

BooleanHeaderValue: HeaderValue<"boolean", boolean>

ByteHeaderValue

ByteHeaderValue: HeaderValue<"byte", number>

HeaderValue

HeaderValue<K, V>: { type: K; value: V }

Type parameters

  • K: string

  • V

Type declaration

  • type: K
  • value: V

IntegerHeaderValue

IntegerHeaderValue: HeaderValue<"integer", number>

LongHeaderValue

LongHeaderValue: HeaderValue<"long", Int64>

MessageHeaderValue

MessageHeaders

MessageHeaders: Record<string, MessageHeaderValue>

ShortHeaderValue

ShortHeaderValue: HeaderValue<"short", number>

StringHeaderValue

StringHeaderValue: HeaderValue<"string", string>

TestVector

TestVectors

TestVectors: Record<string, TestVector>

TimestampHeaderValue

TimestampHeaderValue: HeaderValue<"timestamp", Date>

UuidHeaderValue

UuidHeaderValue: HeaderValue<"uuid", string>

Variables

Const BINARY_TAG

BINARY_TAG: "binary" = "binary"

Const BOOLEAN_TAG

BOOLEAN_TAG: "boolean" = "boolean"

Const BYTE_TAG

BYTE_TAG: "byte" = "byte"

Const CHECKSUM_LENGTH

CHECKSUM_LENGTH: 4 = 4

Const INT_TAG

INT_TAG: "integer" = "integer"

Const LONG_TAG

LONG_TAG: "long" = "long"

Const MINIMUM_MESSAGE_LENGTH

MINIMUM_MESSAGE_LENGTH: number = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2

Const PRELUDE_LENGTH

PRELUDE_LENGTH: number = PRELUDE_MEMBER_LENGTH * 2

Const PRELUDE_MEMBER_LENGTH

PRELUDE_MEMBER_LENGTH: 4 = 4

Const SHORT_TAG

SHORT_TAG: "short" = "short"

Const STRING_TAG

STRING_TAG: "string" = "string"

Const TIMESTAMP_TAG

TIMESTAMP_TAG: "timestamp" = "timestamp"

Const UUID_PATTERN

UUID_PATTERN: RegExp = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/

Const UUID_TAG

UUID_TAG: "uuid" = "uuid"

Functions

negate

  • negate(bytes: Uint8Array): void

splitMessage

  • splitMessage(__namedParameters: { buffer: ArrayBufferLike; byteLength: number; byteOffset: number }): MessageParts

Object literals

Const vectors

vectors: object

all_headers

all_headers: object

encoded

encoded: Uint8Array = Uint8Array.from([0, 0, 0, 204, 0, 0, 0, 175, 15, 174, 100, 202, 10, 101, 118, 101, 110, 116, 45, 116, 121, 112, 101, 4, 0, 0, 160,12, 12, 99, 111, 110, 116, 101, 110, 116, 45, 116, 121, 112, 101, 7, 0, 16, 97, 112, 112, 108, 105, 99, 97, 116,105, 111, 110, 47, 106, 115, 111, 110, 10, 98, 111, 111, 108, 32, 102, 97, 108, 115, 101, 1, 9, 98, 111, 111, 108,32, 116, 114, 117, 101, 0, 4, 98, 121, 116, 101, 2, 207, 8, 98, 121, 116, 101, 32, 98, 117, 102, 6, 0, 20, 73, 39,109, 32, 97, 32, 108, 105, 116, 116, 108, 101, 32, 116, 101, 97, 112, 111, 116, 33, 9, 116, 105, 109, 101, 115,116, 97, 109, 112, 8, 0, 0, 0, 0, 0, 132, 95, 237, 5, 105, 110, 116, 49, 54, 3, 0, 42, 5, 105, 110, 116, 54, 52,5, 0, 0, 0, 0, 2, 135, 87, 178, 4, 117, 117, 105, 100, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,123, 39, 102, 111, 111, 39, 58, 39, 98, 97, 114, 39, 125, 171, 165, 241, 12,])

expectation

expectation: "success" = "success"

decoded

decoded: object

body

body: Uint8Array = Uint8Array.from([123, 39, 102, 111, 111, 39, 58, 39, 98, 97, 114, 39, 125])

headers

headers: object

bool false

bool false: object

type

type: "boolean" = "boolean"

value

value: false = false

bool true

bool true: object

type

type: "boolean" = "boolean"

value

value: true = true

byte

byte: object

type

type: "byte" = "byte"

value

value: number = -49

byte buf

byte buf: object

type

type: "binary" = "binary"

value

value: Uint8Array = Uint8Array.from([73, 39, 109, 32, 97, 32, 108, 105, 116, 116, 108, 101, 32, 116, 101, 97, 112, 111, 116, 33,])

content-type

content-type: object

type

type: "string" = "string"

value

value: string = "application/json"

event-type

event-type: object

type

type: "integer" = "integer"

value

value: number = 40972

int16

int16: object

type

type: "short" = "short"

value

value: number = 42

int64

int64: object

type

type: "long" = "long"

value

value: Int64 = Int64.fromNumber(42424242)

timestamp

timestamp: object

type

type: "timestamp" = "timestamp"

value

value: Date = new Date(8675309)

uuid

uuid: object

type

type: "uuid" = "uuid"

value

value: string = "01020304-0506-0708-090a-0b0c0d0e0f10"

corrupted_header_len

corrupted_header_len: object

encoded

encoded: Uint8Array = Uint8Array.from([0, 0, 0, 61, 0, 0, 0, 33, 7, 253, 131, 150, 12, 99, 111, 110, 116, 101, 110, 116, 45, 116, 121, 112, 101, 7, 0,16, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 47, 106, 115, 111, 110, 123, 39, 102, 111, 111, 39, 58,39, 98, 97, 114, 39, 125, 141, 156, 8, 177,])

expectation

expectation: "failure" = "failure"

corrupted_headers

corrupted_headers: object

encoded

encoded: Uint8Array = Uint8Array.from([0, 0, 0, 61, 0, 0, 0, 32, 7, 253, 131, 150, 12, 99, 111, 110, 116, 101, 110, 116, 45, 116, 121, 112, 101, 7, 0,16, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 47, 106, 115, 111, 110, 123, 97, 102, 111, 111, 39, 58,39, 98, 97, 114, 39, 125, 141, 156, 8, 177,])

expectation

expectation: "failure" = "failure"

corrupted_length

corrupted_length: object

encoded

encoded: Uint8Array = Uint8Array.from([0, 0, 0, 62, 0, 0, 0, 32, 7, 253, 131, 150, 12, 99, 111, 110, 116, 101, 110, 116, 45, 116, 121, 112, 101, 7, 0,16, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 47, 106, 115, 111, 110, 123, 39, 102, 111, 111, 39, 58,39, 98, 97, 114, 39, 125, 141, 156, 8, 177,])

expectation

expectation: "failure" = "failure"

corrupted_payload

corrupted_payload: object

encoded

encoded: Uint8Array = Uint8Array.from([0, 0, 0, 29, 0, 0, 0, 0, 253, 82, 140, 90, 91, 39, 102, 111, 111, 39, 58, 39, 98, 97, 114, 39, 125, 195, 101, 57,54,])

expectation

expectation: "failure" = "failure"

empty_message

empty_message: object

encoded

encoded: Uint8Array = Uint8Array.from([0, 0, 0, 16, 0, 0, 0, 0, 5, 194, 72, 235, 125, 152, 200, 255])

expectation

expectation: "success" = "success"

decoded

decoded: object

body

body: Uint8Array = Uint8Array.from([])

headers

headers: {}

Type declaration

int32_header

int32_header: object

encoded

encoded: Uint8Array = Uint8Array.from([0, 0, 0, 45, 0, 0, 0, 16, 65, 196, 36, 184, 10, 101, 118, 101, 110, 116, 45, 116, 121, 112, 101, 4, 0, 0, 160, 12,123, 39, 102, 111, 111, 39, 58, 39, 98, 97, 114, 39, 125, 54, 244, 128, 160,])

expectation

expectation: "success" = "success"

decoded

decoded: object

body

body: Uint8Array = Uint8Array.from([123, 39, 102, 111, 111, 39, 58, 39, 98, 97, 114, 39, 125])

headers

headers: object

event-type

event-type: object

type

type: "integer" = "integer"

value

value: number = 40972

payload_no_headers

payload_no_headers: object

encoded

encoded: Uint8Array = Uint8Array.from([0, 0, 0, 29, 0, 0, 0, 0, 253, 82, 140, 90, 123, 39, 102, 111, 111, 39, 58, 39, 98, 97, 114, 39, 125, 195, 101, 57,54,])

expectation

expectation: "success" = "success"

decoded

decoded: object

body

body: Uint8Array = Uint8Array.from([123, 39, 102, 111, 111, 39, 58, 39, 98, 97, 114, 39, 125])

headers

headers: {}

Type declaration

payload_one_str_header

payload_one_str_header: object

encoded

encoded: Uint8Array = Uint8Array.from([0, 0, 0, 61, 0, 0, 0, 32, 7, 253, 131, 150, 12, 99, 111, 110, 116, 101, 110, 116, 45, 116, 121, 112, 101, 7, 0,16, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 47, 106, 115, 111, 110, 123, 39, 102, 111, 111, 39, 58,39, 98, 97, 114, 39, 125, 141, 156, 8, 177,])

expectation

expectation: "success" = "success"

decoded

decoded: object

body

body: Uint8Array = Uint8Array.from([123, 39, 102, 111, 111, 39, 58, 39, 98, 97, 114, 39, 125])

headers

headers: object

content-type

content-type: object

type

type: "string" = "string"

value

value: string = "application/json"