services

package
v0.2.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AftermarketDeviceAddressResetData added in v0.1.11

type AftermarketDeviceAddressResetData struct {
	ManufacturerId           *big.Int
	TokenId                  *big.Int
	AftermarketDeviceAddress common.Address
}

type AftermarketDeviceAttributeSetData

type AftermarketDeviceAttributeSetData struct {
	TokenID   *big.Int
	Attribute string
	Info      string
}

type AftermarketDeviceClaimedData

type AftermarketDeviceClaimedData struct {
	AftermarketDeviceNode *big.Int
	Owner                 common.Address
}

type AftermarketDeviceNodeMintedData

type AftermarketDeviceNodeMintedData struct {
	ManufacturerID           *big.Int
	TokenID                  *big.Int
	AftermarketDeviceAddress common.Address
	Owner                    common.Address
}

type AftermarketDevicePairData

type AftermarketDevicePairData struct {
	AftermarketDeviceNode *big.Int
	VehicleNode           *big.Int
	Owner                 common.Address
}

type BeneficiarySetData

type BeneficiarySetData struct {
	IdProxyAddress common.Address
	NodeId         *big.Int
	Beneficiary    common.Address
}

type Block

type Block struct {
	Number *big.Int    `json:"number,omitempty"`
	Hash   common.Hash `json:"hash,omitempty"`
	Time   time.Time   `json:"time,omitempty"`
}

type ContractEventData

type ContractEventData struct {
	ChainID         int64           `json:"chainId"`
	EventName       string          `json:"eventName"`
	Block           Block           `json:"block,omitempty"`
	Contract        common.Address  `json:"contract"`
	TransactionHash common.Hash     `json:"transactionHash"`
	EventSignature  common.Hash     `json:"eventSignature"`
	Arguments       json.RawMessage `json:"arguments"`
}

type ContractsEventsConsumer

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

func NewContractsEventsConsumer

func NewContractsEventsConsumer(dbs db.Store, log *zerolog.Logger, settings *config.Settings) *ContractsEventsConsumer

func (*ContractsEventsConsumer) Process

func (c *ContractsEventsConsumer) Process(ctx context.Context, event *shared.CloudEvent[json.RawMessage]) error

type DCNNameChangedData

type DCNNameChangedData struct {
	Node []byte
	Name string `json:"name_"`
}

type DCNVehicleIdChangedData

type DCNVehicleIdChangedData struct {
	Node      []byte
	VehicleID *big.Int `json:"vehicleId_"`
}

type DeviceDefinition

type DeviceDefinition struct {
	Type struct {
		Make  string
		Model string
		Year  int
	}
}

type DeviceDefinitionTableCreatedData added in v0.1.24

type DeviceDefinitionTableCreatedData struct {
	TableOwner     common.Address
	ManufacturerId *big.Int
	TableId        *big.Int
}

type EventName

type EventName string
const (
	// All NFTs.
	Transfer            EventName = "Transfer"
	PrivilegeSet        EventName = "PrivilegeSet"
	BeneficiarySetEvent EventName = "BeneficiarySet"

	// SACD.
	PermissionsSetEvent EventName = "PermissionsSet"

	// Manufacturers.
	ManufacturerNodeMinted       EventName = "ManufacturerNodeMinted"
	DeviceDefinitionTableCreated EventName = "DeviceDefinitionTableCreated"
	ManufacturerTableSet         EventName = "ManufacturerTableSet"

	// Aftermarket devices.
	AftermarketDeviceNodeMinted   EventName = "AftermarketDeviceNodeMinted"
	AftermarketDeviceAttributeSet EventName = "AftermarketDeviceAttributeSet"
	AftermarketDeviceClaimed      EventName = "AftermarketDeviceClaimed"
	AftermarketDevicePaired       EventName = "AftermarketDevicePaired"
	AftermarketDeviceUnpaired     EventName = "AftermarketDeviceUnpaired"
	AftermarketDeviceAddressReset EventName = "AftermarketDeviceAddressReset"

	// Vehicles.
	VehicleNodeMinted                     EventName = "VehicleNodeMinted"
	VehicleAttributeSet                   EventName = "VehicleAttributeSet"
	VehicleNodeMintedWithDeviceDefinition EventName = "VehicleNodeMintedWithDeviceDefinition"

	// Synthetic devices.
	SyntheticDeviceNodeMinted EventName = "SyntheticDeviceNodeMinted"
	SyntheticDeviceNodeBurned EventName = "SyntheticDeviceNodeBurned"

	// DCNs.
	NewNode          EventName = "NewNode"
	NewExpiration    EventName = "NewExpiration"
	NameChanged      EventName = "NameChanged"
	VehicleIdChanged EventName = "VehicleIdChanged"

	// Rewards.
	TokensTransferredForDevice           EventName = "TokensTransferredForDevice"
	TokensTransferredForConnectionStreak EventName = "TokensTransferredForConnectionStreak"
)

func (EventName) String

func (r EventName) String() string

type ManufacturerContractService added in v0.1.26

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

func NewManufacturerContractService added in v0.1.26

func NewManufacturerContractService(log *zerolog.Logger,
	settings *config.Settings,
	client *ethclient.Client) (*ManufacturerContractService, error)

func (*ManufacturerContractService) GetTableName added in v0.1.26

func (m *ManufacturerContractService) GetTableName(ctx context.Context, manufacturerID int) (*string, error)

type ManufacturerNodeMintedData

type ManufacturerNodeMintedData struct {
	Name    string
	TokenID *big.Int
	Owner   common.Address
}

type ManufacturerTableSetData added in v0.1.24

type ManufacturerTableSetData struct {
	ManufacturerId *big.Int
	TableId        *big.Int
}

type NewDCNExpirationData

type NewDCNExpirationData struct {
	Node       []byte
	Expiration int
}

type NewDCNNodeData

type NewDCNNodeData struct {
	Node  []byte
	Owner common.Address
}

type PermissionsSetData added in v0.2.0

type PermissionsSetData struct {
	Asset       common.Address
	TokenId     *big.Int
	Permissions *big.Int
	Grantee     common.Address
	Expiration  *big.Int
	Source      string
}

type PrivilegeSetData

type PrivilegeSetData struct {
	TokenId *big.Int
	PrivId  *big.Int
	User    common.Address
	Expires *big.Int
}

type SyntheticDeviceNodeBurnedData

type SyntheticDeviceNodeBurnedData struct {
	SyntheticDeviceNode *big.Int
	VehicleNode         *big.Int
	Owner               common.Address
}

type SyntheticDeviceNodeMintedData

type SyntheticDeviceNodeMintedData struct {
	IntegrationNode        *big.Int
	SyntheticDeviceNode    *big.Int
	VehicleNode            *big.Int
	SyntheticDeviceAddress common.Address
	Owner                  common.Address
}

type TablelandApiService added in v0.1.26

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

func NewTablelandApiService added in v0.1.26

func NewTablelandApiService(log *zerolog.Logger, settings *config.Settings) *TablelandApiService

func (*TablelandApiService) Query added in v0.1.26

func (r *TablelandApiService) Query(_ context.Context, statement string, result any) error

type TokensTransferredForConnectionStreakData added in v0.1.5

type TokensTransferredForConnectionStreakData struct {
	User             common.Address
	Amount           *big.Int `json:"_amount"`
	VehicleNodeID    *big.Int
	ConnectionStreak *big.Int
	Week             *big.Int
}

type TokensTransferredForDeviceData added in v0.1.5

type TokensTransferredForDeviceData struct {
	User           common.Address
	Amount         *big.Int `json:"_amount"`
	VehicleNodeID  *big.Int
	DeviceNftProxy common.Address
	DeviceNode     *big.Int
	Week           *big.Int
}

type TransferData

type TransferData struct {
	From    common.Address
	To      common.Address
	TokenID *big.Int
}

type VehicleAttributeSetData

type VehicleAttributeSetData struct {
	TokenID   *big.Int
	Attribute string
	Info      string
}

type VehicleNodeMintedData

type VehicleNodeMintedData struct {
	ManufacturerNode *big.Int
	TokenID          *big.Int
	Owner            common.Address
}

type VehicleNodeMintedWithDeviceDefinitionData added in v0.1.26

type VehicleNodeMintedWithDeviceDefinitionData struct {
	ManufacturerId     *big.Int
	VehicleId          *big.Int
	Owner              common.Address
	DeviceDefinitionID string
}

Jump to

Keyboard shortcuts

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