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 Earning
- type Earnings
- type EarningsConnection
- type EarningsEdge
- type Manufacturer
- type Node
- type PageInfo
- type Privilege
- type PrivilegeEdge
- type PrivilegeFilterBy
- type PrivilegesConnection
- type SyntheticDevice
- 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,omitempty"` // 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"` // 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"` 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"` ManufacturerID *int `json:"-"` VehicleID *int `json:"-"` }
func (AftermarketDevice) GetID ¶
func (this AftermarketDevice) GetID() string
func (AftermarketDevice) IsNode ¶
func (AftermarketDevice) IsNode()
type AftermarketDeviceBy ¶
type AftermarketDeviceConnection ¶
type AftermarketDeviceConnection struct { TotalCount int `json:"totalCount"` Edges []*AftermarketDeviceEdge `json:"edges"` Nodes []*AftermarketDevice `json:"nodes"` PageInfo *PageInfo `json:"pageInfo"` }
type AftermarketDeviceEarnings ¶ added in v0.1.9
type AftermarketDeviceEarnings struct { TotalTokens *big.Int `json:"totalTokens"` History *EarningsConnection `json:"history"` AftermarketDeviceID int `json:"-"` }
type AftermarketDeviceEdge ¶
type AftermarketDeviceEdge struct { Cursor string `json:"cursor"` Node *AftermarketDevice `json:"node"` }
type DCNConnection ¶ added in v0.1.9
type Dcn ¶
type Dcn struct { // The namehash of the domain. Node []byte `json:"node"` // 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. Typically these are human-readable labels for vehicles.
type 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 *big.Int `json:"streakTokens"` // AftermarketDevice connected to vehicle AftermarketDevice *AftermarketDevice `json:"aftermarketDevice,omitempty"` // Tokens earned by aftermarketDevice AftermarketDeviceTokens *big.Int `json:"aftermarketDeviceTokens"` // SyntheticDevice connected to vehicle SyntheticDevice *SyntheticDevice `json:"syntheticDevice,omitempty"` // Tokens earned by SyntheticDevice SyntheticDeviceTokens *big.Int `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 Earnings ¶ added in v0.1.7
type Earnings struct { EarnedTokens *big.Int `json:"earnedTokens"` EarningsTransfers *EarningsConnection `json:"earningsTransfers"` }
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"` // The block timestamp at which this manufacturer was minted. MintedAt time.Time `json:"mintedAt"` }
func (Manufacturer) GetID ¶
func (this Manufacturer) GetID() string
func (Manufacturer) IsNode ¶
func (Manufacturer) IsNode()
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"` }
type SyntheticDevice ¶
type UserRewards ¶ added in v0.1.10
type UserRewards struct { TotalTokens *big.Int `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,omitempty"` // 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"` // 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"` Name string `json:"name"` // The Image Url of he vehicle Image string `json:"image"` Earnings *VehicleEarnings `json:"earnings,omitempty"` ManufacturerID *int `json:"-"` }
type VehicleConnection ¶
type VehicleConnection struct { TotalCount int `json:"totalCount"` Edges []*VehicleEdge `json:"edges"` Nodes []*Vehicle `json:"nodes"` PageInfo *PageInfo `json:"pageInfo"` }
type VehicleEarnings ¶ added in v0.1.7
type VehicleEarnings struct { TotalTokens *big.Int `json:"totalTokens"` History *EarningsConnection `json:"history"` VehicleID int `json:"-"` }
type VehicleEdge ¶
Click to show internal directories.
Click to hide internal directories.