Documentation
¶
Index ¶
Constants ¶
const ( // LocationTypeCellID represents the cell ID location type. LocationTypeCellID = "cellId" // LocationTypeH3Cell represents the latitude/longitude location type. LocationTypeH3Cell = "h3Cell" // LocationTypeGatewayID represents the gateway ID location type. LocationTypeGatewayID = "gatewayId" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CellID ¶ added in v0.1.0
type CellID struct {
CellID string `json:"cellId"`
}
CellID represents a cell ID location value.
type DecodedFingerprintData ¶
type DecodedFingerprintData struct {
cloudevent.CloudEventHeader
VIN string `json:"vin"`
}
DecodedFingerprintData represents the decoded fingerprint data.
type DeviceType ¶
type DeviceType string
DeviceType represents the type of device.
const ( // DeviceTypeAftermarket represents an aftermarket device. DeviceTypeAftermarket DeviceType = "aftermarket" // DeviceTypeSynthetic represents a synthetic device. DeviceTypeSynthetic DeviceType = "synthetic" )
type GatewayID ¶ added in v0.1.0
type GatewayID struct {
GatewayID string `json:"gatewayId"`
}
GatewayID represents a gateway ID location value.
type H3Cell ¶ added in v0.1.0
type H3Cell struct {
CellID string `json:"h3CellId"`
}
H3Cell represents a latitude/longitude location value.
type Location ¶ added in v0.1.0
type Location struct {
LocationType string `json:"locationType"`
LocationValue LocationValue `json:"locationValue"`
Timestamp time.Time `json:"timestamp"`
}
Location represents a single location event with type, value, and timestamp.
func (*Location) UnmarshalJSON ¶ added in v0.1.0
UnmarshalJSON custom unmarshals a Location to handle the polymorphic LocationValue.
type LocationValue ¶ added in v0.1.0
type LocationValue interface {
// contains filtered or unexported methods
}
LocationValue represents a generic interface for location values.
type POMSubject ¶ added in v0.1.0
type POMSubject struct {
ID string `json:"id,omitempty"`
// VehicleTokenID is the token ID of the vehicle NFT.
VehicleTokenID uint32 `json:"vehicleTokenId,omitempty"`
// VehicleContractAddress is the address of the vehicle contract.
VehicleContractAddress string `json:"vehicleContractAddress,omitempty"`
// RecordedBy is the entity that recorded the event.
RecordedBy string `json:"recordedBy,omitempty"`
Locations []Location `json:"locations"`
}
POMSubject represents the subject of the Proof of Movement VC.
type PairedDevice ¶
type PairedDevice struct {
DID cloudevent.ERC721DID `json:"erc721Did"`
Type DeviceType `json:"type"`
ManufacturerName string `json:"manufacturerName"`
}
PairedDevice represents a device paired with a token.
type VehicleInfo ¶
type VehicleInfo struct {
DID cloudevent.ERC721DID
PairedDevices []PairedDevice
NameSlug string
}
VehicleInfo contains information about a vehicle NFT.