Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCommand ¶
NewCommand builds the full CLI command tree for the Mercedes-Benz SDK.
Types ¶
type FleetCredentialStore ¶
type FleetCredentialStore interface {
Load() (*FleetCredentials, error)
Save(*FleetCredentials) error
Clear() error
}
FleetCredentialStore reads and writes fleet credentials.
func NewFleetCredentialFileStore ¶
func NewFleetCredentialFileStore(path string) FleetCredentialStore
NewFleetCredentialFileStore creates a file-backed store for fleet credentials.
type FleetCredentials ¶
type FleetCredentials struct {
ClientID string `json:"clientId"`
ClientSecret string `json:"clientSecret"`
Region string `json:"region"`
KafkaConsumerGroup string `json:"kafkaConsumerGroup"`
KafkaInputTopic string `json:"kafkaInputTopic"`
}
FleetCredentials holds Mercedes-Benz Fleet API credentials (OAuth2 + Kafka).
type Option ¶
type Option func(*config)
Option configures the CLI command tree.
func WithFleetCredentialStore ¶
func WithFleetCredentialStore(s FleetCredentialStore) Option
WithFleetCredentialStore sets the credential store for Mercedes-Benz Fleet API (OAuth2 + Kafka).
func WithHTTPClient ¶
WithHTTPClient sets a custom http.Client for the SDK client.
func WithVehicleSpecCredentialStore ¶
func WithVehicleSpecCredentialStore(s VehicleSpecCredentialStore) Option
WithVehicleSpecCredentialStore sets the credential store for Mercedes-Benz Vehicle Specification API.
type TokenStore ¶
TokenStore reads and writes OAuth2 tokens.
func NewTokenFileStore ¶
func NewTokenFileStore(path string) TokenStore
NewTokenFileStore creates a file-backed token store.
type VehicleSpecCredentialStore ¶
type VehicleSpecCredentialStore interface {
Load() (*VehicleSpecCredentials, error)
Save(*VehicleSpecCredentials) error
Clear() error
}
VehicleSpecCredentialStore reads and writes vehicle specification credentials.
func NewVehicleSpecCredentialFileStore ¶
func NewVehicleSpecCredentialFileStore(path string) VehicleSpecCredentialStore
NewVehicleSpecCredentialFileStore creates a file-backed store for vehicle spec credentials.
type VehicleSpecCredentials ¶
type VehicleSpecCredentials struct {
APIKey string `json:"apiKey"`
}
VehicleSpecCredentials holds Mercedes-Benz Vehicle Specification API credentials.