envelope

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EVENT_VENDOR              string = "vendor"
	EVENT_PRIMARY_NAMESPACE   string = "primaryNamespace"
	EVENT_SECONDARY_NAMESPACE string = "secondaryNamespace"
	EVENT_TERTIARY_NAMESPACE  string = "tertiaryNamespace"
	EVENT_NAME                string = "name"
	EVENT_VERSION             string = "version"
	EVENT_FORMAT              string = "format"
	EVENT_PATH                string = "path"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClickhouseEnvelope added in v0.5.0

type ClickhouseEnvelope struct {
	Uuid            uuid.UUID      `json:"uuid"`
	EventProtocol   string         `json:"eventProtocol"`
	EventMetadata   *EventMetadata `json:"eventMetadata" gorm:"type:string"`
	SourceMetadata  `json:"sourceMetadata" gorm:"type:string"`
	Tstamp          time.Time        `json:"tstamp"`
	Ip              string           `json:"ip"`
	IsValid         *bool            `json:"isValid"`
	IsRelayed       *bool            `json:"isRelayed"`
	RelayedId       uuid.UUID        `json:"relayedId"`
	ValidationError *ValidationError `json:"validationErrors" gorm:"type:string"`
	Payload         event.Event      `json:"payload" gorm:"type:string"`
}

type Envelope

type Envelope struct {
	Uuid            uuid.UUID      `json:"uuid"`
	EventProtocol   string         `json:"eventProtocol"`
	EventMetadata   *EventMetadata `json:"eventMetadata" gorm:"type:json"`
	SourceMetadata  `json:"sourceMetadata" gorm:"type:json"`
	Tstamp          time.Time        `json:"tstamp"`
	Ip              string           `json:"ip"`
	IsValid         *bool            `json:"isValid"`
	IsRelayed       *bool            `json:"isRelayed"`
	RelayedId       uuid.UUID        `json:"relayedId"`
	ValidationError *ValidationError `json:"validationErrors" gorm:"type:json"`
	Payload         event.Event      `json:"payload" gorm:"type:json"`
}

func BuildCloudeventEnvelopesFromRequest

func BuildCloudeventEnvelopesFromRequest(c *gin.Context, conf config.Config) []Envelope

func BuildGenericEnvelopesFromRequest

func BuildGenericEnvelopesFromRequest(c *gin.Context, conf config.Config) []Envelope

func BuildRelayEnvelopesFromRequest

func BuildRelayEnvelopesFromRequest(c *gin.Context) []Envelope

func BuildSnowplowEnvelopesFromRequest

func BuildSnowplowEnvelopesFromRequest(c *gin.Context, conf config.Config) []Envelope

func BuildWebhookEnvelopesFromRequest

func BuildWebhookEnvelopesFromRequest(c *gin.Context) []Envelope

type EventMetadata added in v0.1.44

type EventMetadata struct {
	Vendor             string `json:"vendor,omitempty"`
	PrimaryNamespace   string `json:"primaryNamespace,omitempty"`
	SecondaryNamespace string `json:"secondaryNamespace,omitempty"`
	TertiaryNamespace  string `json:"tertiaryNamespace,omitempty"`
	Name               string `json:"name,omitempty"`
	Version            string `json:"version,omitempty"`
	Format             string `json:"format,omitempty"`
	Path               string `json:"path,omitempty"`
}

func (*EventMetadata) Scan added in v0.5.0

func (e *EventMetadata) Scan(input interface{}) error

func (*EventMetadata) Value added in v0.5.0

func (e *EventMetadata) Value() (driver.Value, error)

type MysqlEnvelope added in v0.5.0

type MysqlEnvelope struct {
	Uuid            uuid.UUID      `json:"uuid"`
	EventProtocol   string         `json:"eventProtocol"`
	EventMetadata   *EventMetadata `json:"eventMetadata" gorm:"type:json"`
	SourceMetadata  `json:"sourceMetadata" gorm:"type:json"`
	Tstamp          time.Time        `json:"tstamp"`
	Ip              string           `json:"ip"`
	IsValid         *bool            `json:"isValid"`
	IsRelayed       *bool            `json:"isRelayed"`
	RelayedId       uuid.UUID        `json:"relayedId"`
	ValidationError *ValidationError `json:"validationErrors" gorm:"type:json"`
	Payload         event.Event      `json:"payload" gorm:"type:json"`
}

type PayloadValidationError

type PayloadValidationError struct {
	Field       string `json:"field"`
	Description string `json:"description"`
	ErrorType   string `json:"errorType"`
}

type PgEnvelope added in v0.5.0

type PgEnvelope struct {
	Uuid            uuid.UUID      `json:"uuid"`
	EventProtocol   string         `json:"eventProtocol"`
	EventMetadata   *EventMetadata `json:"eventMetadata" gorm:"type:jsonb"`
	SourceMetadata  `json:"sourceMetadata" gorm:"type:jsonb"`
	Tstamp          time.Time        `json:"tstamp"`
	Ip              string           `json:"ip"`
	IsValid         *bool            `json:"isValid"`
	IsRelayed       *bool            `json:"isRelayed"`
	RelayedId       uuid.UUID        `json:"relayedId"`
	ValidationError *ValidationError `json:"validationErrors" gorm:"type:jsonb"`
	Payload         event.Event      `json:"payload" gorm:"type:jsonb"`
}

type SourceMetadata added in v0.1.44

type SourceMetadata struct {
	Name string `json:"name,omitempty"`
}

type ValidationError

type ValidationError struct {
	ErrorType       *string                  `json:"errorType"`
	ErrorResolution *string                  `json:"errorResolution"`
	Errors          []PayloadValidationError `json:"payloadValidationErrors"`
}

func (*ValidationError) Scan added in v0.5.0

func (e *ValidationError) Scan(input interface{}) error

func (*ValidationError) Value added in v0.5.0

func (e *ValidationError) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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