Documentation ¶
Index ¶
- func GetEventSource() string
- type CloudEventAdapter
- func (a CloudEventAdapter) GetEventID() string
- func (a CloudEventAdapter) GetShKeptnContext() string
- func (a CloudEventAdapter) GetSource() string
- func (a CloudEventAdapter) GetTime() time.Time
- func (a CloudEventAdapter) GetType() string
- func (a CloudEventAdapter) PayloadAs(content interface{}) error
- type CloudEventContentAdapter
- type CloudEventFactory
- type CloudEventFactoryBase
- type CloudEventFactoryInterface
- type CloudEventPayloadParseError
- type EventContentAdapter
- type TriggeredCloudEventContentAdapter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEventSource ¶
func GetEventSource() string
GetEventSource gets the source to be used for CloudEvents originating from the dynatrace-service.
Types ¶
type CloudEventAdapter ¶
type CloudEventAdapter struct {
// contains filtered or unexported fields
}
func NewCloudEventAdapter ¶
func NewCloudEventAdapter(ce cloudevents.Event) CloudEventAdapter
func (CloudEventAdapter) GetEventID ¶
func (a CloudEventAdapter) GetEventID() string
func (CloudEventAdapter) GetShKeptnContext ¶
func (a CloudEventAdapter) GetShKeptnContext() string
func (CloudEventAdapter) GetSource ¶
func (a CloudEventAdapter) GetSource() string
func (CloudEventAdapter) GetTime ¶
func (a CloudEventAdapter) GetTime() time.Time
func (CloudEventAdapter) GetType ¶
func (a CloudEventAdapter) GetType() string
func (CloudEventAdapter) PayloadAs ¶
func (a CloudEventAdapter) PayloadAs(content interface{}) error
PayloadAs attempts to populate the provided content object with the event payload. Will return an error otherwise. content should be a pointer type.
type CloudEventContentAdapter ¶
type CloudEventContentAdapter interface {
GetShKeptnContext() string
}
type CloudEventFactory ¶
type CloudEventFactory struct {
// contains filtered or unexported fields
}
func NewCloudEventFactory ¶
func NewCloudEventFactory(event TriggeredCloudEventContentAdapter, eventType string, payload interface{}) *CloudEventFactory
func (*CloudEventFactory) CreateCloudEvent ¶
func (f *CloudEventFactory) CreateCloudEvent() (*cloudevents.Event, error)
type CloudEventFactoryBase ¶
type CloudEventFactoryBase struct {
// contains filtered or unexported fields
}
func NewCloudEventFactoryBase ¶
func NewCloudEventFactoryBase(event CloudEventContentAdapter, eventType string, payload interface{}) *CloudEventFactoryBase
func (*CloudEventFactoryBase) CreateCloudEvent ¶
func (f *CloudEventFactoryBase) CreateCloudEvent() (*cloudevents.Event, error)
type CloudEventFactoryInterface ¶
type CloudEventFactoryInterface interface {
CreateCloudEvent() (*cloudevents.Event, error)
}
type CloudEventPayloadParseError ¶
type CloudEventPayloadParseError struct {
// contains filtered or unexported fields
}
func (*CloudEventPayloadParseError) Error ¶
func (e *CloudEventPayloadParseError) Error() string
type EventContentAdapter ¶
type EventContentAdapter interface { GetShKeptnContext() string GetEvent() string GetSource() string GetProject() string GetStage() string GetService() string GetDeployment() string GetTestStrategy() string GetDeploymentStrategy() string GetLabels() map[string]string }
EventContentAdapter allows to retrieve common data fields of an event
type TriggeredCloudEventContentAdapter ¶
type TriggeredCloudEventContentAdapter interface { CloudEventContentAdapter GetEventID() string }
Click to show internal directories.
Click to hide internal directories.