Documentation
¶
Index ¶
- Variables
- type AutoPiAPIService
- type DeviceAPIService
- type DeviceDefinitionsAPIService
- type DeviceStatusEvent
- type DeviceStatusIngestService
- type EmailService
- type Event
- type EventService
- type NATSService
- type OdometerEvent
- type QueryStorageService
- type UserData
- type UserDeviceEvent
- type UserDeviceEventDevice
- type UserDeviceEventIntegration
- type UserDeviceFull
- type UserDeviceIntegrationEvent
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
This section is empty.
Types ¶
type AutoPiAPIService ¶ added in v0.4.0
func NewAutoPiAPIService ¶ added in v0.4.0
func NewAutoPiAPIService(settings *config.Settings, dbs func() *db.ReaderWriter) AutoPiAPIService
type DeviceAPIService ¶
type DeviceAPIService interface {
ListUserDevicesForUser(ctx context.Context, userID string) (*pb.ListUserDevicesForUserResponse, error)
GetUserDevice(ctx context.Context, userDeviceID string) (*pb.UserDevice, error)
UserDeviceBelongsToUserID(ctx context.Context, userID, userDeviceID string) (bool, error)
GetUserDeviceByTokenID(ctx context.Context, tokenID int64) (*pb.UserDevice, error)
UpdateStatus(ctx context.Context, userDeviceID string, integrationID string, status string) (*pb.UserDevice, error)
}
func NewDeviceAPIService ¶
func NewDeviceAPIService(devicesConn *grpc.ClientConn) DeviceAPIService
NewDeviceAPIService API wrapper to call device-data-api to get the userDevices associated with a userId over grpc
type DeviceDefinitionsAPIService ¶ added in v0.2.3
type DeviceDefinitionsAPIService interface {
GetDeviceDefinitionByID(ctx context.Context, id string) (*pb.GetDeviceDefinitionItemResponse, error)
GetIntegrations(ctx context.Context) ([]*pb.Integration, error)
GetDeviceDefinitionsByIDs(ctx context.Context, ids []string) ([]*pb.GetDeviceDefinitionItemResponse, error)
}
func NewDeviceDefinitionsAPIService ¶ added in v0.2.3
func NewDeviceDefinitionsAPIService(ddConn *grpc.ClientConn) DeviceDefinitionsAPIService
type DeviceStatusEvent ¶ added in v0.4.0
type DeviceStatusIngestService ¶ added in v0.4.0
type DeviceStatusIngestService struct {
// contains filtered or unexported fields
}
func NewDeviceStatusIngestService ¶ added in v0.4.0
func NewDeviceStatusIngestService(db func() *db.ReaderWriter, log *zerolog.Logger, eventService EventService, ddSvc DeviceDefinitionsAPIService, autoPiSvc AutoPiAPIService, deviceSvc DeviceAPIService) *DeviceStatusIngestService
func (*DeviceStatusIngestService) ProcessDeviceStatusMessages ¶ added in v0.4.0
func (i *DeviceStatusIngestService) ProcessDeviceStatusMessages(ctx goka.Context, msg interface{})
ProcessDeviceStatusMessages works on channel stream of messages from watermill kafka consumer
type EmailService ¶ added in v0.1.6
type EmailService struct {
ClientConn *grpc.ClientConn
// contains filtered or unexported fields
}
func NewEmailService ¶ added in v0.1.6
func NewEmailService(settings *config.Settings, log *zerolog.Logger) *EmailService
type EventService ¶ added in v0.4.0
func NewEventService ¶ added in v0.4.0
func NewEventService(logger *zerolog.Logger, settings *config.Settings, producer sarama.SyncProducer) EventService
type NATSService ¶ added in v0.2.3
type NATSService struct {
JetStream nats.JetStreamContext
JetStreamName string
JetStreamSubject string
AckTimeout time.Duration
DurableConsumer string
// contains filtered or unexported fields
}
func NewNATSService ¶ added in v0.2.3
type OdometerEvent ¶ added in v0.4.0
type QueryStorageService ¶ added in v0.2.3
type QueryStorageService struct {
AWSBucket string
ElasticIndex string
NATSDataDownloadSubject string
MaxFileSize int
// contains filtered or unexported fields
}
func NewQueryStorageService ¶ added in v0.2.3
func (*QueryStorageService) StreamDataToS3 ¶ added in v0.2.3
type UserDeviceEvent ¶ added in v0.4.0
type UserDeviceEvent struct {
Timestamp time.Time `json:"timestamp"`
UserID string `json:"userId"`
Device UserDeviceEventDevice `json:"device"`
}
type UserDeviceEventDevice ¶ added in v0.4.0
type UserDeviceEventIntegration ¶ added in v0.4.0
type UserDeviceFull ¶
type UserDeviceFull struct {
ID string `json:"id"`
VIN *string `json:"vin"`
VINConfirmed bool `json:"vinConfirmed"`
Name *string `json:"name"`
CustomImageURL *string `json:"customImageUrl"`
CountryCode *string `json:"countryCode"`
}
UserDeviceFull represents object user's see on frontend for listing of their devices
type UserDeviceIntegrationEvent ¶ added in v0.4.0
type UserDeviceIntegrationEvent struct {
Timestamp time.Time `json:"timestamp"`
UserID string `json:"userId"`
Device UserDeviceEventDevice `json:"device"`
Integration UserDeviceEventIntegration `json:"integration"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.