Documentation
¶
Overview ¶
Package vinvc provides the controller for handling VIN VC-related requests.
Index ¶
- type FingerprintRepo
- type IdentityAPI
- type Service
- func (v *Service) CreateAndStoreVINAttestation(ctx context.Context, tokenID uint32) (*cloudevent.RawEvent, error)
- func (v *Service) CreateManualVINAttestation(ctx context.Context, tokenID uint32, vin string, countryCode string) (*cloudevent.RawEvent, error)
- func (v *Service) CreateVINAttestation(ctx context.Context, tokenID uint32) (*cloudevent.RawEvent, error)
- type VCRepo
- type VINAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FingerprintRepo ¶
type FingerprintRepo interface {
GetLatestFingerprintMessages(ctx context.Context, vehicle cloudevent.ERC721DID, pairedDeviceAddr models.PairedDevice) (*models.DecodedFingerprintData, error)
}
FingerprintRepo defines the interface for fingerprint message operations.
type IdentityAPI ¶
type IdentityAPI interface {
GetVehicleInfo(ctx context.Context, vehicleDID cloudevent.ERC721DID) (*models.VehicleInfo, error)
}
IdentityAPI defines the interface for identity operations.
type Service ¶
type Service struct { VINVCDataVersion string // contains filtered or unexported fields }
Service handles VIN VC-related operations.
func NewService ¶
func NewService( logger *zerolog.Logger, vcRepo VCRepo, identityService IdentityAPI, fingerprintService FingerprintRepo, vinService VINAPI, settings *config.Settings, privateKey *ecdsa.PrivateKey, ) *Service
NewService creates a new Service for VIN VC operations.
func (*Service) CreateAndStoreVINAttestation ¶ added in v0.1.0
func (v *Service) CreateAndStoreVINAttestation(ctx context.Context, tokenID uint32) (*cloudevent.RawEvent, error)
GenerateVINVCAndStore generates a new VIN VC and stores it in Object Storage.
func (*Service) CreateManualVINAttestation ¶ added in v0.1.0
func (*Service) CreateVINAttestation ¶ added in v0.1.0
func (v *Service) CreateVINAttestation(ctx context.Context, tokenID uint32) (*cloudevent.RawEvent, error)
GenerateVINVC generates a new VIN VC and returns it.
Click to show internal directories.
Click to hide internal directories.