X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=lib%2Fxaapiv1%2Fsdks.go;h=2d5ce960865734a869354c7857fa6d36735a4a48;hb=e9c65d5fcf8d2ec3772ceced4fe1379392b15a4f;hp=589f748c3aff2a35524c8ba9dbc8ee4d742b440c;hpb=45f6472d1e8ecad428da314a6d762143f033865d;p=src%2Fxds%2Fxds-agent.git diff --git a/lib/xaapiv1/sdks.go b/lib/xaapiv1/sdks.go index 589f748..2d5ce96 100644 --- a/lib/xaapiv1/sdks.go +++ b/lib/xaapiv1/sdks.go @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 "IoT.bzh" + * Copyright (C) 2017-2018 "IoT.bzh" * Author Sebastien Douheret * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -36,6 +36,7 @@ type SDK struct { Arch string `json:"arch"` Path string `json:"path"` URL string `json:"url"` + ImageURL string `json:"image_url"` Status string `json:"status"` Date string `json:"date"` Size string `json:"size"` @@ -46,16 +47,24 @@ type SDK struct { // SDKInstallArgs JSON parameters of POST /sdks or /sdks/abortinstall commands type SDKInstallArgs struct { - ID string `json:"id" binding:"required"` // install by ID (must be part of GET /sdks result) - Filename string `json:"filename"` // install by using a file - Force bool `json:"force"` // force SDK install when already existing - Timeout int `json:"timeout"` // 1800 == default 30 minutes + ID string `json:"id"` // install by ID (must be part of GET /sdks result) + Filename string `json:"filename"` // install by using a file + Force bool `json:"force"` // force SDK install when already existing + Timeout int `json:"timeout"` // 1800 == default 30 minutes + InstallArgs []string `json:"installArgs"` // args directly passed to add/install script } +// SDK SDKManagementMsg Actions +const ( + SdkMgtActionInstall = "installing" + SdkMgtActionRemove = "removing" +) + // SDKManagementMsg Message send during SDK installation or when installation is complete type SDKManagementMsg struct { CmdID string `json:"cmdID"` Timestamp string `json:"timestamp"` + Action string `json:"action"` Sdk SDK `json:"sdk"` Stdout string `json:"stdout"` Stderr string `json:"stderr"`