Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { // Data for event. Data []byte `json:"data" msgpack:"dat" firestore:"data"` // Index for event (read only). Index int64 `json:"idx" msgpack:"idx" firestore:"idx"` // Timestamp (read only). The time at which the event was created. // Firestore sets this to the document create time. Timestamp int64 `json:"ts" msgpack:"ts" firestore:"-"` }
Event in an event log. If this format changes, you should also change in firestore and other backends that don't directly use this struct on set.
type Events ¶
type Events interface { // EventsAdd appends an event. EventsAdd(ctx context.Context, path string, data [][]byte) ([]*Event, error) // Events from log. Events(ctx context.Context, path string, opt ...Option) (Iterator, error) // EventsDelete deletes all events at path. EventsDelete(ctx context.Context, path string) (bool, error) }
Events describes an append only event log.
type Iterator ¶
type Iterator interface { // Next document, or nil. Next() (*Event, error) // Release resources associated with the iterator. Release() }
Iterator is an iterator for Event's.
func NewIterator ¶
NewIterator returns an iterator for a Event slice.
Click to show internal directories.
Click to hide internal directories.