Documentation
¶
Index ¶
Constants ¶
View Source
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 ¶
type CellID struct {
CellID string `json:"cellId"`
}
CellID represents a cell ID location value.
type Credential ¶
type Credential struct {
ValidFrom time.Time `json:"validFrom,omitempty"`
ValidTo time.Time `json:"validTo,omitempty"`
CredentialSubject json.RawMessage `json:"credentialSubject,omitempty"`
}
Credential represents a verifiable credential.
type GatewayID ¶
type GatewayID struct {
GatewayID string `json:"gatewayId"`
}
GatewayID represents a gateway ID location value.
type H3Cell ¶
type H3Cell struct {
CellID string `json:"h3CellId"`
}
H3Cell represents a latitude/longitude location value.
type Location ¶
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 ¶
UnmarshalJSON custom unmarshals a Location to handle the polymorphic LocationValue.
type LocationValue ¶
type LocationValue interface {
// contains filtered or unexported methods
}
LocationValue represents a generic interface for location values.
type POMSubject ¶
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 VINSubject ¶
type VINSubject struct {
VehicleDID 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"`
// VehicleIdentificationNumber is the VIN of the vehicle.
VehicleIdentificationNumber string `json:"vehicleIdentificationNumber,omitempty"`
// RecordedBy is the entity that recorded the VIN.
RecordedBy string `json:"recordedBy,omitempty"`
// RecordedAt is the time the VIN was recorded.
RecordedAt time.Time `json:"recordedAt,omitempty"`
// CountryCode that VIN belongs to.
CountryCode string `json:"countryCode,omitempty"`
}
VINSubject represents the subject of the VIN verifiable credential.
Click to show internal directories.
Click to hide internal directories.