func FindDatastreams(c gossamer.Client) { ol, e := c.FindDatastreams() if e != nil { log.Fatal(e) } for _, v := range ol { o, err := c.GetDatastream(v.GetId()) if err != nil { log.Fatal(err) } else { log.Println("Got Datastream Entity ", o.GetId()) } } }
func DeleteDatastreams(c gossamer.Client) { ol, e := c.FindDatastreams() if e != nil { log.Fatal(e) } for _, v := range ol { o, err := c.GetDatastream(v.GetId()) if err != nil { log.Fatal(err) } else { // Delete Observation e := c.DeleteDatastream(o.GetId()) if e != nil { log.Fatal(err) } else { log.Println("Deleted Datastream ", o.GetId()) } } } }