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 ¶
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.
Click to show internal directories.
Click to hide internal directories.