Simplify but Complete Catalog

This commit is contained in:
mr
2026-04-01 15:56:05 +02:00
parent eeb11a7b8b
commit 163a4165b8
18 changed files with 1252 additions and 2446 deletions

9
ws.go
View File

@@ -26,7 +26,7 @@ func main() {
// ws://localhost:8087/oc/processing/decentralized/all/search/<term>
// ws://localhost:8087/oc/storage/decentralized/all/search/<term>
// ws://localhost:8087/oc/workflow/decentralized/all/search/<term>
url := "ws://localhost:8087/oc/resource/decentralized/all/search/builder"
url := "ws://localhost:8087/oc/decentralized/all/resource/search/sar"
token := ""
if len(args) >= 1 {
@@ -43,7 +43,6 @@ func main() {
}
if token != "" {
config.Header.Set("Authorization", "Bearer "+token)
fmt.Printf("Token : %s...\n", token[:min(20, len(token))])
}
fmt.Printf("Connexion à : %s\n", url)
@@ -89,10 +88,10 @@ func main() {
idleTimer.Reset(time.Duration(*timeout) * time.Second)
var data any
if err := json.Unmarshal([]byte(raw), &data); err == nil {
b, _ := json.MarshalIndent(data, "", " ")
fmt.Println(string(b))
///b, _ := json.MarshalIndent(data, "", " ")
fmt.Println(data)
} else {
fmt.Printf("Message brut : %s\n", raw)
fmt.Printf("Message brut : %s\n", raw, err)
}
}
}