Documentation ¶
Index ¶
Constants ¶
View Source
const AwsContext = "AwsContext"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { AwsObjectStore ObjectStore AwsEventStore EventStore AwsEventBus EventBus AwsStateStore StateStore AwsGraphGateway GraphqlGateway }
type EventBus ¶
type EventBus interface {
PublishEvent(ctx context.Context, event *EventObject)
}
type EventObject ¶
type EventObject struct { Reference *ObjectRef `json:"_ref,omitempty"` SourceID string `json:"source_id,omitempty"` SourceType string `json:"source_type,omitempty"` SourceTime int64 `json:"source_time,omitempty"` SourceOwner string `json:"source_owner,omitempty"` SourceState *map[string]interface{} `json:"source_state,omitempty"` EventID uint64 `json:"event_id,omitempty"` EventType string `json:"event_type,omitempty"` EventTime int64 `json:"event_time,omitempty"` EventAuthor string `json:"event_author,omitempty"` EventPayload *map[string]interface{} `json:"event_payload,omitempty"` TriggerSource string `json:"trigger_source,omitempty"` TriggerID uint64 `json:"trigger_id,omitempty"` Transaction string `json:"transaction,omitempty"` }
type EventStore ¶
type EventStore interface { GetEventById(ctx context.Context, source string, id uint64) *EventObject GetLatestEvent(ctx context.Context, source string) *EventObject SaveEvent(ctx context.Context, event *EventObject) }
type GraphqlGateway ¶
type GraphqlGateway interface {
ExecuteGraphql(ctx context.Context, request *GraphqlRequest) (*GraphqlResponse, error)
}
type GraphqlRequest ¶
type GraphqlResponse ¶
type ObjectStore ¶
type StateStore ¶
type StateStore interface {
UpdateState(ctx context.Context, events []*EventObject)
}
Click to show internal directories.
Click to hide internal directories.