X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=lib%2Fxsapiv1%2Fsdks.go;h=54b941bf5e9e78f3ba493c79f802c23852437e82;hb=a93832c2e3058c55e183c487dde595bd42238bb0;hp=3a79c99f88bb3f3df7e0f77c57e25c97ddcc12d5;hpb=f1c182ede3c4aed0d6196d05b0a64ff93372e755;p=src%2Fxds%2Fxds-server.git diff --git a/lib/xsapiv1/sdks.go b/lib/xsapiv1/sdks.go index 3a79c99..54b941b 100644 --- a/lib/xsapiv1/sdks.go +++ b/lib/xsapiv1/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"); @@ -30,6 +30,7 @@ const ( type SDK struct { ID string `json:"id" binding:"required"` Name string `json:"name"` + UUID string `json:"uuid"` Description string `json:"description"` Profile string `json:"profile"` Version string `json:"version"` @@ -58,16 +59,24 @@ type SDKFamilyConfig 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"`