Documentation
¶
Index ¶
- func CreateEventsTable(dbFilePath string) error
- func DeleteEvents(dbFilePath string, maxId int) error
- func FlushEvents(dbFilePath string, client *client.GatewayClient) error
- func SaveEvent(dbFilePath string, event *DgUpdateEvent) error
- func SendEvent(client *client.GatewayClient, event []DgUpdateEvent) error
- type DgEvent
- type DgEventType
- type DgUpdateEvent
- type EventTypeValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateEventsTable ¶
func DeleteEvents ¶
func FlushEvents ¶
func FlushEvents(dbFilePath string, client *client.GatewayClient) error
func SaveEvent ¶
func SaveEvent(dbFilePath string, event *DgUpdateEvent) error
func SendEvent ¶
func SendEvent(client *client.GatewayClient, event []DgUpdateEvent) error
Types ¶
type DgEventType ¶
type DgEventType struct {
Id EventTypeValue `json:"id"`
Version int `json:"version"`
}
type DgUpdateEvent ¶
type DgUpdateEvent struct {
Id string `json:"id"`
DeviceTime string `json:"deviceTime"`
Event DgEvent `json:"event"`
EventType DgEventType `json:"eventType"`
}
func NewEvent ¶
func NewEvent(eventType EventTypeValue, details string, success *bool, correlationId string, targetName string, version int) []DgUpdateEvent
type EventTypeValue ¶
type EventTypeValue string
const ( DownloadStarted EventTypeValue = "EcuDownloadStarted" DownloadCompleted EventTypeValue = "EcuDownloadCompleted" InstallationStarted EventTypeValue = "EcuInstallationStarted" InstallationApplied EventTypeValue = "EcuInstallationApplied" InstallationCompleted EventTypeValue = "EcuInstallationCompleted" )
Click to show internal directories.
Click to hide internal directories.