Documentation ¶
Overview ¶
Package proxy implements a REST API for sending commands to Tesla vehicles.
See the Fleet API documentation for available endpoints.
Index ¶
Constants ¶
View Source
const (
DefaultTimeout = 10 * time.Second
)
Variables ¶
View Source
var ( // ErrCommandNotImplemented indicates a command has not be implemented in the SDK ErrCommandNotImplemented = errors.New("command not implemented") // ErrCommandUseRESTAPI indicates vehicle/command is not supported by the protocol ErrCommandUseRESTAPI = errors.New("command requires using the REST API") )
Functions ¶
func ExtractCommandAction ¶ added in v0.0.2
func ExtractCommandAction(ctx context.Context, command string, params RequestParameters) (func(*vehicle.Vehicle) error, error)
ExtractCommandAction use command to define which action should be executed.
Types ¶
type Proxy ¶
Proxy exposes an HTTP API for sending vehicle commands.
type RequestParameters ¶ added in v0.0.2
type RequestParameters map[string]interface{}
RequestParameters allows simple type check
Click to show internal directories.
Click to hide internal directories.