identity

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package identity provides a client for the DIMO identity-api GraphQL service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// GetVehicleDIDForDevice looks up the vehicle DID that the given device DID is
	// connected to. Returns an error if the device has no paired vehicle or is unknown.
	GetVehicleDIDForDevice(ctx context.Context, deviceDID string) (string, error)
}

Client can resolve a device DID to the vehicle DID it is paired with.

type HTTPClient

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

HTTPClient queries the identity-api GraphQL endpoint over HTTP.

func New

func New(url string) *HTTPClient

New creates a new HTTPClient for the given identity-api GraphQL URL.

func (*HTTPClient) GetVehicleDIDForDevice

func (c *HTTPClient) GetVehicleDIDForDevice(ctx context.Context, deviceDID string) (string, error)

GetVehicleDIDForDevice looks up the device as both aftermarket and synthetic in a single GraphQL request. One will typically return data and the other NOT_FOUND; the first with a valid vehicle DID is returned. If both fail, an error is returned.

Jump to

Keyboard shortcuts

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