7 "github.com/gin-gonic/gin"
8 "github.com/iotbzh/xds-server/lib/common"
11 // getSdks returns all SDKs configuration
12 func (s *APIService) getSdks(c *gin.Context) {
13 c.JSON(http.StatusOK, s.sdks.GetAll())
16 // getSdk returns a specific Sdk configuration
17 func (s *APIService) getSdk(c *gin.Context) {
18 id, err := strconv.Atoi(c.Param("id"))
20 common.APIError(c, "Invalid id")
25 if sdk.Profile == "" {
26 common.APIError(c, "Invalid id")
30 c.JSON(http.StatusOK, sdk)