Versions in this module Expand all Collapse all v0 v0.1.2 Jun 20, 2024 Changes in this version + const EnvTeslaCacheFile + const EnvTeslaKeyFile + const EnvTeslaKeyName + const EnvTeslaKeyringDebug + const EnvTeslaKeyringPass + const EnvTeslaKeyringPath + const EnvTeslaKeyringType + const EnvTeslaTokenFile + const EnvTeslaTokenName + const EnvTeslaVIN + var ErrKeyNotFound = keyring.ErrKeyNotFound + var ErrNoAvailableTransports = errors.New("no available transports (configuration must permit BLE and/or OAuth)") + var ErrNoKeySpecified = errors.New("private key location not provided") + type Config struct + Backend keyring.Config + BackendType backendType + CacheFilename string + Debug bool + DomainNames domainNames + Flags Flag + KeyFilename string + KeyringKeyName string + KeyringTokenName string + TokenFilename string + VIN string + func NewConfig(flags Flag) (*Config, error) + func (c *Config) Account() (*account.Account, error) + func (c *Config) Connect(ctx context.Context) (acct *account.Account, car *vehicle.Vehicle, err error) + func (c *Config) ConnectLocal(ctx context.Context, skey protocol.ECDHPrivateKey) (car *vehicle.Vehicle, err error) + func (c *Config) ConnectRemote(ctx context.Context, skey protocol.ECDHPrivateKey) (acct *account.Account, car *vehicle.Vehicle, err error) + func (c *Config) DeletePrivateKey() error + func (c *Config) LoadCredentials() error + func (c *Config) LoadKeyFromKeyring() (protocol.ECDHPrivateKey, error) + func (c *Config) LoadTokenFromKeyring() (string, error) + func (c *Config) PrivateKey() (skey protocol.ECDHPrivateKey, err error) + func (c *Config) ReadFromEnvironment() + func (c *Config) RegisterCommandLineFlags() + func (c *Config) SavePrivateKey(skey protocol.ECDHPrivateKey) error + func (c *Config) SaveTokenToKeyring(token string) error + func (c *Config) UpdateCachedSessions(v *vehicle.Vehicle) + type Flag int + const FlagAll + const FlagBLE + const FlagOAuth + const FlagPrivateKey + const FlagVIN