6 "github.com/gin-gonic/gin"
7 common "github.com/iotbzh/xds-common/golib"
10 // getSdks returns all SDKs configuration
11 func (s *APIService) getSdks(c *gin.Context) {
12 c.JSON(http.StatusOK, s.sdks.GetAll())
15 // getSdk returns a specific Sdk configuration
16 func (s *APIService) getSdk(c *gin.Context) {
17 id, err := s.sdks.ResolveID(c.Param("id"))
19 common.APIError(c, err.Error())
23 if sdk.Profile == "" {
24 common.APIError(c, "Invalid id")
28 c.JSON(http.StatusOK, sdk)