odometerstatementvc

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 {
	// contains filtered or unexported fields
}

Service handles OdometerStatementVC-related operations.

func NewService

func NewService(
	vcRepo VCRepo,
	identityAPI IdentityAPI,
	telemetryAPI TelemetryAPI,
	settings *config.Settings,
	privateKey *ecdsa.PrivateKey,
) *Service

NewService creates a new Service for OdometerStatementVC operations.

func (*Service) CreateOdometerStatementVC

func (s *Service) CreateOdometerStatementVC(ctx context.Context, tokenID uint32, timestamp *time.Time, jwtToken string) error

CreateOdometerStatementVC creates an OdometerStatementVC. If timestamp is nil, it uses the latest odometer reading.

type TelemetryAPI

type TelemetryAPI interface {
	GetLatestSignalsWithAuth(ctx context.Context, options telemetryapi.TelemetryLatestOptions) ([]telemetryapi.Signal, error)
	GetHistoricalDataWithAuth(ctx context.Context, options telemetryapi.TelemetryHistoricalOptions, jwtToken string) ([]telemetryapi.Signal, error)
}

TelemetryAPI defines the interface for fetching telemetry data.

type VCRepo

type VCRepo interface {
	UploadAttestation(ctx context.Context, attestation *cloudevent.RawEvent) error
}

VCRepo defines the interface for managing VC storage.

Jump to

Keyboard shortcuts

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