event

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ID        = "x-fcyp-id"
	Timestamp = "x-fcyp-timestamp"
	Type      = "x-fcyp-type"
	Source    = "x-fcyp-source"

	RoutingKey = "#"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultDomainEvent

type DefaultDomainEvent struct {
	EventID     string     `json:"-"`
	AggregateID string     `json:"aggregateId"`
	When        *time.Time `json:"-"`
	Type        string     `json:"-"`
}

func (*DefaultDomainEvent) GetAggregateID

func (d *DefaultDomainEvent) GetAggregateID() string

func (*DefaultDomainEvent) GetEventID

func (d *DefaultDomainEvent) GetEventID() string

func (*DefaultDomainEvent) GetType

func (d *DefaultDomainEvent) GetType() string

func (*DefaultDomainEvent) GetWhen

func (d *DefaultDomainEvent) GetWhen() *time.Time

type DomainEvent

type DomainEvent interface {
	GetEventID() string
	GetAggregateID() string
	GetWhen() *time.Time
	GetType() string
}

type Options

type Options struct {
	Source   string
	Exchange string
}

func NewOptions

func NewOptions(v *viper.Viper) (*Options, error)

type Publisher

type Publisher interface {
	Publish(interface{}) error
}

func NewEventPublisher

func NewEventPublisher(log logger.LogInfoFormat, c xrabbit.Client, options *Options) Publisher

type RabbitEventPublisher

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

func (*RabbitEventPublisher) Publish

func (r *RabbitEventPublisher) Publish(event interface{}) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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