Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventFormatter ¶
type EventFormatter interface { // GetFormattedDetails formats a given event in a human-readable format GetFormattedDetails(context.Context, *esApi.Event) (string, error) }
EventFormatter is the interface definition for all event formatters
type EventFormatterBase ¶
type EventFormatterBase struct {
*formatters.FormatterBase
}
EventFormatterBase is the base implementation for all event formatters
func (*EventFormatterBase) AppendUpdate ¶
func (f *EventFormatterBase) AppendUpdate(field string, update string, old string, strBuilder *strings.Builder)
AppendUpdate appends updates to a string builder in human-readable format
type EventFormatterRegistry ¶
type EventFormatterRegistry interface { // RegisterEventFormatter registers an event-formatter factory for an event-type. RegisterEventFormatter(es.EventType, func(esApi.EventStoreClient) EventFormatter) error // CreateEventFormatter returns the event-formatter of the event-type registered with RegisterEventFormatter. CreateEventFormatter(esApi.EventStoreClient, es.EventType) (EventFormatter, error) }
EventFormatterRegistry is the interface definition for an event-formatter registry
var DefaultEventFormatterRegistry EventFormatterRegistry
func NewEventFormatterRegistry ¶
func NewEventFormatterRegistry() EventFormatterRegistry
NewEventFormatterRegistry creates a new event-formatter registry
Click to show internal directories.
Click to hide internal directories.