pom

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PolygonChainID = 137
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectivityRepo

type ConnectivityRepo interface {
	GetAutoPiEvents(ctx context.Context, pairedDevice *models.PairedDevice, after, before time.Time, limit int) ([][]byte, error)
	GetHashDogEvents(ctx context.Context, pairedDevice *models.PairedDevice, after, before time.Time, limit int) ([][]byte, error)
	GetSyntheticstatusEvents(ctx context.Context, vehicleDID cloudevent.NFTDID, after, before time.Time, limit int) ([][]byte, error)
	GetRuptelaStatusEvents(ctx context.Context, vehicleDID cloudevent.NFTDID, after, before time.Time, limit int) ([][]byte, error)
}

ConnectivityRepo defines the interface for retrieving connectivity events.

type IdentityAPI

type IdentityAPI interface {
	GetVehicleInfo(ctx context.Context, vehicleDID cloudevent.NFTDID) (*models.VehicleInfo, error)
}

IdentityAPI defines the interface for identity operations.

type Issuer

type Issuer interface {
	CreatePOMVC(vinSubject verifiable.POMSubject) ([]byte, error)
}

Issuer defines the interface for creating control documents.

type LatLng

type LatLng struct {
	Latitude  *float64 `json:"latitude"`
	Longitude *float64 `json:"longitude"`
}

type Service

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

func NewService

func NewService(logger *zerolog.Logger, identityAPI IdentityAPI, connectivityRepo ConnectivityRepo, vcRepo VCRepo, issuer Issuer, vehicleContractAddress string) (*Service, error)

func (*Service) CreatePOMVC

func (s *Service) CreatePOMVC(ctx context.Context, tokenID uint32) error

CreatePOMVC generates a Proof of Movement VC.

type VCRepo

type VCRepo interface {
	StorePOMVC(ctx context.Context, vehicleDID, producerDID cloudevent.NFTDID, vinvc json.RawMessage) error
}

VCRepo defines the interface for manging VC storage.

Jump to

Keyboard shortcuts

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