Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec struct { Encoding Encoding TransportName string // contains filtered or unexported fields }
type CodecStructured ¶
type CodecStructured struct {
Encoding Encoding
}
CodecStructured represents an structured http transport codec for all versions. Intended to be used as a base class.
type CodecV02 ¶
type CodecV02 struct { CodecStructured TransportName string Encoding Encoding }
type CodecV03 ¶
type CodecV03 struct { CodecStructured TransportName string Encoding Encoding }
type CodecV1 ¶
type CodecV1 struct { CodecStructured TransportName string Encoding Encoding }
type Encoding ¶
type Encoding int32
Encoding to use for NATS transport.
const ( // Default allows NATS transport implementation to pick. Default Encoding = iota // StructuredV02 is Structured CloudEvents spec v0.2. StructuredV02 // StructuredV03 is Structured CloudEvents spec v0.3. StructuredV03 // StructuredV1 is Structured CloudEvents spec v1.0. StructuredV1 // Unknown is unknown. Unknown )
type EventBridgeMessage ¶
type EventBridgeMessage struct { DetailType string `json:"detail-type"` // In case of EventBridge, this value is nonempty string Detail interface{} `json:"detail"` // Message object }
func DecodeEventBridgeMessage ¶
func DecodeEventBridgeMessage(body []byte) (message *EventBridgeMessage, ok bool)
func (*EventBridgeMessage) GetBody ¶
func (m *EventBridgeMessage) GetBody() []byte
func (*EventBridgeMessage) IsValid ¶
func (m *EventBridgeMessage) IsValid() bool
type SNSMessage ¶
type SNSMessage struct { Type string // In case of SNS, the type is "Notification" Message string // JSON encoded message }
func DecodeSNSMessage ¶
func DecodeSNSMessage(body []byte) (message *SNSMessage, ok bool)
func (*SNSMessage) GetBody ¶
func (m *SNSMessage) GetBody() []byte
func (*SNSMessage) IsNotification ¶
func (m *SNSMessage) IsNotification() bool
Click to show internal directories.
Click to hide internal directories.