services

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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(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 {
	GetDeviceDefinition(ctx context.Context, id string) (*pb.GetDeviceDefinitionItemResponse, error)
}

func NewDeviceDefinitionsAPIService added in v0.2.3

func NewDeviceDefinitionsAPIService(ddConn *grpc.ClientConn) DeviceDefinitionsAPIService

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 string, downloadLink []string) error

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

func NewNATSService(settings *config.Settings, log *zerolog.Logger) (*NATSService, error)

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 NewQueryStorageService(es *elasticsearch.TypedClient, settings *config.Settings, log *zerolog.Logger) (*QueryStorageService, error)

func (*QueryStorageService) StreamDataToS3 added in v0.2.3

func (uds *QueryStorageService) StreamDataToS3(ctx context.Context, userDeviceID string, startDate, endDate time.Time) ([]string, error)

type UserData added in v0.1.6

type UserData struct {
	UserDeviceID     string                   `json:"userDeviceId"`
	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