event

package
v0.0.0-...-d865c3a Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2017 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Event types
	PersonCreatedEvent = "person:created"
	PersonUpdatedEvent = "person:updated"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	// The UUID of the event, if not populated the server will create one.
	Id string
	// The event payload. Contains the actual event.
	Data []byte
	// Type of event
	Type string
	// If left blank, this will be populated with the server-time once written to the log.
	Timestamp string
}

Event represents a state change that has occurred. Event is the root wrapper for all other event types.

type PersonCreated

type PersonCreated struct {
	Id   string
	Name string
	Age  int
}

Struct for PersonCreated event.

type PersonUpdated

type PersonUpdated struct {
	Name string
	Age  int
}

Struct for PersonUpdated event.

Jump to

Keyboard shortcuts

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