services

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataQueryService added in v0.1.6

type DataQueryService struct {
	Settings *config.Settings
	// contains filtered or unexported fields
}

func NewAggregateQueryService added in v0.1.6

func NewAggregateQueryService(es *elasticsearch.TypedClient, settings *config.Settings, log *zerolog.Logger) *DataQueryService

func (*DataQueryService) FetchUserData added in v0.1.6

func (uds *DataQueryService) FetchUserData(userDeviceID string) (UserData, error)

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)
}

func NewDeviceAPIService

func NewDeviceAPIService(devicesAPIGRPCAddr string) DeviceAPIService

NewDeviceAPIService API wrapper to call device-data-api to get the userDevices associated with a userId over grpc

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

func (*EmailService) SendEmail added in v0.1.6

func (es *EmailService) SendEmail(user, downloadLink string) error

type StorageService added in v0.1.6

type StorageService struct {
	// contains filtered or unexported fields
}

func NewStorageService added in v0.1.6

func NewStorageService(settings *config.Settings, log *zerolog.Logger) *StorageService

func (*StorageService) UploadUserData added in v0.1.6

func (ss *StorageService) UploadUserData(ud UserData, keyName string) (string, error)

type UserData added in v0.1.6

type UserData struct {
	User             string                   `json:"user"`
	RequestTimestamp string                   `json:"requestTimestamp"`
	Data             []map[string]interface{} `json:"data,omitempty"`
}

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

Directories

Path Synopsis
Package mock_services is a generated GoMock package.
Package mock_services is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL