Documentation ¶
Index ¶
- Constants
- Variables
- func SaveEventPayload(ctx context.Context, repository Saver, keyvalue keyvalue.KeyValuer) error
- func StoreEvent(ctx context.Context, message Message) ([]byte, error)
- type Closer
- type Event
- type EventWithContext
- type EventWithContexter
- type Eventer
- type KeyValueWithContext
- type KeyValueWithContexter
- type Keyer
- type Loader
- type Message
- type Saver
- type TimePoint
- type TopicEventWithContexter
Constants ¶
View Source
const ( // Occurred is a tag for the time the event occurred. Occurred = "occurred" // Entered is a tag for the time the event entered. Entered = "entered" )
[DDD Reference - Domain Language](https://domainlanguage.com/ddd/reference/)
Variables ¶
View Source
var (
GetTopicKeyValueWithContexter = keyvalue.GetTopicKeyValueWithContexter
)
Functions ¶
func SaveEventPayload ¶
SaveEventPayload saves an event payload.
Types ¶
type EventWithContext ¶
EventWithContext is Event with context.Context.
func (*EventWithContext) GetContext ¶
func (p *EventWithContext) GetContext() context.Context
GetContext returns context.Context.
func (*EventWithContext) GetEvent ¶
func (p *EventWithContext) GetEvent() Eventer
GetEvent returns Eventer.
func (*EventWithContext) MarshalZerologObject ¶
func (p *EventWithContext) MarshalZerologObject(e *zerolog.Event)
MarshalZerologObject writes EventWithContext to given zerolog.Event.
func (*EventWithContext) String ¶
func (p *EventWithContext) String() string
String returns EventWithContext as string.
func (*EventWithContext) Validate ¶
func (p *EventWithContext) Validate() error
Validate returns error if failed validate.
type EventWithContexter ¶
type EventWithContexter interface { GetContext() context.Context GetEvent() Eventer MarshalZerologObject(*zerolog.Event) String() string Validate() error }
EventWithContexter is an interface generated for "github.com/michilu/boilerplate/service/event.EventWithContext".
type KeyValueWithContext ¶
type KeyValueWithContext = keyvalue.KeyValueWithContext
type KeyValueWithContexter ¶
type KeyValueWithContexter = keyvalue.KeyValueWithContexter
type Keyer ¶
type Keyer interface { GetKey() string zerolog.LogObjectMarshaler }
type TimePoint ¶
type TimePoint = pb.EventTimePoint
type TopicEventWithContexter ¶
type TopicEventWithContexter interface { // Publish returns a '<-chan EventWithContexter' that joins to the given topic. Publish(ctx context.Context, c <-chan EventWithContexter) // Publisher returns a 'chan<- EventWithContexter' that joins to the given topic. Publisher(ctx context.Context) chan<- EventWithContexter // Subscribe returns a 'chan<- EventWithContexter' that joins to the given topic. Subscribe(c chan<- EventWithContexter) }
TopicEventWithContexter is a topic.
func GetTopicEventWithContexter ¶
func GetTopicEventWithContexter(topic interface{}) TopicEventWithContexter
GetTopicEventWithContexter returns a TopicEventWithContexter of the given topic.
Click to show internal directories.
Click to hide internal directories.