Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AdminCommands = []string{
"importTransactions",
"addSlot",
"deleteSlot",
}
AdminCommands represents commands used by the administrator Notes ... do we separate configuration from user commands in the transaction history (probably no, for testing reasons)
var UserCommands = []string{
"cancelBooking",
"collectBooking",
"requestBooking",
"swapBooking",
"getBookings",
"listBookings",
}
UserCommands represents commands that users will send to the system
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { IssuedAt time.Time Do string When interval.Interval Slot string Booking string User string }
Action represents a booking action, including the time it was taken so as to allow history-replay to rebuild the booking status based on a record of past actions. This may also help with testing?
type History ¶
func (*History) NewReplayAll ¶
NewReplayAll returns a pointer to a Replay object which holds a pointer to the history, to save copying it. Messages will be replayed until there are no more messages. Messages added to the history after creating the object but before the message preceding them has been replayed will be replayed too.
func (*History) NewReplayAllUntilNow ¶
NewReplayAllUntilNow returns a pointer to a Replay object which holds a pointer to the history, to save copying it. All messages received up until the current time will be replayed
func (*History) NewReplayInterval ¶
NewReplayInterval returns a pointer to a Replay object which holds a pointer to the history, to save copying it. All messages received within the interval from -> to will be replayed. Intervals are exclusive, due to the use of time.Before, and time.After.