yjp 1 rok pred
rodič
commit
9f113361da
2 zmenil súbory, kde vykonal 3 pridanie a 3 odobranie
  1. 1 1
      options.go
  2. 2 2
      sdk.go

+ 1 - 1
options.go

@@ -5,7 +5,7 @@ import "time"
 type DataSource struct {
 	Name string
 	Type string
-	Spec string
+	Spec map[string]any
 }
 
 type Options struct {

+ 2 - 2
sdk.go

@@ -40,7 +40,7 @@ func New(token string, baseUrl string, namespace string, opts ...Option) (*SDK,
 
 	c := client.New(options.timeout)
 
-	namespaceInfos, err := c.GetNamespaces(token, baseUrl, namespace)
+	namespaceInfos, err := c.GetNamespaces(token, baseUrl, namespace, 1, 1)
 	if err != nil {
 		return nil, err
 	}
@@ -54,7 +54,7 @@ func New(token string, baseUrl string, namespace string, opts ...Option) (*SDK,
 
 	for _, dataSourceOption := range options.dataSourceMap {
 		dataSourceInfos, err := c.GetDataSources(token, baseUrl, namespace,
-			dataSourceOption.Name, dataSourceOption.Type)
+			dataSourceOption.Name, dataSourceOption.Type, 1, 1)
 		if err != nil {
 			return nil, err
 		}