adapter

package
v0.0.0-...-3da42c7 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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

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
}

Jump to

Keyboard shortcuts

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