entities

package
v0.0.0-...-623c56b Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeadLetterItem

type DeadLetterItem struct {
	Id               bson.ObjectId `bson:"_id"`
	Event            Event         `bson:"event,omitempty"`
	CreationDate     time.Time     `bson:"creation_date,omitempty"`
	FirstFailureDate time.Time     `bson:"first_failure_date,omitempty"`
	NextRetryDate    time.Time     `bson:"next_retry_date,omitempty"`
	FailureCount     int           `bson:"failure_count,omitempty"`
	CallbackUrl      string        `bson:"callback_url,omitempty"`
}

func NewDeadLetterItem

func NewDeadLetterItem(event Event) DeadLetterItem

type Event

type Event struct {
	EventName string `json:"event_name" bson:"event_name"`
	Payload   string `json:"payload" bson:"payload"`
}

this needs separated into data entities and api entities

type EventStoreItem

type EventStoreItem struct {
	Id           bson.ObjectId `bson:"_id"`
	Event        Event         `bson:"event,omitempty"`
	CreationDate time.Time     `bson:"creation_date,omitempty"`
}

func NewEventStoreItem

func NewEventStoreItem(event Event) EventStoreItem

type Registration

type Registration struct {
	Id           bson.ObjectId `bson:"_id"`
	EventName    string        `bson:"event_name,omitempty"`
	CallbackUrl  string        `bson:"callback_url,omitempty"`
	CreationDate time.Time     `bson:"creation_date,omitempty"`
}

func CreateNewRegistration

func CreateNewRegistration(event string, callback string) Registration

Jump to

Keyboard shortcuts

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