Documentation ¶
Index ¶
- Constants
- func BuildFirmwareEnvelope(ctx context.Context, envelope EnvelopeOptions, device DeviceOptions, ...) (*os.File, error)
- func CheckPort(port string) (string, error)
- func CheckUpToDate(info Info)
- func CompileCmd() *cobra.Command
- func ConfigAnalyticsCmd() *cobra.Command
- func ConfigCmd(info Info) *cobra.Command
- func ConfigUpToDateCmd(info Info) *cobra.Command
- func ConfigWifiCmd() *cobra.Command
- func ConfiguredPort() string
- func ContainerCmd() *cobra.Command
- func ContainerInstallCmd() *cobra.Command
- func ContainerListCmd() *cobra.Command
- func ContainerUninstallCmd() *cobra.Command
- func DecodeCmd() *cobra.Command
- func DownloadEnvelope(ctx context.Context, path string, version string, tmpDir string) (string, error)
- func ExtractFirmware(ctx context.Context, sdk *SDK, envelopePath string, format string) (*os.File, error)
- func ExtractFirmwareBin(ctx context.Context, sdk *SDK, envelopePath string, ...) (*os.File, error)
- func FirmwareCmd() *cobra.Command
- func FirmwareUpdateCmd() *cobra.Command
- func FlashCmd() *cobra.Command
- func GetCachedFirmwareEnvelopePath(ctx context.Context, version string, model string) (string, error)
- func GetFirmwareEnvelopeFileName(model string) string
- func GetPort(cfg *viper.Viper, all bool, reset bool) (string, error)
- func GetProgramAssetsPath(flags *pflag.FlagSet, flagName string) (string, error)
- func GetRandomName(id []byte) string
- func GetUuid(filename string) (uuid.UUID, error)
- func InstallFile(cmd *cobra.Command, device *Device, sdk *SDK, name string, path string, ...) error
- func IsSnapshot(filename string) bool
- func JagCmd(info Info, isReleaseBuild bool) *cobra.Command
- func MonitorCmd() *cobra.Command
- func PingCmd() *cobra.Command
- func PkgCmd(info Info) *cobra.Command
- func PortCmd() *cobra.Command
- func PortExists(port string) (bool, error)
- func PortSetCmd() *cobra.Command
- func ReadLine() (string, error)
- func ReadPassword() ([]byte, error)
- func RunCmd() *cobra.Command
- func RunFile(cmd *cobra.Command, device *Device, sdk *SDK, path string, ...) error
- func ScanCmd() *cobra.Command
- func SetInfo(ctx context.Context, info Info) context.Context
- func SetupCmd(info Info) *cobra.Command
- func SetupSdkCmd(info Info) *cobra.Command
- func SimulateCmd() *cobra.Command
- func ToitCmd() *cobra.Command
- func ToitLspCmd() *cobra.Command
- func VersionCmd(info Info, isReleaseBuild bool) *cobra.Command
- func WatchCmd() *cobra.Command
- type Decoder
- type Device
- func (d Device) ContainerList(ctx context.Context, sdk *SDK) (map[string]string, error)
- func (d Device) ContainerUninstall(ctx context.Context, sdk *SDK, name string) error
- func (d Device) Ping(ctx context.Context, sdk *SDK) bool
- func (d Device) SendCode(ctx context.Context, sdk *SDK, request string, b []byte, ...) error
- func (d Device) Short() string
- func (d Device) String() string
- func (d Device) UpdateFirmware(ctx context.Context, sdk *SDK, b []byte) error
- type DeviceOptions
- type Devices
- type Elements
- type EnvelopeOptions
- type HasDataReader
- type Info
- type Port
- type Ports
- type ProgressReader
- type SDK
- func (s *SDK) AssetsTool(ctx context.Context, args ...string) *exec.Cmd
- func (s *SDK) AssetsToolPath() string
- func (s *SDK) Build(ctx context.Context, device *Device, snapshotPath string, assetsPath string) ([]byte, error)
- func (s *SDK) Compile(ctx context.Context, snapshot string, entrypoint string, optimizationLevel int) error
- func (s *SDK) DownloaderInfoPath() string
- func (s *SDK) FirmwareTool(ctx context.Context, args ...string) *exec.Cmd
- func (s *SDK) FirmwareToolPath() string
- func (s *SDK) SnapshotToImage(ctx context.Context, args ...string) *exec.Cmd
- func (s *SDK) SnapshotToImagePath() string
- func (s *SDK) Stacktrace(ctx context.Context, args ...string) *exec.Cmd
- func (s *SDK) StacktracePath() string
- func (s *SDK) SystemMessage(ctx context.Context, args ...string) *exec.Cmd
- func (s *SDK) SystemMessagePath() string
- func (s *SDK) ToitCompile(ctx context.Context, args ...string) *exec.Cmd
- func (s *SDK) ToitCompilePath() string
- func (s *SDK) ToitLsp(ctx context.Context, args []string) *exec.Cmd
- func (s *SDK) ToitLspPath() string
- func (s *SDK) ToitRun(ctx context.Context, args ...string) *exec.Cmd
- func (s *SDK) ToitRunPath() string
- func (s *SDK) VersionPath() string
- type Short
- type UpdateToDate
Constants ¶
View Source
const ( WifiCfgKey = "wifi" WifiSSIDCfgKey = "ssid" WifiPasswordCfgKey = "password" )
View Source
const ( JaguarDeviceIDHeader = "X-Jaguar-Device-ID" JaguarSDKVersionHeader = "X-Jaguar-SDK-Version" JaguarDisabledHeader = "X-Jaguar-Disabled" JaguarContainerNameHeader = "X-Jaguar-Container-Name" JaguarContainerTimeoutHeader = "X-Jaguar-Container-Timeout" JaguarCRC32Header = "X-Jaguar-CRC32" )
View Source
const (
MagicToken = "Jag15261520"
)
View Source
const UpToDateKey = "up-to-date"
Variables ¶
This section is empty.
Functions ¶
func BuildFirmwareEnvelope ¶ added in v1.6.9
func BuildFirmwareEnvelope(ctx context.Context, envelope EnvelopeOptions, device DeviceOptions, uartEndpointOptions map[string]interface{}) (*os.File, error)
func CheckUpToDate ¶ added in v1.4.4
func CheckUpToDate(info Info)
func CompileCmd ¶ added in v1.2.0
func ConfigAnalyticsCmd ¶ added in v0.3.0
func ConfigUpToDateCmd ¶ added in v1.4.4
func ConfigWifiCmd ¶ added in v1.4.0
func ConfiguredPort ¶ added in v0.1.0
func ConfiguredPort() string
func ContainerCmd ¶ added in v1.5.0
func ContainerInstallCmd ¶ added in v1.5.0
func ContainerListCmd ¶ added in v1.5.0
func ContainerUninstallCmd ¶ added in v1.5.0
func DownloadEnvelope ¶ added in v1.30.0
func ExtractFirmware ¶ added in v1.7.2
func ExtractFirmwareBin ¶ added in v1.7.8
func FirmwareCmd ¶ added in v1.2.0
func FirmwareUpdateCmd ¶ added in v1.2.0
func GetCachedFirmwareEnvelopePath ¶ added in v1.10.4
func GetCachedFirmwareEnvelopePath(ctx context.Context, version string, model string) (string, error)
GetCachedFirmwareEnvelopePath returns the path to the cached firmware envelope. If necessary, downloads the envelope from the server first.
func GetFirmwareEnvelopeFileName ¶ added in v1.10.4
func GetProgramAssetsPath ¶ added in v1.6.9
func GetRandomName ¶ added in v0.0.5
func InstallFile ¶ added in v1.5.2
func IsSnapshot ¶ added in v1.2.0
Checks whether a file is a snapshot file. Starts by checking for an ar file, since snapshot files are ar files.
func MonitorCmd ¶
func PortExists ¶ added in v0.1.0
func PortSetCmd ¶ added in v0.5.0
func ReadPassword ¶ added in v0.1.0
func SetupSdkCmd ¶ added in v1.6.9
func SimulateCmd ¶
func ToitLspCmd ¶ added in v0.3.0
Types ¶
type Device ¶
type Device struct { ID string `mapstructure:"id" yaml:"id" json:"id"` Name string `mapstructure:"name" yaml:"name" json:"name"` Chip string `mapstructure:"chip" yaml:"chip" json:"chip"` Address string `mapstructure:"address" yaml:"address" json:"address"` SDKVersion string `mapstructure:"sdkVersion" yaml:"sdkVersion" json:"sdkVersion"` WordSize int `mapstructure:"wordSize" yaml:"wordSize" json:"wordSize"` Proxied bool `mapstructure:"proxied" yaml:"proxied" json:"proxied"` }
func (Device) ContainerList ¶ added in v1.5.0
func (Device) ContainerUninstall ¶ added in v1.5.0
type DeviceOptions ¶ added in v1.7.0
func (DeviceOptions) GetConfig ¶ added in v1.7.2
func (d DeviceOptions) GetConfig() map[string]interface{}
type Devices ¶ added in v0.5.0
type Devices struct {
Devices []Device `mapstructure:"devices" yaml:"devices" json:"devices"`
}
type EnvelopeOptions ¶ added in v1.7.0
type HasDataReader ¶ added in v1.25.0
type Info ¶ added in v0.1.0
type Ports ¶ added in v0.5.0
type Ports struct {
Ports []Port `mapstructure:"ports" yaml:"ports" json:"ports"`
}
type ProgressReader ¶ added in v1.2.3
type ProgressReader struct {
// contains filtered or unexported fields
}
A Reader based on a byte array that prints a progress bar.
func NewProgressReader ¶ added in v1.2.3
func NewProgressReader(b []byte) *ProgressReader
type SDK ¶
func (*SDK) AssetsTool ¶ added in v1.6.9
func (*SDK) AssetsToolPath ¶ added in v1.6.9
func (*SDK) DownloaderInfoPath ¶ added in v1.0.0
func (*SDK) FirmwareTool ¶ added in v1.6.9
func (*SDK) FirmwareToolPath ¶ added in v1.6.9
func (*SDK) SnapshotToImage ¶ added in v1.4.2
func (*SDK) SnapshotToImagePath ¶
func (*SDK) Stacktrace ¶ added in v1.4.2
func (*SDK) StacktracePath ¶ added in v1.2.5
func (*SDK) SystemMessage ¶ added in v1.4.2
func (*SDK) SystemMessagePath ¶ added in v1.4.2
func (*SDK) ToitCompile ¶ added in v0.5.1
func (*SDK) ToitCompilePath ¶ added in v0.5.1
func (*SDK) ToitLspPath ¶ added in v0.3.0
func (*SDK) ToitRunPath ¶ added in v0.5.1
func (*SDK) VersionPath ¶ added in v0.4.0
type UpdateToDate ¶ added in v1.4.4
Source Files ¶
Click to show internal directories.
Click to hide internal directories.