Documentation ¶
Index ¶
- type AftermarketDevice
- type AftermarketDeviceBy
- type AftermarketDeviceConnection
- type AftermarketDeviceEarnings
- type AftermarketDeviceEdge
- type AftermarketDevicesFilter
- type DCNBy
- type DCNConnection
- type DCNEdge
- type DCNFilter
- type Dcn
- type Definition
- type DeveloperLicense
- type DeveloperLicenseConnection
- type DeveloperLicenseEdge
- type DeveloperLicenseFilterBy
- type DeviceDefinition
- type DeviceDefinitionAttribute
- type DeviceDefinitionBy
- type DeviceDefinitionConnection
- type DeviceDefinitionEdge
- type DeviceDefinitionFilter
- type Earning
- type EarningsConnection
- type EarningsEdge
- type Manufacturer
- type ManufacturerBy
- type Node
- type PageInfo
- type Privilege
- type PrivilegeEdge
- type PrivilegeFilterBy
- type PrivilegesConnection
- type Query
- type RedirectURI
- type RedirectURIConnection
- type RedirectURIEdge
- type Sacd
- type SacdConnection
- type SacdEdge
- type Signer
- type SignerConnection
- type SignerEdge
- type SyntheticDevice
- type SyntheticDeviceBy
- type SyntheticDeviceConnection
- type SyntheticDeviceEdge
- type SyntheticDevicesFilter
- type UserRewards
- type Vehicle
- type VehicleConnection
- type VehicleEarnings
- type VehicleEdge
- type VehiclesFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AftermarketDevice ¶
type AftermarketDevice struct { // An opaque global identifier for this aftermarket device. ID string `json:"id"` // The ERC-721 token id for the device. TokenID int `json:"tokenId"` // The manufacturer of this aftermarket device. Manufacturer *Manufacturer `json:"manufacturer"` // The Ethereum address for the device. Address common.Address `json:"address"` // The Ethereum address of the owner of the device. Owner common.Address `json:"owner"` // The serial number on the side of the device. For AutoPis this is a UUID; for Macarons it is // a long decimal number. Serial *string `json:"serial,omitempty"` // The International Mobile Equipment Identity (IMEI) for the device. Imei *string `json:"imei,omitempty"` // Extended Unique Identifier (EUI) for LoRa devices. DevEui *string `json:"devEUI,omitempty"` // Manufacturer-specific hardware revision. May not always be present. HardwareRevision *string `json:"hardwareRevision,omitempty"` // The block timestamp at which this device was minted. MintedAt time.Time `json:"mintedAt"` // The block timestamp at which this device was claimed, if it has been claimed. Devices must be // claimed before pairing. ClaimedAt *time.Time `json:"claimedAt,omitempty"` // The vehicle, if any, with which the device is paired. Vehicle *Vehicle `json:"vehicle,omitempty"` // The beneficiary for this device, who receives any associated rewards. Defaults to the owner. Beneficiary common.Address `json:"beneficiary"` // Encoded name of the device Name string `json:"name"` // The Image Url of the device Image string `json:"image"` // The earnings attached to the aftermarket device Earnings *AftermarketDeviceEarnings `json:"earnings,omitempty"` // The block timestamp at which this device was paired, if it is presently paired. PairedAt *time.Time `json:"pairedAt,omitempty"` ManufacturerID int `json:"-"` VehicleID *int `json:"-"` }
func (AftermarketDevice) GetID ¶
func (this AftermarketDevice) GetID() string
func (AftermarketDevice) IsNode ¶
func (AftermarketDevice) IsNode()
type AftermarketDeviceBy ¶
type AftermarketDeviceBy struct { // token id of the aftermarket device NFT TokenID *int `json:"tokenId,omitempty"` // address of the aftermarket device Address *common.Address `json:"address,omitempty"` // serial number of the aftermarket device Serial *string `json:"serial,omitempty"` // The International Mobile Equipment Identity (IMEI) for the device if available Imei *string `json:"imei,omitempty"` // Extended Unique Identifier (EUI) for LoRa devices if available DevEui *string `json:"devEUI,omitempty"` }
The AftermarketDeviceBy input is used to specify a unique aftermarket device to query.
type AftermarketDeviceConnection ¶
type AftermarketDeviceConnection struct { TotalCount int `json:"totalCount"` Edges []*AftermarketDeviceEdge `json:"edges"` Nodes []*AftermarketDevice `json:"nodes"` PageInfo *PageInfo `json:"pageInfo"` }
The Connection type for AftermarketDevice.
type AftermarketDeviceEarnings ¶ added in v0.1.9
type AftermarketDeviceEarnings struct { TotalTokens *decimal.Big `json:"totalTokens"` History *EarningsConnection `json:"history"` AftermarketDeviceID int `json:"-"` }
type AftermarketDeviceEdge ¶
type AftermarketDeviceEdge struct { Cursor string `json:"cursor"` Node *AftermarketDevice `json:"node"` }
An edge in a AftermarketDeviceConnection.
type AftermarketDevicesFilter ¶
type AftermarketDevicesFilter struct { // Filter for aftermarket devices owned by this address. Owner *common.Address `json:"owner,omitempty"` Beneficiary *common.Address `json:"beneficiary,omitempty"` ManufacturerID *int `json:"manufacturerId,omitempty"` }
The AftermarketDevicesFilter input is used to specify filtering criteria for querying aftermarket devices. Aftermarket devices must match all of the specified criteria.
type DCNConnection ¶ added in v0.1.9
type DCNConnection struct { // The total count of DCNs in the connection. TotalCount int `json:"totalCount"` // A list of edges. Edges []*DCNEdge `json:"edges"` // A list of nodes in the connection Nodes []*Dcn `json:"nodes"` // Information to aid in pagination. PageInfo *PageInfo `json:"pageInfo"` }
The Connection type for DCN.
type DCNEdge ¶ added in v0.1.9
type DCNEdge struct { // A cursor for use in pagination. Cursor string `json:"cursor"` // The item at the end of the edge. Node *Dcn `json:"node"` }
An edge in a DCNConnection.
type DCNFilter ¶ added in v0.1.9
type DCNFilter struct { // Filter for DCN owned by this address. Owner *common.Address `json:"owner,omitempty"` }
Filter for DCN.
type Dcn ¶
type Dcn struct { // An opaque global identifier for this DCN. ID string `json:"id"` // The namehash of the domain. Node []byte `json:"node"` // The token id for the domain. This is simply the node reinterpreted as a uint256. TokenID *big.Int `json:"tokenId"` // Ethereum address of domain owner. Owner common.Address `json:"owner"` // The block timestamp at which the domain will cease to be valid. ExpiresAt *time.Time `json:"expiresAt,omitempty"` // The block timestamp at which the domain was created. MintedAt time.Time `json:"mintedAt"` // Human readable name, if any, for the domain; for example, "reddy.dimo". Name *string `json:"name,omitempty"` // Vehicle, if any, to which the domain is attached. Vehicle *Vehicle `json:"vehicle,omitempty"` VehicleID *int `json:"-"` }
Represents a DIMO Canonical Name. This is a unique identifier for a vehicle.
type Definition ¶
type DeveloperLicense ¶ added in v0.3.0
type DeveloperLicense struct { TokenID int `json:"tokenId"` Owner common.Address `json:"owner"` ClientID common.Address `json:"clientId"` Alias *string `json:"alias,omitempty"` MintedAt time.Time `json:"mintedAt"` Signers *SignerConnection `json:"signers"` RedirectURIs *RedirectURIConnection `json:"redirectURIs"` }
type DeveloperLicenseConnection ¶ added in v0.3.0
type DeveloperLicenseConnection struct { TotalCount int `json:"totalCount"` Edges []*DeveloperLicenseEdge `json:"edges"` Nodes []*DeveloperLicense `json:"nodes"` PageInfo *PageInfo `json:"pageInfo"` }
type DeveloperLicenseEdge ¶ added in v0.3.0
type DeveloperLicenseEdge struct { Node *DeveloperLicense `json:"node"` Cursor string `json:"cursor"` }
type DeveloperLicenseFilterBy ¶ added in v0.3.0
type DeviceDefinition ¶ added in v0.1.26
type DeviceDefinition struct { // Device definition id for this device definition. DeviceDefinitionID string `json:"deviceDefinitionId"` // Legacy id for this device definition. Newer device definitions may not have one. LegacyID *string `json:"legacyId,omitempty"` // Manufacturer for this device definition. Manufacturer *Manufacturer `json:"manufacturer,omitempty"` // Model for this device definition. Model string `json:"model"` // Year for this device definition. Year int `json:"year"` // Device type for this device definition. DeviceType *string `json:"deviceType,omitempty"` // Image URI for this device definition. ImageURI *string `json:"imageURI,omitempty"` // Device attributes for this device definition. Attributes []*DeviceDefinitionAttribute `json:"attributes"` }
Represents a Device Definition.
type DeviceDefinitionAttribute ¶ added in v0.1.26
type DeviceDefinitionBy ¶ added in v0.1.26
type DeviceDefinitionBy struct { // The id for the device definition. ID string `json:"id"` }
Input used to specify a unique Device Definition to query.
type DeviceDefinitionConnection ¶ added in v0.1.26
type DeviceDefinitionConnection struct { // The total count of Device Definitions in the connection. TotalCount int `json:"totalCount"` // A list of edges. Edges []*DeviceDefinitionEdge `json:"edges"` // A list of nodes in the connection Nodes []*DeviceDefinition `json:"nodes"` // Information to aid in pagination. PageInfo *PageInfo `json:"pageInfo"` }
Represents a Device Definition.
type DeviceDefinitionEdge ¶ added in v0.1.26
type DeviceDefinitionEdge struct { // A cursor for use in pagination. Cursor string `json:"cursor"` // The item at the end of the edge. Node *DeviceDefinition `json:"node"` }
An edge in a Device Definition Connection.
type DeviceDefinitionFilter ¶ added in v0.1.26
type DeviceDefinitionFilter struct { // Model filters for device definition that are of the given model. // This filter performs a case insensitive match. Model *string `json:"model,omitempty"` // Year filters for device definition that are of the given year. Year *int `json:"year,omitempty"` }
Filter for Device Definition.
type Earning ¶ added in v0.1.7
type Earning struct { // Week reward was issued Week int `json:"week"` // Address of Beneficiary that received reward Beneficiary common.Address `json:"beneficiary"` // Consecutive period of which vehicle was connected ConnectionStreak *int `json:"connectionStreak,omitempty"` // Tokens earned for connection period StreakTokens *decimal.Big `json:"streakTokens"` // AftermarketDevice connected to vehicle AftermarketDevice *AftermarketDevice `json:"aftermarketDevice,omitempty"` // Tokens earned by aftermarketDevice AftermarketDeviceTokens *decimal.Big `json:"aftermarketDeviceTokens"` // SyntheticDevice connected to vehicle SyntheticDevice *SyntheticDevice `json:"syntheticDevice,omitempty"` // Tokens earned by SyntheticDevice SyntheticDeviceTokens *decimal.Big `json:"syntheticDeviceTokens"` // Vehicle reward is assigned to Vehicle *Vehicle `json:"vehicle,omitempty"` // When the token was earned SentAt time.Time `json:"sentAt"` AftermarketDeviceID *int `json:"-"` SyntheticDeviceID *int `json:"-"` VehicleID int `json:"-"` }
type EarningsConnection ¶ added in v0.1.7
type EarningsConnection struct { TotalCount int `json:"totalCount"` Edges []*EarningsEdge `json:"edges"` Nodes []*Earning `json:"nodes"` PageInfo *PageInfo `json:"pageInfo"` }
type EarningsEdge ¶ added in v0.1.7
type Manufacturer ¶
type Manufacturer struct { // An opaque global identifier for this manufacturer. ID string `json:"id"` // The ERC-721 token id for the manufacturer. TokenID int `json:"tokenId"` // The name of the manufacturer. Name string `json:"name"` // The Ethereum address of the owner of this manufacturer. Owner common.Address `json:"owner"` // Id of the Tableland table holding the manufacturer's device definitions. TableID *int `json:"tableId,omitempty"` // The block timestamp at which this manufacturer was minted. MintedAt time.Time `json:"mintedAt"` // A Relay-style connection listing any aftermarket devices associated with manufacturer. AftermarketDevices *AftermarketDeviceConnection `json:"aftermarketDevices"` // List device definitions under this manufacturer. DeviceDefinitions *DeviceDefinitionConnection `json:"deviceDefinitions"` }
func (Manufacturer) GetID ¶
func (this Manufacturer) GetID() string
func (Manufacturer) IsNode ¶
func (Manufacturer) IsNode()
type ManufacturerBy ¶ added in v0.1.14
type Privilege ¶
type Privilege struct { // The id of the privilege. ID int `json:"id"` // The user holding the privilege. User common.Address `json:"user"` // The block timestamp at which this privilege was last set. SetAt time.Time `json:"setAt"` // The block timestamp at which the privilege expires. ExpiresAt time.Time `json:"expiresAt"` }
type PrivilegeEdge ¶
type PrivilegeFilterBy ¶ added in v0.1.5
type PrivilegesConnection ¶
type PrivilegesConnection struct { TotalCount int `json:"totalCount"` Edges []*PrivilegeEdge `json:"edges"` Nodes []*Privilege `json:"nodes"` PageInfo *PageInfo `json:"pageInfo"` }
The Connection type for Privileges.
type RedirectURI ¶ added in v0.3.0
type RedirectURIConnection ¶ added in v0.3.0
type RedirectURIConnection struct { TotalCount int `json:"totalCount"` Edges []*RedirectURIEdge `json:"edges"` Nodes []*RedirectURI `json:"nodes"` PageInfo *PageInfo `json:"pageInfo"` }
type RedirectURIEdge ¶ added in v0.3.0
type RedirectURIEdge struct { Node *RedirectURI `json:"node"` Cursor string `json:"cursor"` }
type Sacd ¶ added in v0.2.0
type Sacd struct { // Recipient of sacd permission grant Grantee common.Address `json:"grantee"` // Hex string of permissions Permissions string `json:"permissions"` // Permission source Source string `json:"source"` // The block timestamp at which this permission was set. CreatedAt time.Time `json:"createdAt"` // The block timestamp at which the permission expires. ExpiresAt time.Time `json:"expiresAt"` }
type SacdConnection ¶ added in v0.2.0
type SacdConnection struct { TotalCount int `json:"totalCount"` Edges []*SacdEdge `json:"edges"` Nodes []*Sacd `json:"nodes"` PageInfo *PageInfo `json:"pageInfo"` }
The Connection type for Sacds.
type SignerConnection ¶ added in v0.3.0
type SignerConnection struct { TotalCount int `json:"totalCount"` Edges []*SignerEdge `json:"edges"` Nodes []*Signer `json:"nodes"` PageInfo *PageInfo `json:"pageInfo"` }
type SignerEdge ¶ added in v0.3.0
type SyntheticDevice ¶
type SyntheticDevice struct { // An opaque global identifier for this syntheticDevice. ID string `json:"id"` // Encoded name of the device Name string `json:"name"` // The ERC-721 token id for the device. TokenID int `json:"tokenId"` // Type of integration for the synthetic device. IntegrationID int `json:"integrationId"` // The Ethereum address for the device. Address common.Address `json:"address"` // The block timestamp at which this device was minted. MintedAt time.Time `json:"mintedAt"` // The vehicle with which the synthetic device is paired. Vehicle *Vehicle `json:"vehicle"` VehicleID int `json:"-"` }
The SyntheticDevice is a software connection established to connect the vehicle to the DIMO network.
func (SyntheticDevice) GetID ¶ added in v0.1.20
func (this SyntheticDevice) GetID() string
func (SyntheticDevice) IsNode ¶ added in v0.1.20
func (SyntheticDevice) IsNode()
type SyntheticDeviceBy ¶ added in v0.1.20
type SyntheticDeviceBy struct { // The token id for the synthetic device. TokenID *int `json:"tokenId,omitempty"` // The Ethereum address for the synthetic device. Address *common.Address `json:"address,omitempty"` }
The SyntheticDeviceBy input is used to specify a unique synthetic device to query.
type SyntheticDeviceConnection ¶ added in v0.1.20
type SyntheticDeviceConnection struct { // The total count of SyntheticDevices in the connection. TotalCount int `json:"totalCount"` // A list of edges. Edges []*SyntheticDeviceEdge `json:"edges"` // A list of nodes in the connection (without going through the `edges` field). Nodes []*SyntheticDevice `json:"nodes"` // Information to aid in pagination. PageInfo *PageInfo `json:"pageInfo"` }
The Connection type for SyntheticDevice.
type SyntheticDeviceEdge ¶ added in v0.1.20
type SyntheticDeviceEdge struct { // A cursor for use in pagination. Cursor string `json:"cursor"` // The item at the end of the edge. Node *SyntheticDevice `json:"node"` }
An edge in a SytheticDeviceConnection.
type SyntheticDevicesFilter ¶ added in v0.1.20
type SyntheticDevicesFilter struct { // Filter for synthetic devices owned by this address. Owner *common.Address `json:"owner,omitempty"` // Filter for synthetic devices with this integration id. IntegrationID *int `json:"integrationId,omitempty"` }
The SyntheticDevicesFilter input is used to specify filtering criteria for querying synthetic devices. Synthetic devices must match all of the specified criteria.
type UserRewards ¶ added in v0.1.10
type UserRewards struct { TotalTokens *decimal.Big `json:"totalTokens"` History *EarningsConnection `json:"history"` User common.Address `json:"-"` }
type Vehicle ¶
type Vehicle struct { // An opaque global identifier for this vehicle. ID string `json:"id"` // The ERC-721 token id for the vehicle. TokenID int `json:"tokenId"` // The manufacturer of this vehicle. Manufacturer *Manufacturer `json:"manufacturer"` // The Ethereum address of the owner of this vehicle. Owner common.Address `json:"owner"` // The block timestamp at which this vehicle was minted. MintedAt time.Time `json:"mintedAt"` // The paired aftermarket device, if any. AftermarketDevice *AftermarketDevice `json:"aftermarketDevice,omitempty"` // A Relay-style connection listing any active privilege grants on this vehicle. Privileges *PrivilegesConnection `json:"privileges"` // A Relay-style connection listing any active SACD permission grants on this vehicle. Sacds *SacdConnection `json:"sacds"` // The paired synthetic device, if any. SyntheticDevice *SyntheticDevice `json:"syntheticDevice,omitempty"` // The device definition for this vehicle; which includes make, model, and year among // other things. Definition *Definition `json:"definition,omitempty"` Dcn *Dcn `json:"dcn,omitempty"` // Encoded name of the device Name string `json:"name"` // A URI containing an image for the vehicle. ImageURI string `json:"imageURI"` Image string `json:"image"` Earnings *VehicleEarnings `json:"earnings,omitempty"` DataURI string `json:"dataURI"` ManufacturerID int `json:"-"` }
type VehicleConnection ¶
type VehicleConnection struct { TotalCount int `json:"totalCount"` Edges []*VehicleEdge `json:"edges"` Nodes []*Vehicle `json:"nodes"` PageInfo *PageInfo `json:"pageInfo"` }
The Connection type for Vehicle.
type VehicleEarnings ¶ added in v0.1.7
type VehicleEarnings struct { TotalTokens *decimal.Big `json:"totalTokens"` History *EarningsConnection `json:"history"` VehicleID int `json:"-"` }
type VehicleEdge ¶
An edge in a VehicleConnection.
type VehiclesFilter ¶
type VehiclesFilter struct { // Privileged filters for vehicles to which the given address has access. This includes vehicles // that this address owns. Privileged *common.Address `json:"privileged,omitempty"` // Owner filters for vehicles that this address owns. Owner *common.Address `json:"owner,omitempty"` // Make filters for vehicles that are of the given make. Make *string `json:"make,omitempty"` // Model filters for vehicles that are of the given model. Model *string `json:"model,omitempty"` // Year filters for vehicles that are of the given year. Year *int `json:"year,omitempty"` // Filter for vehicles produced by a particular manufacturer, specified by manufacturer token id. ManufacturerTokenID *int `json:"manufacturerTokenId,omitempty"` // Filter for vehicles by device definition id. DeviceDefinitionID *string `json:"deviceDefinitionId,omitempty"` }
The VehiclesFilter input is used to specify filtering criteria for querying vehicles. Vehicles must match all of the specified criteria.