Versions in this module Expand all Collapse all v0 v0.0.1 May 29, 2021 Changes in this version + const ENC_JSON + const ENC_URI + var TRACCAR_ERROR_AUTH = errors.New("server auth is failed") + var TRACCAR_ERROR_FAILED = errors.New("operation can't be performed") + var TRACCAR_ERROR_NOTFOUND = errors.New("object not found") + var TRACCAR_ERROR_UNKNOWN = errors.New("unknown error") + var TRACCAR_ERROR_UNREACHABLE = errors.New("server is unreachable") + type Traccargo struct + LogCommunicationWriter io.Writer + LogWriter io.Writer + func NewTraccar(apiUrl string, authToken string) (tr *Traccargo, err error) + func (t *Traccargo) Close() + func (t *Traccargo) Position(deviceId int64) (position models.Position, err error) + func (t *Traccargo) Positions() (positions []*models.Position, err error) + func (t *Traccargo) Session() (user models.User, err error) + func (t *Traccargo) SubscribeUpdates(handler func(m *WsMessage)) (err error) + func (t *Traccargo) UnsubscribeUpdates() + type WsMessage struct + Devices *[]models.Device + Event *[]models.Event + Positions *[]models.Position