dynamodb

package
v0.0.0-...-ebe1b00 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

Storage dynamodb storage

func New

func New(sess *session.Session, eventTable, undispatchCommitedTable, snapshotTable string) *Storage

New dynamodb storage

func (*Storage) CreateTables

func (s *Storage) CreateTables()

CreateTables all tables

func (*Storage) DeleteTables

func (s *Storage) DeleteTables()

DeleteTables delete all tables

func (*Storage) GetFromRevision

func (s *Storage) GetFromRevision(id string, from int) ([]goes.Event, error)

GetFromRevision get from revision

func (*Storage) GetLastEvent

func (s *Storage) GetLastEvent(id string) ([]goes.Event, error)

GetLastEvent get all event

func (*Storage) GetSnapshot

func (s *Storage) GetSnapshot(id string, version int) (*goes.Snapshot, error)

GetSnapshot get snapshot

func (*Storage) GetUndispatchedEvent

func (s *Storage) GetUndispatchedEvent() ([]goes.Event, error)

GetUndispatchedEvent get all undispatched event

func (*Storage) MarkDispatchedEvent

func (s *Storage) MarkDispatchedEvent(es []goes.Event) error

MarkDispatchedEvent delete dispatched event

func (*Storage) Save

func (s *Storage) Save(es []goes.Event) error

Save event

func (*Storage) SaveSnapshot

func (s *Storage) SaveSnapshot(snap *goes.Snapshot) error

SaveSnapshot save snapshot

type UndispatchedEvent

type UndispatchedEvent struct {
	Node          int    `json:"node" dynamodbav:"n"`
	KeyTime       string `json:"keyTime" dynamodbav:"keyTime"`
	AggregateID   string `json:"aggregateID" dynamodbav:"aggregateID"`
	AggregateType string `json:"aggregateType" dynamodbav:"aggregateType"`
	EventID       string `json:"eventID" dynamodbav:"eventID"`
	EventType     string `json:"eventType" dynamodbav:"eventType"`
	Revision      int    `json:"revision" dynamodbav:"revision"`
	Time          int64  `json:"time" dynamodbav:"time"`
	Data          []byte `json:"data" dynamodbav:"data"`
}

UndispatchedEvent entity

Jump to

Keyboard shortcuts

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