cloudevent

package
v1.14.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binary

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

Binary wraps a nuclio.Event with a cloudevent whose data is encoded in the nuclio.Event body.

func (*Binary) GetBody

func (we *Binary) GetBody() []byte

GetBody returns the body of the event

func (*Binary) GetBodyObject

func (we *Binary) GetBodyObject() interface{}

GetBodyObject returns the body of the event as an object

func (*Binary) GetClass

func (s *Binary) GetClass() string

get the class of source (sync, async, etc)

func (*Binary) GetContentType

func (we *Binary) GetContentType() string

GetContentType returns the content type of the body

func (*Binary) GetField

func (we *Binary) GetField(key string) interface{}

GetField returns the field by name as an interface{}

func (*Binary) GetFieldByteSlice

func (we *Binary) GetFieldByteSlice(key string) []byte

GetFieldByteSlice returns the field by name as a byte slice

func (*Binary) GetFieldInt

func (we *Binary) GetFieldInt(key string) (int, error)

GetFieldInt returns the field by name as an integer

func (*Binary) GetFieldString

func (we *Binary) GetFieldString(key string) string

GetFieldString returns the field by name as a string

func (*Binary) GetFields

func (we *Binary) GetFields() map[string]interface{}

GetFields loads all fields into a map of string / interface{}

func (*Binary) GetHeader

func (we *Binary) GetHeader(key string) interface{}

GetHeader returns the header by name as an interface{}

func (*Binary) GetHeaderByteSlice

func (we *Binary) GetHeaderByteSlice(key string) []byte

GetHeaderByteSlice returns the header by name as a byte slice

func (*Binary) GetHeaderInt

func (we *Binary) GetHeaderInt(key string) (int, error)

GetHeaderInt returns the field by name as an integer

func (*Binary) GetHeaderString

func (we *Binary) GetHeaderString(key string) string

GetHeaderString returns the header by name as a string

func (*Binary) GetHeaders

func (we *Binary) GetHeaders() map[string]interface{}

GetHeaders loads all headers into a map of string / interface{}

func (*Binary) GetID

func (s *Binary) GetID() nuclio.ID

GetID returns the ID of the event

func (*Binary) GetKind

func (s *Binary) GetKind() string

get specific kind of source (http, rabbit mq, etc)

func (*Binary) GetLastInBatch

func (s *Binary) GetLastInBatch() bool

GetLastInBatch returns whether the event is the last event in a trigger specific batch

func (*Binary) GetMethod

func (we *Binary) GetMethod() string

GetPath returns the method of the event, if applicable

func (*Binary) GetName

func (s *Binary) GetName() string

get specific kind of source (http, rabbit mq, etc)

func (*Binary) GetOffset

func (s *Binary) GetOffset() int

GetOffset returns the offset of the event

func (*Binary) GetPath

func (we *Binary) GetPath() string

GetPath returns the path of the event

func (*Binary) GetShardID

func (we *Binary) GetShardID() int

GetShardID returns the ID of the shard from which this event arrived, if applicable

func (*Binary) GetTimestamp

func (s *Binary) GetTimestamp() time.Time

GetTimestamp returns when the event originated

func (*Binary) GetTopic

func (we *Binary) GetTopic() string

GetTopic returns the topic of the event

func (*Binary) GetTotalNumShards

func (we *Binary) GetTotalNumShards() int

GetTotalNumShards returns the total number of shards, if applicable

func (*Binary) GetTriggerInfo

func (we *Binary) GetTriggerInfo() nuclio.TriggerInfoProvider

GetTriggerInfo retruns a trigger info provider

func (*Binary) GetType

func (s *Binary) GetType() string

GetType returns the type of event

func (*Binary) GetTypeVersion

func (s *Binary) GetTypeVersion() string

GetTypeVersion returns the version of the type

func (*Binary) GetURL

func (we *Binary) GetURL() string

GetURL returns the URL of the event

func (*Binary) GetVersion

func (s *Binary) GetVersion() string

GetVersion returns the version of the event

func (*Binary) SetEvent

func (s *Binary) SetEvent(event nuclio.Event) error

SetEvent wraps a Nuclio event

func (*Binary) SetID

func (we *Binary) SetID(id nuclio.ID)

SetID sets the ID of the event

func (*Binary) SetTriggerInfoProvider

func (we *Binary) SetTriggerInfoProvider(triggerInfoProvider nuclio.TriggerInfoProvider)

SetTriggerInfoProvider sets the information about the trigger who triggered this event

type Structured

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

Structured wraps a nuclio.Event with a cloudevent whose data is encoded in the nuclio.Event body.

func (*Structured) GetBody

func (s *Structured) GetBody() []byte

GetBody returns the body of the event

func (*Structured) GetBodyObject

func (s *Structured) GetBodyObject() interface{}

GetBodyObject returns the body of the event

func (*Structured) GetClass

func (s *Structured) GetClass() string

GetClass returns the class of source (sync, async, etc)

func (*Structured) GetContentType

func (s *Structured) GetContentType() string

GetContentType returns the content type of the body

func (*Structured) GetField

func (we *Structured) GetField(key string) interface{}

GetField returns the field by name as an interface{}

func (*Structured) GetFieldByteSlice

func (we *Structured) GetFieldByteSlice(key string) []byte

GetFieldByteSlice returns the field by name as a byte slice

func (*Structured) GetFieldInt

func (we *Structured) GetFieldInt(key string) (int, error)

GetFieldInt returns the field by name as an integer

func (*Structured) GetFieldString

func (we *Structured) GetFieldString(key string) string

GetFieldString returns the field by name as a string

func (*Structured) GetFields

func (we *Structured) GetFields() map[string]interface{}

GetFields loads all fields into a map of string / interface{}

func (*Structured) GetHeader

func (we *Structured) GetHeader(key string) interface{}

GetHeader returns the header by name as an interface{}

func (*Structured) GetHeaderByteSlice

func (we *Structured) GetHeaderByteSlice(key string) []byte

GetHeaderByteSlice returns the header by name as a byte slice

func (*Structured) GetHeaderInt

func (we *Structured) GetHeaderInt(key string) (int, error)

GetHeaderInt returns the field by name as an integer

func (*Structured) GetHeaderString

func (we *Structured) GetHeaderString(key string) string

GetHeaderString returns the header by name as a string

func (*Structured) GetHeaders

func (s *Structured) GetHeaders() map[string]interface{}

GetHeaders loads all headers into a map of string / interface{}

func (*Structured) GetID

func (s *Structured) GetID() nuclio.ID

GetID returns the ID of the event

func (*Structured) GetKind

func (s *Structured) GetKind() string

GetKind returns specific kind of source (http, rabbit mq, etc)

func (*Structured) GetLastInBatch

func (s *Structured) GetLastInBatch() bool

GetLastInBatch returns whether the event is the last event in a trigger specific batch

func (*Structured) GetMethod

func (we *Structured) GetMethod() string

GetPath returns the method of the event, if applicable

func (*Structured) GetName

func (s *Structured) GetName() string

GetKind returns specific kind of source (http, rabbit mq, etc)

func (*Structured) GetOffset

func (s *Structured) GetOffset() int

GetOffset returns the offset of the event

func (*Structured) GetPath

func (we *Structured) GetPath() string

GetPath returns the path of the event

func (*Structured) GetShardID

func (we *Structured) GetShardID() int

GetShardID returns the ID of the shard from which this event arrived, if applicable

func (*Structured) GetTimestamp

func (s *Structured) GetTimestamp() time.Time

GetTimestamp returns when the event originated

func (*Structured) GetTopic

func (we *Structured) GetTopic() string

GetTopic returns the topic of the event

func (*Structured) GetTotalNumShards

func (we *Structured) GetTotalNumShards() int

GetTotalNumShards returns the total number of shards, if applicable

func (*Structured) GetTriggerInfo

func (we *Structured) GetTriggerInfo() nuclio.TriggerInfoProvider

GetTriggerInfo retruns a trigger info provider

func (*Structured) GetType

func (s *Structured) GetType() string

GetType returns the type of event

func (*Structured) GetTypeVersion

func (s *Structured) GetTypeVersion() string

GetTypeVersion returns the version of the type

func (*Structured) GetURL

func (we *Structured) GetURL() string

GetURL returns the URL of the event

func (*Structured) GetVersion

func (s *Structured) GetVersion() string

GetVersion returns the version of the event

func (*Structured) SetEvent

func (s *Structured) SetEvent(event nuclio.Event) error

SetEvent wraps a Nuclio event

func (*Structured) SetID

func (we *Structured) SetID(id nuclio.ID)

SetID sets the ID of the event

func (*Structured) SetTriggerInfoProvider

func (we *Structured) SetTriggerInfoProvider(triggerInfoProvider nuclio.TriggerInfoProvider)

SetTriggerInfoProvider sets the information about the trigger who triggered this event

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL