Documentation ¶
Index ¶
- type EventClient
- type EventRestClient
- func (e *EventRestClient) Add(event *models.Event, ctx context.Context) (string, error)
- func (e *EventRestClient) Delete(id string, ctx context.Context) error
- func (e *EventRestClient) DeleteForDevice(deviceId string, ctx context.Context) error
- func (e *EventRestClient) DeleteOld(age int, ctx context.Context) error
- func (e *EventRestClient) Event(id string, ctx context.Context) (models.Event, error)
- func (e *EventRestClient) EventCount(ctx context.Context) (int, error)
- func (e *EventRestClient) EventCountForDevice(deviceId string, ctx context.Context) (int, error)
- func (e *EventRestClient) Events(ctx context.Context) ([]models.Event, error)
- func (e *EventRestClient) EventsForDevice(deviceId string, limit int, ctx context.Context) ([]models.Event, error)
- func (e *EventRestClient) EventsForDeviceAndValueDescriptor(deviceId string, vd string, limit int, ctx context.Context) ([]models.Event, error)
- func (e *EventRestClient) EventsForInterval(start int, end int, limit int, ctx context.Context) ([]models.Event, error)
- func (e *EventRestClient) EventsUnpushed(ctx context.Context, nUnpushed int) ([]models.Event, error)
- func (e *EventRestClient) MarkPushed(id string, ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventClient ¶
type EventClient interface { Events(ctx context.Context) ([]models.Event, error) EventsUnpushed(ctx context.Context, nUnpushed int) ([]models.Event, error) Event(id string, ctx context.Context) (models.Event, error) EventCount(ctx context.Context) (int, error) EventCountForDevice(deviceId string, ctx context.Context) (int, error) EventsForDevice(id string, limit int, ctx context.Context) ([]models.Event, error) EventsForInterval(start int, end int, limit int, ctx context.Context) ([]models.Event, error) EventsForDeviceAndValueDescriptor(deviceId string, vd string, limit int, ctx context.Context) ([]models.Event, error) Add(event *models.Event, ctx context.Context) (string, error) DeleteForDevice(id string, ctx context.Context) error DeleteOld(age int, ctx context.Context) error Delete(id string, ctx context.Context) error MarkPushed(id string, ctx context.Context) error }
func NewEventClient ¶
func NewEventClient(url string) EventClient
type EventRestClient ¶
type EventRestClient struct {
// contains filtered or unexported fields
}
func (*EventRestClient) Delete ¶
func (e *EventRestClient) Delete(id string, ctx context.Context) error
Delete event by id
func (*EventRestClient) DeleteForDevice ¶
func (e *EventRestClient) DeleteForDevice(deviceId string, ctx context.Context) error
Delete events by device name
func (*EventRestClient) DeleteOld ¶
func (e *EventRestClient) DeleteOld(age int, ctx context.Context) error
Delete events by age
func (*EventRestClient) EventCount ¶
func (e *EventRestClient) EventCount(ctx context.Context) (int, error)
Get event count
func (*EventRestClient) EventCountForDevice ¶
Get event count for device
func (*EventRestClient) EventsForDevice ¶
func (e *EventRestClient) EventsForDevice(deviceId string, limit int, ctx context.Context) ([]models.Event, error)
Get events for device
func (*EventRestClient) EventsForDeviceAndValueDescriptor ¶
func (e *EventRestClient) EventsForDeviceAndValueDescriptor(deviceId string, vd string, limit int, ctx context.Context) ([]models.Event, error)
Get events for device and value descriptor
func (*EventRestClient) EventsForInterval ¶
func (e *EventRestClient) EventsForInterval(start int, end int, limit int, ctx context.Context) ([]models.Event, error)
Get events for interval
func (*EventRestClient) EventsUnpushed ¶
func (e *EventRestClient) EventsUnpushed(ctx context.Context, nUnpushed int) ([]models.Event, error)
Get a list of all unpushed events
func (*EventRestClient) MarkPushed ¶
func (e *EventRestClient) MarkPushed(id string, ctx context.Context) error
Mark event as pushed
Click to show internal directories.
Click to hide internal directories.