diff --git a/data.capnp b/data.capnp index a0a1974..12ee199 100644 --- a/data.capnp +++ b/data.capnp @@ -11,58 +11,48 @@ enum Protocol { enum StatusCode { success @0; - failure @1; + failure @1; } struct Start { - id @0 :UInt8 = 0; - arguments @1 :Data; + arguments @0 :Data; } -struct Stop { - id @0 :UInt8 = 1; -} +struct Stop {} struct AddProxy { - id @0 :UInt8 = 2; - sourceIP @1 :Data; - sourcePort @2 :UInt16; - destPort @3 :UInt16; - protocol @4 :Protocol; + sourceIP @0 :Data; + sourcePort @1 :UInt16; + destPort @2 :UInt16; + protocol @3 :Protocol; } struct RemoveProxy { - id @0 :UInt8 = 3; - sourceIP @1 :Data; - sourcePort @2 :UInt16; - destPort @3 :UInt16; - protocol @4 :Protocol; + sourceIP @0 :Data; + sourcePort @1 :UInt16; + destPort @2 :UInt16; + protocol @3 :Protocol; } struct ProxyStatusRequest { - id @0 :UInt8 = 4; - sourceIP @1 :Data; - sourcePort @2 :UInt16; - destPort @3 :UInt16; - protocol @4 :Protocol; + sourceIP @0 :Data; + sourcePort @1 :UInt16; + destPort @2 :UInt16; + protocol @3 :Protocol; } struct ProxyStatusResponse { - id @0 :UInt8 = 5; - sourceIP @1 :Data; - sourcePort @2 :UInt16; - destPort @3 :UInt16; - protocol @4 :Protocol; - isActive @5 :Bool; + sourceIP @0 :Data; + sourcePort @1 :UInt16; + destPort @2 :UInt16; + protocol @3 :Protocol; + isActive @4 :Bool; } -struct ProxyInstanceRequest { - id @0 :UInt8 = 6; -} +struct ProxyInstanceRequest {} struct ProxyInstanceResponse { - id @0 :UInt8 = 7; - proxies @1 :List(ProxyInstance); + proxies @0 :List(ProxyInstance); struct ProxyInstance { sourceIP @0 :Text; @@ -72,24 +62,18 @@ struct ProxyInstanceResponse { } } -struct BackendStatusRequest { - id @0 :UInt8 = 8; -} +struct BackendStatusRequest {} struct BackendStatusResponse { - id @0 :UInt8 = 9; - isRunning @1 :Bool; - statusCode @2 :StatusCode; - message @3 :Text; + isRunning @0 :Bool; + statusCode @1 :StatusCode; + message @2 :Text; } -struct ProxyConnectionsRequest { - id @0 :UInt8 = 10; -} +struct ProxyConnectionsRequest {} struct ProxyConnectionsResponse { - id @0 :UInt8 = 11; - connections @1 :List(Connection); + connections @0 :List(Connection); struct Connection { sourceIP @0 :Data; @@ -101,26 +85,23 @@ struct ProxyConnectionsResponse { } struct CheckClientParameters { - id @0 :UInt8 = 12; - sourceIP @1 :Data; - sourcePort @2 :UInt16; - destPort @3 :UInt16; - protocol @4 :Protocol; + sourceIP @0 :Data; + sourcePort @1 :UInt16; + destPort @2 :UInt16; + protocol @3 :Protocol; } struct CheckServerParameters { - id @0 :UInt8 = 13; - arguments @1 :Data; + arguments @0 :Data; } struct CheckParametersResponse { - id @0 :UInt8 = 14; - inResponseTo @1 :InResponseTo; - isValid @2 :Bool; - message @3 :Text; + inResponseTo @0 :InResponseTo; + isValid @1 :Bool; + message @2 :Text; enum InResponseTo { checkClientParameters @0; checkServerParameters @1; } -} \ No newline at end of file +} diff --git a/scripts/go-build.sh b/scripts/go-build.sh index 3c937e0..25b6f0c 100755 --- a/scripts/go-build.sh +++ b/scripts/go-build.sh @@ -1,3 +1,2 @@ #!/usr/bin/env bash -echo $PATH -capnp compile -I ./go-capnp/std -ogo ./*.capnp \ No newline at end of file +capnp compile -I ./go-capnp/std -ogo ./*.capnp