services

package
v1.2.26 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateVIN added in v1.2.17

func ValidateVIN(vin string) bool

Types

type DeviceDefinitionCacheService

type DeviceDefinitionCacheService interface {
	GetDeviceDefinitionByID(ctx context.Context, id string, options ...GetDeviceDefinitionOption) (*models.GetDeviceDefinitionQueryResult, error)
	GetDeviceDefinitionBySlug(ctx context.Context, slug string, year int) (*models.GetDeviceDefinitionQueryResult, error)
	GetDeviceDefinitionByMakeModelAndYears(ctx context.Context, make string, model string, year int) (*models.GetDeviceDefinitionQueryResult, error)
	DeleteDeviceDefinitionCacheByID(ctx context.Context, id string)
	DeleteDeviceDefinitionCacheByMakeModelAndYears(ctx context.Context, make string, model string, year int)
	DeleteDeviceDefinitionCacheBySlug(ctx context.Context, slug string, year int)
	GetDeviceDefinitionBySlugName(ctx context.Context, slug string) (*models.GetDeviceDefinitionQueryResult, error)
}

func NewDeviceDefinitionCacheService

func NewDeviceDefinitionCacheService(cache redis.CacheService, repository repositories.DeviceDefinitionRepository, deviceDefinitionOnChainService gateways.DeviceDefinitionOnChainService) DeviceDefinitionCacheService

type GetDeviceDefinitionCacheOptions added in v1.1.1

type GetDeviceDefinitionCacheOptions struct {
	UseOnChainData bool
	Make           *repomodels.DeviceMake
}

type GetDeviceDefinitionOption added in v1.1.1

type GetDeviceDefinitionOption func(*GetDeviceDefinitionCacheOptions)

func UseOnChain added in v1.1.1

func UseOnChain(deviceMake *repomodels.DeviceMake) GetDeviceDefinitionOption

type PowerTrainTypeService added in v1.0.14

type PowerTrainTypeService interface {
	ResolvePowerTrainType(ctx context.Context, makeSlug string, modelSlug string, definitionID *string, drivlyData null.JSON, vincarioData null.JSON) (string, error)
	ResolvePowerTrainFromVinInfo(vinInfo *coremodels.VINDecodingInfoData) string
}

func NewPowerTrainTypeService added in v1.0.14

func NewPowerTrainTypeService(dbs func() *db.ReaderWriter, rulesFileName string, logger *zerolog.Logger) (PowerTrainTypeService, error)

type VINDecodingService added in v0.7.9

type VINDecodingService interface {
	GetVIN(ctx context.Context, vin string, dt *repoModel.DeviceType, provider models.DecodeProviderEnum, country string) (*models.VINDecodingInfoData, error)
}

func NewVINDecodingService added in v0.7.9

func NewVINDecodingService(drivlyAPISvc gateways.DrivlyAPIService, vincarioAPISvc gateways.VincarioAPIService, autoIso gateways.AutoIsoAPIService, logger *zerolog.Logger, repository repositories.DeviceDefinitionRepository, datGroupAPIService gateways.DATGroupAPIService) VINDecodingService

Directories

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

Jump to

Keyboard shortcuts

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