bgpwtf/cccampix: add IRR daemon
We add a small IRR service for getting a parsed RPSL from IRRs. For now,
we only support RIPE and ARIN, and only the following attributes:
- remarks
- import
- export
Since RPSL/RFC2622 is fucking insane, there is no guarantee that the
parser, especially the import/export parser, is correct. But it should
be good enough for our use. We even throw in some tests for good
measure.
$ grpcurl -format text -plaintext -d 'as: "26625"' 127.0.0.1:4200 ix.IRR.Query
source: SOURCE_ARIN
attributes: <
import: <
expressions: <
peering: "AS6083"
actions: "pref=10"
>
filter: "ANY"
>
>
attributes: <
import: <
expressions: <
peering: "AS12491"
actions: "pref=10"
>
filter: "ANY"
>
>
Change-Id: I8b240ffe2cd3553a25ce33dbd3917c0aef64e804
diff --git a/WORKSPACE b/WORKSPACE
index 5d0d981..5011b83 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -599,3 +599,15 @@
commit = "c182affec369e30f25d3eb8cd8a478dee585ae7d",
importpath = "github.com/matttproud/golang_protobuf_extensions",
)
+
+go_repository(
+ name = "com_github_golang_collections_go_datastructures",
+ commit = "59788d5eb2591d3497ffb8fafed2f16fe00e7775",
+ importpath = "github.com/golang-collections/go-datastructures",
+)
+
+go_repository(
+ name = "com_github_go_test_deep",
+ commit = "cf67d735e69b4a4d50cdf571a92b0144786080f7",
+ importpath = "github.com/go-test/deep",
+)