ota

package
v0.0.0-...-246bbf3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CampaignManagerHttpEndpoint = "CAMPAIGN_MANAGER_HTTP_ENDPOINT"

	CampaignManagerClientID     = "CAMPAIGN_MANAGER_CLIENT_ID"
	CampaignManagerClientSecret = "CAMPAIGN_MANAGER_CLIENT_SECRET"
	CampaignManagerAccessToken  = "CAMPAIGN_MANAGER_ACCESS_TOKEN"

	CampaignManagerApiAgent = "shadowcar/campaignmanager"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Campaign

type Campaign struct {
	CampaignID      string         `json:"id,omitempty"`
	Name            string         `json:"name,omitempty"`
	Description     string         `json:"description,omitempty"`
	Priority        string         `json:"priority,omitempty"`
	Status          CampaignStatus `json:"status,omitempty"`
	LastModified    string         `json:"lastModified,omitempty"`
	VehicleGroupID  string         `json:"vehicle_group_id,omitempty"`
	UpdatePackeURI  string         `json:"update_package_uri,omitempty"`
	ReleaseNotesURI string         `json:"release_notes_uri,omitempty"`
}

type CampaignExecution

type CampaignExecution struct {
	CampaignExecutionID string `json:"id,omitempty"`
	VIN                 string `json:"vin,omitempty"`
	Status              string `json:"status,omitempty"`
	Report              string `json:"report,omitempty"`
	CampaignID          string `json:"campaign_id,omitempty"`
	StartedAt           string `json:"started_at,omitempty"`
	FinishedAt          string `json:"finished_at,omitempty"`
}

type CampaignExecutions

type CampaignExecutions []CampaignExecution

type CampaignManagerClient

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

func NewCampaignManagerClient

func NewCampaignManagerClient(ctx context.Context, opts ...internal.ClientOption) (*CampaignManagerClient, error)

func (*CampaignManagerClient) ExecuteCampaign

func (c *CampaignManagerClient) ExecuteCampaign(campaignId string) error

func (*CampaignManagerClient) GetAllCampaigns

func (c *CampaignManagerClient) GetAllCampaigns() (int, Campaigns)

func (*CampaignManagerClient) GetCampaign

func (c *CampaignManagerClient) GetCampaign(campaignId string) (int, Campaign)

func (*CampaignManagerClient) GetCampaignExecution

func (c *CampaignManagerClient) GetCampaignExecution(campaignId string) (int, CampaignExecutions)

func (*CampaignManagerClient) GetVehicleGroup

func (c *CampaignManagerClient) GetVehicleGroup(vehicleGroupId string) (int, VehicleGroup)

func (*CampaignManagerClient) GetVehicleGroups

func (c *CampaignManagerClient) GetVehicleGroups() (int, VehicleGroups)

type CampaignStatus

type CampaignStatus struct {
	Success       int `json:"success,omitempty"`
	Failure       int `json:"failure,omitempty"`
	TotalVehicles int `json:"total_vehicles,omitempty"`
	InProgress    int `json:"in_progress,omitempty"`
}

type Campaigns

type Campaigns []Campaign

type VehicleGroup

type VehicleGroup struct {
	VehicleGroupID string   `json:"id,omitempty"`
	Name           string   `json:"name,omitempty"`
	VINS           []string `json:"vins,omitempty"`
}

type VehicleGroups

type VehicleGroups []VehicleGroup

Jump to

Keyboard shortcuts

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