Documentation
¶
Index ¶
- type DbConnection
- func (db *DbConnection) GetHistory(deviceId string) ([]Event, error)
- func (db *DbConnection) GetTombstone(deviceId string) (map[string]Event, error)
- func (db *DbConnection) Initialize() error
- func (db *DbConnection) InsertEvent(deviceId string, event Event, tombstoneMapKey string) error
- func (db *DbConnection) RemoveAll() error
- func (db *DbConnection) RemoveHistory(deviceId string, numToRemove int) error
- type Event
- type Interface
- type Tombstone
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbConnection ¶
type DbConnection struct { Server string Username string Password string Bucket string NumRetries int Timeout time.Duration // contains filtered or unexported fields }
func (*DbConnection) GetHistory ¶
func (db *DbConnection) GetHistory(deviceId string) ([]Event, error)
func (*DbConnection) GetTombstone ¶
func (db *DbConnection) GetTombstone(deviceId string) (map[string]Event, error)
func (*DbConnection) Initialize ¶
func (db *DbConnection) Initialize() error
func (*DbConnection) InsertEvent ¶
func (db *DbConnection) InsertEvent(deviceId string, event Event, tombstoneMapKey string) error
func (*DbConnection) RemoveAll ¶
func (db *DbConnection) RemoveAll() error
func (*DbConnection) RemoveHistory ¶
func (db *DbConnection) RemoveHistory(deviceId string, numToRemove int) error
type Event ¶
type Event struct { // the id for the event // // required: true Id string `json:"id"` // the time this event was found // // required: true Time int64 `json:"time"` // the source of this event // // required: true Source string `json:"src"` // the destination of this event // // required: true Destination string `json:"dest"` // the partners related to this device // // required: true PartnerIDs []string `json:"partner_ids"` // the transaction id for this event // // required: true TransactionUUID string `json:"transaction_uuid,omitempty"` // payload // // required: false Payload []byte `json:"payload,omitempty"` // other metadata and details related to this state // // required: true Details map[string]interface{} `json:"details"` }
Event represents the event information in the database
swagger:model Event
Click to show internal directories.
Click to hide internal directories.