aws-sdk-go: github.com/aws/aws-sdk-go/private/protocol/eventstream Index | Files | Directories

package eventstream

import "github.com/aws/aws-sdk-go/private/protocol/eventstream"

Index

Package Files

debug.go decode.go encode.go error.go header.go header_value.go message.go

type BoolValue Uses

type BoolValue bool

An BoolValue provides eventstream encoding, and representation of a Go bool value.

func (BoolValue) Get Uses

func (v BoolValue) Get() interface{}

Get returns the underlying type

func (BoolValue) String Uses

func (v BoolValue) String() string

type BytesValue Uses

type BytesValue []byte

An BytesValue provides eventstream encoding, and representation of a Go byte slice.

func (BytesValue) Get Uses

func (v BytesValue) Get() interface{}

Get returns the underlying value.

func (BytesValue) String Uses

func (v BytesValue) String() string

type ChecksumError Uses

type ChecksumError struct{}

ChecksumError provides the error for message checksum invalidation errors.

func (ChecksumError) Error Uses

func (e ChecksumError) Error() string

type Decoder Uses

type Decoder struct {
    // contains filtered or unexported fields
}

Decoder provides decoding of an Event Stream messages.

func NewDecoder Uses

func NewDecoder(r io.Reader) *Decoder

NewDecoder initializes and returns a Decoder for decoding event stream messages from the reader provided.

func (*Decoder) Decode Uses

func (d *Decoder) Decode(payloadBuf []byte) (m Message, err error)

Decode attempts to decode a single message from the event stream reader. Will return the event stream message, or error if Decode fails to read the message from the stream.

func (*Decoder) UseLogger Uses

func (d *Decoder) UseLogger(logger aws.Logger)

UseLogger specifies the Logger that that the decoder should use to log the message decode to.

type Encoder Uses

type Encoder struct {
    // contains filtered or unexported fields
}

Encoder provides EventStream message encoding.

func NewEncoder Uses

func NewEncoder(w io.Writer) *Encoder

NewEncoder initializes and returns an Encoder to encode Event Stream messages to an io.Writer.

func (*Encoder) Encode Uses

func (e *Encoder) Encode(msg Message) error

Encode encodes a single EventStream message to the io.Writer the Encoder was created with. An error is returned if writing the message fails.

type Header struct {
    Name  string
    Value Value
}

Header is a single EventStream Key Value header pair.

type Headers Uses

type Headers []Header

Headers are a collection of EventStream header values.

func (*Headers) Del Uses

func (hs *Headers) Del(name string)

Del deletes the value in the Headers if it exists.

func (Headers) Get Uses

func (hs Headers) Get(name string) Value

Get returns the Value associated with the header. Nil is returned if the value does not exist.

func (*Headers) Set Uses

func (hs *Headers) Set(name string, value Value)

Set associates the name with a value. If the header name already exists in the Headers the value will be replaced with the new one.

type Int16Value Uses

type Int16Value int16

An Int16Value provides eventstream encoding, and representation of a Go int16 value.

func (Int16Value) Get Uses

func (v Int16Value) Get() interface{}

Get returns the underlying value.

func (Int16Value) String Uses

func (v Int16Value) String() string

type Int32Value Uses

type Int32Value int32

An Int32Value provides eventstream encoding, and representation of a Go int32 value.

func (Int32Value) Get Uses

func (v Int32Value) Get() interface{}

Get returns the underlying value.

func (Int32Value) String Uses

func (v Int32Value) String() string

type Int64Value Uses

type Int64Value int64

An Int64Value provides eventstream encoding, and representation of a Go int64 value.

func (Int64Value) Get Uses

func (v Int64Value) Get() interface{}

Get returns the underlying value.

func (Int64Value) String Uses

func (v Int64Value) String() string

type Int8Value Uses

type Int8Value int8

An Int8Value provides eventstream encoding, and representation of a Go int8 value.

func (Int8Value) Get Uses

func (v Int8Value) Get() interface{}

Get returns the underlying value.

func (Int8Value) String Uses

func (v Int8Value) String() string

type LengthError Uses

type LengthError struct {
    Part  string
    Want  int
    Have  int
    Value interface{}
}

LengthError provides the error for items being larger than a maximum length.

func (LengthError) Error Uses

func (e LengthError) Error() string

type Message Uses

type Message struct {
    Headers Headers
    Payload []byte
}

A Message provides the eventstream message representation.

type StringValue Uses

type StringValue string

An StringValue provides eventstream encoding, and representation of a Go string.

func (StringValue) Get Uses

func (v StringValue) Get() interface{}

Get returns the underlying value.

func (StringValue) String Uses

func (v StringValue) String() string

type TimestampValue Uses

type TimestampValue time.Time

An TimestampValue provides eventstream encoding, and representation of a Go timestamp.

func (TimestampValue) Get Uses

func (v TimestampValue) Get() interface{}

Get returns the underlying value.

func (TimestampValue) String Uses

func (v TimestampValue) String() string

type UUIDValue Uses

type UUIDValue [16]byte

An UUIDValue provides eventstream encoding, and representation of a UUID value.

func (UUIDValue) Get Uses

func (v UUIDValue) Get() interface{}

Get returns the underlying value.

func (UUIDValue) String Uses

func (v UUIDValue) String() string

type Value Uses

type Value interface {
    Get() interface{}
    String() string
    // contains filtered or unexported methods
}

Value represents the abstract header value.

Directories

PathSynopsis
eventstreamapi
eventstreamtest

Package eventstream imports 12 packages (graph) and is imported by 27 packages. Updated 2019-09-09. Refresh now. Tools for package owners.