func DoesDestinationExist(port string) (bool, error) { items, err := db.GetByIndex( destTable, destPortIndex, port, ) if err != nil { return false, err } if len(items) > 0 { return true, nil } return false, nil }
func DoesNodeExist(name string) (bool, error) { items, err := db.GetByIndex( nodeTable, nodeNameIndex, name, ) if err != nil { return false, err } if len(items) > 0 { return true, nil } return false, nil }