diff --git a/go/go.mod b/go/go.mod new file mode 100644 index 0000000000000000000000000000000000000000..dfc07fce39347d8eb9229a2772ab4b6193bd1ad1 --- /dev/null +++ b/go/go.mod @@ -0,0 +1,8 @@ +module code.fbi.h-da.de/cocsn/api/go + +go 1.16 + +require ( + github.com/openconfig/gnmi v0.0.0-20210430192044-ab96b57c5113 + google.golang.org/protobuf v1.26.0 +) diff --git a/go/go.sum b/go/go.sum new file mode 100644 index 0000000000000000000000000000000000000000..dab4f91e0fb8b9acb203d11c4b8904974c4efbc6 --- /dev/null +++ b/go/go.sum @@ -0,0 +1,110 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/cenkalti/backoff/v4 v4.0.0/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/protobuf v3.14.0+incompatible/go.mod h1:lUQ9D1ePzbH2PrIS7ob/bjm9HXyH5WHB0Akwh7URreM= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/openconfig/gnmi v0.0.0-20210430192044-ab96b57c5113 h1:gHZS9U5wmDYeS8vPu4eEXbWHAVwayPwJ/Ze5RGYGXLw= +github.com/openconfig/gnmi v0.0.0-20210430192044-ab96b57c5113/go.mod h1:H/20NXlnWbCPFC593nxpiKJ+OU//7mW7s7Qk7uVdg3Q= +github.com/openconfig/goyang v0.0.0-20200115183954-d0a48929f0ea/go.mod h1:dhXaV0JgHJzdrHi2l+w0fZrwArtXL7jEFoiqLEdmkvU= +github.com/openconfig/ygot v0.6.0/go.mod h1:o30svNf7O0xK+R35tlx95odkDmZWS9JyWWQSmIhqwAs= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11 h1:lwlPPsmjDKK0J6eG6xDWd5XPehI0R024zxjDnw3esPA= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e h1:AyodaIpKjppX+cBfTASF2E1US3H2JFBj920Ot3rtDjs= +golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d h1:HV9Z9qMhQEsdlvxNFELgQ11RkMzO3CMkjEySjCtuLes= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.34.0 h1:raiipEjMOIC/TO2AvyTxP25XFdLxNIBwzDh3FM3XztI= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.1/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/go/gosdn/core/core.pb.go b/go/gosdn/core/core.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..9b30267d9885304ab4ee41129977b078a4b22373 --- /dev/null +++ b/go/gosdn/core/core.pb.go @@ -0,0 +1,534 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.17.2 +// source: gosdn/core/core.proto + +package core + +import ( + pnd "code.fbi.h-da.de/cocsn/api/go/gosdn/pnd" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SetResponseStatus int32 + +const ( + SetResponse_OK SetResponseStatus = 0 + SetResponse_ERROR SetResponseStatus = 1 +) + +// Enum value maps for SetResponseStatus. +var ( + SetResponseStatus_name = map[int32]string{ + 0: "OK", + 1: "ERROR", + } + SetResponseStatus_value = map[string]int32{ + "OK": 0, + "ERROR": 1, + } +) + +func (x SetResponseStatus) Enum() *SetResponseStatus { + p := new(SetResponseStatus) + *p = x + return p +} + +func (x SetResponseStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SetResponseStatus) Descriptor() protoreflect.EnumDescriptor { + return file_gosdn_core_core_proto_enumTypes[0].Descriptor() +} + +func (SetResponseStatus) Type() protoreflect.EnumType { + return &file_gosdn_core_core_proto_enumTypes[0] +} + +func (x SetResponseStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SetResponseStatus.Descriptor instead. +func (SetResponseStatus) EnumDescriptor() ([]byte, []int) { + return file_gosdn_core_core_proto_rawDescGZIP(), []int{4, 0} +} + +type GetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + All bool `protobuf:"varint,2,opt,name=all,proto3" json:"all,omitempty"` + Pid []string `protobuf:"bytes,3,rep,name=pid,proto3" json:"pid,omitempty"` +} + +func (x *GetRequest) Reset() { + *x = GetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_core_core_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRequest) ProtoMessage() {} + +func (x *GetRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_core_core_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead. +func (*GetRequest) Descriptor() ([]byte, []int) { + return file_gosdn_core_core_proto_rawDescGZIP(), []int{0} +} + +func (x *GetRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *GetRequest) GetAll() bool { + if x != nil { + return x.All + } + return false +} + +func (x *GetRequest) GetPid() []string { + if x != nil { + return x.Pid + } + return nil +} + +type GetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pnd []*pnd.PrincipalNetworkDomain `protobuf:"bytes,2,rep,name=pnd,proto3" json:"pnd,omitempty"` +} + +func (x *GetResponse) Reset() { + *x = GetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_core_core_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetResponse) ProtoMessage() {} + +func (x *GetResponse) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_core_core_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetResponse.ProtoReflect.Descriptor instead. +func (*GetResponse) Descriptor() ([]byte, []int) { + return file_gosdn_core_core_proto_rawDescGZIP(), []int{1} +} + +func (x *GetResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *GetResponse) GetPnd() []*pnd.PrincipalNetworkDomain { + if x != nil { + return x.Pnd + } + return nil +} + +type SetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pnd []*SetPnd `protobuf:"bytes,2,rep,name=pnd,proto3" json:"pnd,omitempty"` +} + +func (x *SetRequest) Reset() { + *x = SetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_core_core_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetRequest) ProtoMessage() {} + +func (x *SetRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_core_core_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetRequest.ProtoReflect.Descriptor instead. +func (*SetRequest) Descriptor() ([]byte, []int) { + return file_gosdn_core_core_proto_rawDescGZIP(), []int{2} +} + +func (x *SetRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *SetRequest) GetPnd() []*SetPnd { + if x != nil { + return x.Pnd + } + return nil +} + +type SetPnd struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Sbi string `protobuf:"bytes,3,opt,name=sbi,proto3" json:"sbi,omitempty"` +} + +func (x *SetPnd) Reset() { + *x = SetPnd{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_core_core_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetPnd) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPnd) ProtoMessage() {} + +func (x *SetPnd) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_core_core_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPnd.ProtoReflect.Descriptor instead. +func (*SetPnd) Descriptor() ([]byte, []int) { + return file_gosdn_core_core_proto_rawDescGZIP(), []int{3} +} + +func (x *SetPnd) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SetPnd) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *SetPnd) GetSbi() string { + if x != nil { + return x.Sbi + } + return "" +} + +type SetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Status SetResponseStatus `protobuf:"varint,2,opt,name=Status,proto3,enum=gosdn.core.SetResponseStatus" json:"Status,omitempty"` +} + +func (x *SetResponse) Reset() { + *x = SetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_core_core_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetResponse) ProtoMessage() {} + +func (x *SetResponse) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_core_core_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetResponse.ProtoReflect.Descriptor instead. +func (*SetResponse) Descriptor() ([]byte, []int) { + return file_gosdn_core_core_proto_rawDescGZIP(), []int{4} +} + +func (x *SetResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *SetResponse) GetStatus() SetResponseStatus { + if x != nil { + return x.Status + } + return SetResponse_OK +} + +var File_gosdn_core_core_proto protoreflect.FileDescriptor + +var file_gosdn_core_core_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x1a, 0x13, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6e, 0x64, 0x2f, 0x70, + 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4e, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x60, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x33, 0x0a, 0x03, 0x70, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x50, + 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x44, + 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x03, 0x70, 0x6e, 0x64, 0x22, 0x50, 0x0a, 0x0a, 0x53, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x24, 0x0a, 0x03, 0x70, 0x6e, 0x64, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x73, 0x65, 0x74, 0x50, 0x6e, 0x64, 0x52, 0x03, 0x70, 0x6e, 0x64, 0x22, 0x50, 0x0a, 0x06, + 0x73, 0x65, 0x74, 0x50, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, + 0x73, 0x62, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x62, 0x69, 0x22, 0x80, + 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x36, 0x0a, 0x06, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x67, + 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x22, 0x1b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x06, + 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, + 0x01, 0x32, 0x76, 0x0a, 0x04, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x36, 0x0a, 0x03, 0x47, 0x65, 0x74, + 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x36, 0x0a, 0x03, 0x53, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x17, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2a, 0x5a, 0x28, 0x63, 0x6f, 0x64, + 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x63, 0x6f, + 0x63, 0x73, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_gosdn_core_core_proto_rawDescOnce sync.Once + file_gosdn_core_core_proto_rawDescData = file_gosdn_core_core_proto_rawDesc +) + +func file_gosdn_core_core_proto_rawDescGZIP() []byte { + file_gosdn_core_core_proto_rawDescOnce.Do(func() { + file_gosdn_core_core_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_core_core_proto_rawDescData) + }) + return file_gosdn_core_core_proto_rawDescData +} + +var file_gosdn_core_core_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_gosdn_core_core_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_gosdn_core_core_proto_goTypes = []interface{}{ + (SetResponseStatus)(0), // 0: gosdn.core.SetResponse.status + (*GetRequest)(nil), // 1: gosdn.core.GetRequest + (*GetResponse)(nil), // 2: gosdn.core.GetResponse + (*SetRequest)(nil), // 3: gosdn.core.SetRequest + (*SetPnd)(nil), // 4: gosdn.core.setPnd + (*SetResponse)(nil), // 5: gosdn.core.SetResponse + (*pnd.PrincipalNetworkDomain)(nil), // 6: gosdn.pnd.PrincipalNetworkDomain +} +var file_gosdn_core_core_proto_depIdxs = []int32{ + 6, // 0: gosdn.core.GetResponse.pnd:type_name -> gosdn.pnd.PrincipalNetworkDomain + 4, // 1: gosdn.core.SetRequest.pnd:type_name -> gosdn.core.setPnd + 0, // 2: gosdn.core.SetResponse.Status:type_name -> gosdn.core.SetResponse.status + 1, // 3: gosdn.core.core.Get:input_type -> gosdn.core.GetRequest + 3, // 4: gosdn.core.core.Set:input_type -> gosdn.core.SetRequest + 2, // 5: gosdn.core.core.Get:output_type -> gosdn.core.GetResponse + 5, // 6: gosdn.core.core.Set:output_type -> gosdn.core.SetResponse + 5, // [5:7] is the sub-list for method output_type + 3, // [3:5] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_gosdn_core_core_proto_init() } +func file_gosdn_core_core_proto_init() { + if File_gosdn_core_core_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_gosdn_core_core_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_core_core_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_core_core_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_core_core_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetPnd); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_core_core_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_gosdn_core_core_proto_rawDesc, + NumEnums: 1, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_gosdn_core_core_proto_goTypes, + DependencyIndexes: file_gosdn_core_core_proto_depIdxs, + EnumInfos: file_gosdn_core_core_proto_enumTypes, + MessageInfos: file_gosdn_core_core_proto_msgTypes, + }.Build() + File_gosdn_core_core_proto = out.File + file_gosdn_core_core_proto_rawDesc = nil + file_gosdn_core_core_proto_goTypes = nil + file_gosdn_core_core_proto_depIdxs = nil +} diff --git a/go/gosdn/core/core_grpc.pb.go b/go/gosdn/core/core_grpc.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..4a5590f0e25c9c07084459e9a07a4e8080dc7b2b --- /dev/null +++ b/go/gosdn/core/core_grpc.pb.go @@ -0,0 +1,126 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package core + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// CoreClient is the client API for Core service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type CoreClient interface { + Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) + Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error) +} + +type coreClient struct { + cc grpc.ClientConnInterface +} + +func NewCoreClient(cc grpc.ClientConnInterface) CoreClient { + return &coreClient{cc} +} + +func (c *coreClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) { + out := new(GetResponse) + err := c.cc.Invoke(ctx, "/gosdn.core.core/Get", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *coreClient) Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error) { + out := new(SetResponse) + err := c.cc.Invoke(ctx, "/gosdn.core.core/Set", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CoreServer is the server API for Core service. +// All implementations must embed UnimplementedCoreServer +// for forward compatibility +type CoreServer interface { + Get(context.Context, *GetRequest) (*GetResponse, error) + Set(context.Context, *SetRequest) (*SetResponse, error) + mustEmbedUnimplementedCoreServer() +} + +// UnimplementedCoreServer must be embedded to have forward compatible implementations. +type UnimplementedCoreServer struct { +} + +func (*UnimplementedCoreServer) Get(context.Context, *GetRequest) (*GetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (*UnimplementedCoreServer) Set(context.Context, *SetRequest) (*SetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Set not implemented") +} +func (*UnimplementedCoreServer) mustEmbedUnimplementedCoreServer() {} + +func RegisterCoreServer(s *grpc.Server, srv CoreServer) { + s.RegisterService(&_Core_serviceDesc, srv) +} + +func _Core_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CoreServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gosdn.core.core/Get", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CoreServer).Get(ctx, req.(*GetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Core_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CoreServer).Set(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gosdn.core.core/Set", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CoreServer).Set(ctx, req.(*SetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Core_serviceDesc = grpc.ServiceDesc{ + ServiceName: "gosdn.core.core", + HandlerType: (*CoreServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _Core_Get_Handler, + }, + { + MethodName: "Set", + Handler: _Core_Set_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "gosdn/core/core.proto", +} diff --git a/go/gosdn/csbi/csbi.pb.go b/go/gosdn/csbi/csbi.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..d25f24decfc4ee3eadd6afb493221aa45105bbc5 --- /dev/null +++ b/go/gosdn/csbi/csbi.pb.go @@ -0,0 +1,917 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.17.2 +// source: gosdn/csbi/csbi.proto + +package csbi + +import ( + transport "code.fbi.h-da.de/cocsn/api/go/gosdn/transport" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type State int32 + +const ( + State_ANNOUNCED State = 0 + State_BUILT State = 1 + State_DEPLOYED State = 2 + State_RUNNING State = 3 + State_DECOMMISSIONED State = 4 +) + +// Enum value maps for State. +var ( + State_name = map[int32]string{ + 0: "ANNOUNCED", + 1: "BUILT", + 2: "DEPLOYED", + 3: "RUNNING", + 4: "DECOMMISSIONED", + } + State_value = map[string]int32{ + "ANNOUNCED": 0, + "BUILT": 1, + "DEPLOYED": 2, + "RUNNING": 3, + "DECOMMISSIONED": 4, + } +) + +func (x State) Enum() *State { + p := new(State) + *p = x + return p +} + +func (x State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (State) Descriptor() protoreflect.EnumDescriptor { + return file_gosdn_csbi_csbi_proto_enumTypes[0].Descriptor() +} + +func (State) Type() protoreflect.EnumType { + return &file_gosdn_csbi_csbi_proto_enumTypes[0] +} + +func (x State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use State.Descriptor instead. +func (State) EnumDescriptor() ([]byte, []int) { + return file_gosdn_csbi_csbi_proto_rawDescGZIP(), []int{0} +} + +type DeleteResponseStatus int32 + +const ( + DeleteResponse_OK DeleteResponseStatus = 0 + DeleteResponse_ERROR DeleteResponseStatus = 1 +) + +// Enum value maps for DeleteResponseStatus. +var ( + DeleteResponseStatus_name = map[int32]string{ + 0: "OK", + 1: "ERROR", + } + DeleteResponseStatus_value = map[string]int32{ + "OK": 0, + "ERROR": 1, + } +) + +func (x DeleteResponseStatus) Enum() *DeleteResponseStatus { + p := new(DeleteResponseStatus) + *p = x + return p +} + +func (x DeleteResponseStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DeleteResponseStatus) Descriptor() protoreflect.EnumDescriptor { + return file_gosdn_csbi_csbi_proto_enumTypes[1].Descriptor() +} + +func (DeleteResponseStatus) Type() protoreflect.EnumType { + return &file_gosdn_csbi_csbi_proto_enumTypes[1] +} + +func (x DeleteResponseStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DeleteResponseStatus.Descriptor instead. +func (DeleteResponseStatus) EnumDescriptor() ([]byte, []int) { + return file_gosdn_csbi_csbi_proto_rawDescGZIP(), []int{8, 0} +} + +type Syn struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` +} + +func (x *Syn) Reset() { + *x = Syn{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Syn) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Syn) ProtoMessage() {} + +func (x *Syn) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Syn.ProtoReflect.Descriptor instead. +func (*Syn) Descriptor() ([]byte, []int) { + return file_gosdn_csbi_csbi_proto_rawDescGZIP(), []int{0} +} + +func (x *Syn) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *Syn) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Syn) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +type Ack struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + TransportOption *transport.TransportOption `protobuf:"bytes,2,opt,name=TransportOption,proto3" json:"TransportOption,omitempty"` +} + +func (x *Ack) Reset() { + *x = Ack{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Ack) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Ack) ProtoMessage() {} + +func (x *Ack) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Ack.ProtoReflect.Descriptor instead. +func (*Ack) Descriptor() ([]byte, []int) { + return file_gosdn_csbi_csbi_proto_rawDescGZIP(), []int{1} +} + +func (x *Ack) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *Ack) GetTransportOption() *transport.TransportOption { + if x != nil { + return x.TransportOption + } + return nil +} + +type GetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + All bool `protobuf:"varint,2,opt,name=all,proto3" json:"all,omitempty"` + Did []string `protobuf:"bytes,3,rep,name=did,proto3" json:"did,omitempty"` +} + +func (x *GetRequest) Reset() { + *x = GetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRequest) ProtoMessage() {} + +func (x *GetRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead. +func (*GetRequest) Descriptor() ([]byte, []int) { + return file_gosdn_csbi_csbi_proto_rawDescGZIP(), []int{2} +} + +func (x *GetRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *GetRequest) GetAll() bool { + if x != nil { + return x.All + } + return false +} + +func (x *GetRequest) GetDid() []string { + if x != nil { + return x.Did + } + return nil +} + +type GetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Deployments []*Deployment `protobuf:"bytes,2,rep,name=deployments,proto3" json:"deployments,omitempty"` +} + +func (x *GetResponse) Reset() { + *x = GetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetResponse) ProtoMessage() {} + +func (x *GetResponse) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetResponse.ProtoReflect.Descriptor instead. +func (*GetResponse) Descriptor() ([]byte, []int) { + return file_gosdn_csbi_csbi_proto_rawDescGZIP(), []int{3} +} + +func (x *GetResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *GetResponse) GetDeployments() []*Deployment { + if x != nil { + return x.Deployments + } + return nil +} + +type Deployment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + State State `protobuf:"varint,3,opt,name=state,proto3,enum=gosdn.csbi.State" json:"state,omitempty"` +} + +func (x *Deployment) Reset() { + *x = Deployment{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Deployment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Deployment) ProtoMessage() {} + +func (x *Deployment) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Deployment.ProtoReflect.Descriptor instead. +func (*Deployment) Descriptor() ([]byte, []int) { + return file_gosdn_csbi_csbi_proto_rawDescGZIP(), []int{4} +} + +func (x *Deployment) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Deployment) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Deployment) GetState() State { + if x != nil { + return x.State + } + return State_ANNOUNCED +} + +type CreateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + TransportOption []*transport.TransportOption `protobuf:"bytes,2,rep,name=TransportOption,proto3" json:"TransportOption,omitempty"` +} + +func (x *CreateRequest) Reset() { + *x = CreateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateRequest) ProtoMessage() {} + +func (x *CreateRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead. +func (*CreateRequest) Descriptor() ([]byte, []int) { + return file_gosdn_csbi_csbi_proto_rawDescGZIP(), []int{5} +} + +func (x *CreateRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *CreateRequest) GetTransportOption() []*transport.TransportOption { + if x != nil { + return x.TransportOption + } + return nil +} + +type CreateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Deployments []*Deployment `protobuf:"bytes,2,rep,name=deployments,proto3" json:"deployments,omitempty"` +} + +func (x *CreateResponse) Reset() { + *x = CreateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateResponse) ProtoMessage() {} + +func (x *CreateResponse) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead. +func (*CreateResponse) Descriptor() ([]byte, []int) { + return file_gosdn_csbi_csbi_proto_rawDescGZIP(), []int{6} +} + +func (x *CreateResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *CreateResponse) GetDeployments() []*Deployment { + if x != nil { + return x.Deployments + } + return nil +} + +type DeleteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Did []string `protobuf:"bytes,2,rep,name=did,proto3" json:"did,omitempty"` +} + +func (x *DeleteRequest) Reset() { + *x = DeleteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteRequest) ProtoMessage() {} + +func (x *DeleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead. +func (*DeleteRequest) Descriptor() ([]byte, []int) { + return file_gosdn_csbi_csbi_proto_rawDescGZIP(), []int{7} +} + +func (x *DeleteRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *DeleteRequest) GetDid() []string { + if x != nil { + return x.Did + } + return nil +} + +type DeleteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Status DeleteResponseStatus `protobuf:"varint,2,opt,name=Status,proto3,enum=gosdn.csbi.DeleteResponseStatus" json:"Status,omitempty"` +} + +func (x *DeleteResponse) Reset() { + *x = DeleteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteResponse) ProtoMessage() {} + +func (x *DeleteResponse) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_csbi_csbi_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead. +func (*DeleteResponse) Descriptor() ([]byte, []int) { + return file_gosdn_csbi_csbi_proto_rawDescGZIP(), []int{8} +} + +func (x *DeleteResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *DeleteResponse) GetStatus() DeleteResponseStatus { + if x != nil { + return x.Status + } + return DeleteResponse_OK +} + +var File_gosdn_csbi_csbi_proto protoreflect.FileDescriptor + +var file_gosdn_csbi_csbi_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x63, 0x73, 0x62, 0x69, 0x2f, 0x63, 0x73, 0x62, + 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, + 0x73, 0x62, 0x69, 0x1a, 0x1f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4d, 0x0a, 0x03, 0x53, 0x79, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x22, 0x6f, 0x0a, 0x03, 0x41, 0x63, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x4a, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4e, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, + 0x6c, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x03, 0x64, 0x69, 0x64, 0x22, 0x65, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x38, 0x0a, 0x0b, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, + 0x73, 0x62, 0x69, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, + 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x59, 0x0a, 0x0a, 0x44, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x67, + 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x73, 0x62, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x79, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x4a, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x68, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x38, 0x0a, 0x0b, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, + 0x73, 0x62, 0x69, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, + 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x3f, 0x0a, 0x0d, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x22, 0x86, 0x01, 0x0a, + 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x39, 0x0a, + 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, + 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x73, 0x62, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x1b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x10, 0x01, 0x2a, 0x50, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0d, + 0x0a, 0x09, 0x41, 0x4e, 0x4e, 0x4f, 0x55, 0x4e, 0x43, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, + 0x05, 0x42, 0x55, 0x49, 0x4c, 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x50, 0x4c, + 0x4f, 0x59, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, + 0x47, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x45, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x53, 0x53, + 0x49, 0x4f, 0x4e, 0x45, 0x44, 0x10, 0x04, 0x32, 0xeb, 0x01, 0x0a, 0x04, 0x63, 0x73, 0x62, 0x69, + 0x12, 0x36, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, + 0x63, 0x73, 0x62, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x17, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x73, 0x62, 0x69, 0x2e, 0x47, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x12, 0x19, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x73, 0x62, 0x69, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, + 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x73, 0x62, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x73, 0x62, 0x69, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, + 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x73, 0x62, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x05, 0x48, 0x65, + 0x6c, 0x6c, 0x6f, 0x12, 0x0f, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x73, 0x62, 0x69, + 0x2e, 0x53, 0x79, 0x6e, 0x1a, 0x0f, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x73, 0x62, + 0x69, 0x2e, 0x41, 0x63, 0x6b, 0x42, 0x2a, 0x5a, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, + 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x63, 0x6f, 0x63, 0x73, 0x6e, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x63, 0x73, 0x62, + 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_gosdn_csbi_csbi_proto_rawDescOnce sync.Once + file_gosdn_csbi_csbi_proto_rawDescData = file_gosdn_csbi_csbi_proto_rawDesc +) + +func file_gosdn_csbi_csbi_proto_rawDescGZIP() []byte { + file_gosdn_csbi_csbi_proto_rawDescOnce.Do(func() { + file_gosdn_csbi_csbi_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_csbi_csbi_proto_rawDescData) + }) + return file_gosdn_csbi_csbi_proto_rawDescData +} + +var file_gosdn_csbi_csbi_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_gosdn_csbi_csbi_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_gosdn_csbi_csbi_proto_goTypes = []interface{}{ + (State)(0), // 0: gosdn.csbi.State + (DeleteResponseStatus)(0), // 1: gosdn.csbi.DeleteResponse.status + (*Syn)(nil), // 2: gosdn.csbi.Syn + (*Ack)(nil), // 3: gosdn.csbi.Ack + (*GetRequest)(nil), // 4: gosdn.csbi.GetRequest + (*GetResponse)(nil), // 5: gosdn.csbi.GetResponse + (*Deployment)(nil), // 6: gosdn.csbi.Deployment + (*CreateRequest)(nil), // 7: gosdn.csbi.CreateRequest + (*CreateResponse)(nil), // 8: gosdn.csbi.CreateResponse + (*DeleteRequest)(nil), // 9: gosdn.csbi.DeleteRequest + (*DeleteResponse)(nil), // 10: gosdn.csbi.DeleteResponse + (*transport.TransportOption)(nil), // 11: gosdn.transport.TransportOption +} +var file_gosdn_csbi_csbi_proto_depIdxs = []int32{ + 11, // 0: gosdn.csbi.Ack.TransportOption:type_name -> gosdn.transport.TransportOption + 6, // 1: gosdn.csbi.GetResponse.deployments:type_name -> gosdn.csbi.Deployment + 0, // 2: gosdn.csbi.Deployment.state:type_name -> gosdn.csbi.State + 11, // 3: gosdn.csbi.CreateRequest.TransportOption:type_name -> gosdn.transport.TransportOption + 6, // 4: gosdn.csbi.CreateResponse.deployments:type_name -> gosdn.csbi.Deployment + 1, // 5: gosdn.csbi.DeleteResponse.Status:type_name -> gosdn.csbi.DeleteResponse.status + 4, // 6: gosdn.csbi.csbi.Get:input_type -> gosdn.csbi.GetRequest + 7, // 7: gosdn.csbi.csbi.Create:input_type -> gosdn.csbi.CreateRequest + 9, // 8: gosdn.csbi.csbi.Delete:input_type -> gosdn.csbi.DeleteRequest + 2, // 9: gosdn.csbi.csbi.Hello:input_type -> gosdn.csbi.Syn + 5, // 10: gosdn.csbi.csbi.Get:output_type -> gosdn.csbi.GetResponse + 8, // 11: gosdn.csbi.csbi.Create:output_type -> gosdn.csbi.CreateResponse + 10, // 12: gosdn.csbi.csbi.Delete:output_type -> gosdn.csbi.DeleteResponse + 3, // 13: gosdn.csbi.csbi.Hello:output_type -> gosdn.csbi.Ack + 10, // [10:14] is the sub-list for method output_type + 6, // [6:10] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_gosdn_csbi_csbi_proto_init() } +func file_gosdn_csbi_csbi_proto_init() { + if File_gosdn_csbi_csbi_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_gosdn_csbi_csbi_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Syn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_csbi_csbi_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ack); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_csbi_csbi_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_csbi_csbi_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_csbi_csbi_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Deployment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_csbi_csbi_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_csbi_csbi_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_csbi_csbi_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_csbi_csbi_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_gosdn_csbi_csbi_proto_rawDesc, + NumEnums: 2, + NumMessages: 9, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_gosdn_csbi_csbi_proto_goTypes, + DependencyIndexes: file_gosdn_csbi_csbi_proto_depIdxs, + EnumInfos: file_gosdn_csbi_csbi_proto_enumTypes, + MessageInfos: file_gosdn_csbi_csbi_proto_msgTypes, + }.Build() + File_gosdn_csbi_csbi_proto = out.File + file_gosdn_csbi_csbi_proto_rawDesc = nil + file_gosdn_csbi_csbi_proto_goTypes = nil + file_gosdn_csbi_csbi_proto_depIdxs = nil +} diff --git a/go/gosdn/csbi/csbi_grpc.pb.go b/go/gosdn/csbi/csbi_grpc.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..de64f86a32302b3c82b6dded0972084c4bdba06e --- /dev/null +++ b/go/gosdn/csbi/csbi_grpc.pb.go @@ -0,0 +1,198 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package csbi + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// CsbiClient is the client API for Csbi service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type CsbiClient interface { + Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) + Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) + Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) + Hello(ctx context.Context, in *Syn, opts ...grpc.CallOption) (*Ack, error) +} + +type csbiClient struct { + cc grpc.ClientConnInterface +} + +func NewCsbiClient(cc grpc.ClientConnInterface) CsbiClient { + return &csbiClient{cc} +} + +func (c *csbiClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) { + out := new(GetResponse) + err := c.cc.Invoke(ctx, "/gosdn.csbi.csbi/Get", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *csbiClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) { + out := new(CreateResponse) + err := c.cc.Invoke(ctx, "/gosdn.csbi.csbi/Create", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *csbiClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) { + out := new(DeleteResponse) + err := c.cc.Invoke(ctx, "/gosdn.csbi.csbi/Delete", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *csbiClient) Hello(ctx context.Context, in *Syn, opts ...grpc.CallOption) (*Ack, error) { + out := new(Ack) + err := c.cc.Invoke(ctx, "/gosdn.csbi.csbi/Hello", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CsbiServer is the server API for Csbi service. +// All implementations must embed UnimplementedCsbiServer +// for forward compatibility +type CsbiServer interface { + Get(context.Context, *GetRequest) (*GetResponse, error) + Create(context.Context, *CreateRequest) (*CreateResponse, error) + Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) + Hello(context.Context, *Syn) (*Ack, error) + mustEmbedUnimplementedCsbiServer() +} + +// UnimplementedCsbiServer must be embedded to have forward compatible implementations. +type UnimplementedCsbiServer struct { +} + +func (*UnimplementedCsbiServer) Get(context.Context, *GetRequest) (*GetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (*UnimplementedCsbiServer) Create(context.Context, *CreateRequest) (*CreateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (*UnimplementedCsbiServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (*UnimplementedCsbiServer) Hello(context.Context, *Syn) (*Ack, error) { + return nil, status.Errorf(codes.Unimplemented, "method Hello not implemented") +} +func (*UnimplementedCsbiServer) mustEmbedUnimplementedCsbiServer() {} + +func RegisterCsbiServer(s *grpc.Server, srv CsbiServer) { + s.RegisterService(&_Csbi_serviceDesc, srv) +} + +func _Csbi_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CsbiServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gosdn.csbi.csbi/Get", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CsbiServer).Get(ctx, req.(*GetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Csbi_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CsbiServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gosdn.csbi.csbi/Create", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CsbiServer).Create(ctx, req.(*CreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Csbi_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CsbiServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gosdn.csbi.csbi/Delete", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CsbiServer).Delete(ctx, req.(*DeleteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Csbi_Hello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Syn) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CsbiServer).Hello(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gosdn.csbi.csbi/Hello", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CsbiServer).Hello(ctx, req.(*Syn)) + } + return interceptor(ctx, in, info, handler) +} + +var _Csbi_serviceDesc = grpc.ServiceDesc{ + ServiceName: "gosdn.csbi.csbi", + HandlerType: (*CsbiServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _Csbi_Get_Handler, + }, + { + MethodName: "Create", + Handler: _Csbi_Create_Handler, + }, + { + MethodName: "Delete", + Handler: _Csbi_Delete_Handler, + }, + { + MethodName: "Hello", + Handler: _Csbi_Hello_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "gosdn/csbi/csbi.proto", +} diff --git a/go/gosdn/pnd/pnd.pb.go b/go/gosdn/pnd/pnd.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..71e9dbe61f807d7b6cb04be42eb26c2717413fd1 --- /dev/null +++ b/go/gosdn/pnd/pnd.pb.go @@ -0,0 +1,1957 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.17.2 +// source: gosdn/pnd/pnd.proto + +package pnd + +import ( + southbound "code.fbi.h-da.de/cocsn/api/go/gosdn/southbound" + transport "code.fbi.h-da.de/cocsn/api/go/gosdn/transport" + gnmi "github.com/openconfig/gnmi/proto/gnmi" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ApiOperation int32 + +const ( + ApiOperation_UPDATE ApiOperation = 0 + ApiOperation_REPLACE ApiOperation = 1 + ApiOperation_DELETE ApiOperation = 2 +) + +// Enum value maps for ApiOperation. +var ( + ApiOperation_name = map[int32]string{ + 0: "UPDATE", + 1: "REPLACE", + 2: "DELETE", + } + ApiOperation_value = map[string]int32{ + "UPDATE": 0, + "REPLACE": 1, + "DELETE": 2, + } +) + +func (x ApiOperation) Enum() *ApiOperation { + p := new(ApiOperation) + *p = x + return p +} + +func (x ApiOperation) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ApiOperation) Descriptor() protoreflect.EnumDescriptor { + return file_gosdn_pnd_pnd_proto_enumTypes[0].Descriptor() +} + +func (ApiOperation) Type() protoreflect.EnumType { + return &file_gosdn_pnd_pnd_proto_enumTypes[0] +} + +func (x ApiOperation) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ApiOperation.Descriptor instead. +func (ApiOperation) EnumDescriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{0} +} + +type Change_State int32 + +const ( + Change_PENDING Change_State = 0 + Change_COMMITTED Change_State = 1 + Change_CONFIRMED Change_State = 2 +) + +// Enum value maps for Change_State. +var ( + Change_State_name = map[int32]string{ + 0: "PENDING", + 1: "COMMITTED", + 2: "CONFIRMED", + } + Change_State_value = map[string]int32{ + "PENDING": 0, + "COMMITTED": 1, + "CONFIRMED": 2, + } +) + +func (x Change_State) Enum() *Change_State { + p := new(Change_State) + *p = x + return p +} + +func (x Change_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Change_State) Descriptor() protoreflect.EnumDescriptor { + return file_gosdn_pnd_pnd_proto_enumTypes[1].Descriptor() +} + +func (Change_State) Type() protoreflect.EnumType { + return &file_gosdn_pnd_pnd_proto_enumTypes[1] +} + +func (x Change_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Change_State.Descriptor instead. +func (Change_State) EnumDescriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{8, 0} +} + +type SetChange_Operation int32 + +const ( + SetChange_CREATE SetChange_Operation = 0 + SetChange_COMMIT SetChange_Operation = 1 + SetChange_CONFIRM SetChange_Operation = 2 +) + +// Enum value maps for SetChange_Operation. +var ( + SetChange_Operation_name = map[int32]string{ + 0: "CREATE", + 1: "COMMIT", + 2: "CONFIRM", + } + SetChange_Operation_value = map[string]int32{ + "CREATE": 0, + "COMMIT": 1, + "CONFIRM": 2, + } +) + +func (x SetChange_Operation) Enum() *SetChange_Operation { + p := new(SetChange_Operation) + *p = x + return p +} + +func (x SetChange_Operation) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SetChange_Operation) Descriptor() protoreflect.EnumDescriptor { + return file_gosdn_pnd_pnd_proto_enumTypes[2].Descriptor() +} + +func (SetChange_Operation) Type() protoreflect.EnumType { + return &file_gosdn_pnd_pnd_proto_enumTypes[2] +} + +func (x SetChange_Operation) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SetChange_Operation.Descriptor instead. +func (SetChange_Operation) EnumDescriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{12, 0} +} + +type SetResponseStatus int32 + +const ( + SetResponse_OK SetResponseStatus = 0 + SetResponse_ERROR SetResponseStatus = 1 +) + +// Enum value maps for SetResponseStatus. +var ( + SetResponseStatus_name = map[int32]string{ + 0: "OK", + 1: "ERROR", + } + SetResponseStatus_value = map[string]int32{ + "OK": 0, + "ERROR": 1, + } +) + +func (x SetResponseStatus) Enum() *SetResponseStatus { + p := new(SetResponseStatus) + *p = x + return p +} + +func (x SetResponseStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SetResponseStatus) Descriptor() protoreflect.EnumDescriptor { + return file_gosdn_pnd_pnd_proto_enumTypes[3].Descriptor() +} + +func (SetResponseStatus) Type() protoreflect.EnumType { + return &file_gosdn_pnd_pnd_proto_enumTypes[3] +} + +func (x SetResponseStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SetResponseStatus.Descriptor instead. +func (SetResponseStatus) EnumDescriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{13, 0} +} + +type DeleteRequest_Type int32 + +const ( + DeleteRequest_OND DeleteRequest_Type = 0 + DeleteRequest_SBI DeleteRequest_Type = 1 + DeleteRequest_PND DeleteRequest_Type = 2 +) + +// Enum value maps for DeleteRequest_Type. +var ( + DeleteRequest_Type_name = map[int32]string{ + 0: "OND", + 1: "SBI", + 2: "PND", + } + DeleteRequest_Type_value = map[string]int32{ + "OND": 0, + "SBI": 1, + "PND": 2, + } +) + +func (x DeleteRequest_Type) Enum() *DeleteRequest_Type { + p := new(DeleteRequest_Type) + *p = x + return p +} + +func (x DeleteRequest_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DeleteRequest_Type) Descriptor() protoreflect.EnumDescriptor { + return file_gosdn_pnd_pnd_proto_enumTypes[4].Descriptor() +} + +func (DeleteRequest_Type) Type() protoreflect.EnumType { + return &file_gosdn_pnd_pnd_proto_enumTypes[4] +} + +func (x DeleteRequest_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DeleteRequest_Type.Descriptor instead. +func (DeleteRequest_Type) EnumDescriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{15, 0} +} + +type DeleteResponseStatus int32 + +const ( + DeleteResponse_OK DeleteResponseStatus = 0 + DeleteResponse_ERROR DeleteResponseStatus = 1 +) + +// Enum value maps for DeleteResponseStatus. +var ( + DeleteResponseStatus_name = map[int32]string{ + 0: "OK", + 1: "ERROR", + } + DeleteResponseStatus_value = map[string]int32{ + "OK": 0, + "ERROR": 1, + } +) + +func (x DeleteResponseStatus) Enum() *DeleteResponseStatus { + p := new(DeleteResponseStatus) + *p = x + return p +} + +func (x DeleteResponseStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DeleteResponseStatus) Descriptor() protoreflect.EnumDescriptor { + return file_gosdn_pnd_pnd_proto_enumTypes[5].Descriptor() +} + +func (DeleteResponseStatus) Type() protoreflect.EnumType { + return &file_gosdn_pnd_pnd_proto_enumTypes[5] +} + +func (x DeleteResponseStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DeleteResponseStatus.Descriptor instead. +func (DeleteResponseStatus) EnumDescriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{16, 0} +} + +type GetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + // Types that are assignable to Request: + // *GetRequest_Pnd + // *GetRequest_Ond + // *GetRequest_Sbi + // *GetRequest_Change + Request isGetRequest_Request `protobuf_oneof:"request"` + Pid string `protobuf:"bytes,6,opt,name=pid,proto3" json:"pid,omitempty"` +} + +func (x *GetRequest) Reset() { + *x = GetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRequest) ProtoMessage() {} + +func (x *GetRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead. +func (*GetRequest) Descriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{0} +} + +func (x *GetRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (m *GetRequest) GetRequest() isGetRequest_Request { + if m != nil { + return m.Request + } + return nil +} + +func (x *GetRequest) GetPnd() *GetPnd { + if x, ok := x.GetRequest().(*GetRequest_Pnd); ok { + return x.Pnd + } + return nil +} + +func (x *GetRequest) GetOnd() *GetOnd { + if x, ok := x.GetRequest().(*GetRequest_Ond); ok { + return x.Ond + } + return nil +} + +func (x *GetRequest) GetSbi() *GetSbi { + if x, ok := x.GetRequest().(*GetRequest_Sbi); ok { + return x.Sbi + } + return nil +} + +func (x *GetRequest) GetChange() *GetChange { + if x, ok := x.GetRequest().(*GetRequest_Change); ok { + return x.Change + } + return nil +} + +func (x *GetRequest) GetPid() string { + if x != nil { + return x.Pid + } + return "" +} + +type isGetRequest_Request interface { + isGetRequest_Request() +} + +type GetRequest_Pnd struct { + Pnd *GetPnd `protobuf:"bytes,2,opt,name=pnd,proto3,oneof"` +} + +type GetRequest_Ond struct { + Ond *GetOnd `protobuf:"bytes,3,opt,name=ond,proto3,oneof"` +} + +type GetRequest_Sbi struct { + Sbi *GetSbi `protobuf:"bytes,4,opt,name=sbi,proto3,oneof"` +} + +type GetRequest_Change struct { + Change *GetChange `protobuf:"bytes,5,opt,name=change,proto3,oneof"` +} + +func (*GetRequest_Pnd) isGetRequest_Request() {} + +func (*GetRequest_Ond) isGetRequest_Request() {} + +func (*GetRequest_Sbi) isGetRequest_Request() {} + +func (*GetRequest_Change) isGetRequest_Request() {} + +type GetPnd struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetPnd) Reset() { + *x = GetPnd{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPnd) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPnd) ProtoMessage() {} + +func (x *GetPnd) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPnd.ProtoReflect.Descriptor instead. +func (*GetPnd) Descriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{1} +} + +type GetOnd struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + All bool `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"` + Did []string `protobuf:"bytes,2,rep,name=did,proto3" json:"did,omitempty"` +} + +func (x *GetOnd) Reset() { + *x = GetOnd{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOnd) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOnd) ProtoMessage() {} + +func (x *GetOnd) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetOnd.ProtoReflect.Descriptor instead. +func (*GetOnd) Descriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{2} +} + +func (x *GetOnd) GetAll() bool { + if x != nil { + return x.All + } + return false +} + +func (x *GetOnd) GetDid() []string { + if x != nil { + return x.Did + } + return nil +} + +type GetSbi struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + All bool `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"` + Sid []string `protobuf:"bytes,2,rep,name=sid,proto3" json:"sid,omitempty"` +} + +func (x *GetSbi) Reset() { + *x = GetSbi{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSbi) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSbi) ProtoMessage() {} + +func (x *GetSbi) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSbi.ProtoReflect.Descriptor instead. +func (*GetSbi) Descriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{3} +} + +func (x *GetSbi) GetAll() bool { + if x != nil { + return x.All + } + return false +} + +func (x *GetSbi) GetSid() []string { + if x != nil { + return x.Sid + } + return nil +} + +type GetChange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + All bool `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"` + Cuid []string `protobuf:"bytes,2,rep,name=cuid,proto3" json:"cuid,omitempty"` +} + +func (x *GetChange) Reset() { + *x = GetChange{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetChange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetChange) ProtoMessage() {} + +func (x *GetChange) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetChange.ProtoReflect.Descriptor instead. +func (*GetChange) Descriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{4} +} + +func (x *GetChange) GetAll() bool { + if x != nil { + return x.All + } + return false +} + +func (x *GetChange) GetCuid() []string { + if x != nil { + return x.Cuid + } + return nil +} + +type GetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pnd *PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` + Ond []*OrchestratedNetworkingDevice `protobuf:"bytes,3,rep,name=ond,proto3" json:"ond,omitempty"` + Sbi []*southbound.SouthboundInterface `protobuf:"bytes,5,rep,name=sbi,proto3" json:"sbi,omitempty"` + Change []*Change `protobuf:"bytes,7,rep,name=change,proto3" json:"change,omitempty"` +} + +func (x *GetResponse) Reset() { + *x = GetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetResponse) ProtoMessage() {} + +func (x *GetResponse) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetResponse.ProtoReflect.Descriptor instead. +func (*GetResponse) Descriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{5} +} + +func (x *GetResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *GetResponse) GetPnd() *PrincipalNetworkDomain { + if x != nil { + return x.Pnd + } + return nil +} + +func (x *GetResponse) GetOnd() []*OrchestratedNetworkingDevice { + if x != nil { + return x.Ond + } + return nil +} + +func (x *GetResponse) GetSbi() []*southbound.SouthboundInterface { + if x != nil { + return x.Sbi + } + return nil +} + +func (x *GetResponse) GetChange() []*Change { + if x != nil { + return x.Change + } + return nil +} + +type PrincipalNetworkDomain struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Ond []*OrchestratedNetworkingDevice `protobuf:"bytes,4,rep,name=ond,proto3" json:"ond,omitempty"` + Sbi []*southbound.SouthboundInterface `protobuf:"bytes,5,rep,name=sbi,proto3" json:"sbi,omitempty"` + Change []*Change `protobuf:"bytes,6,rep,name=change,proto3" json:"change,omitempty"` +} + +func (x *PrincipalNetworkDomain) Reset() { + *x = PrincipalNetworkDomain{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrincipalNetworkDomain) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrincipalNetworkDomain) ProtoMessage() {} + +func (x *PrincipalNetworkDomain) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PrincipalNetworkDomain.ProtoReflect.Descriptor instead. +func (*PrincipalNetworkDomain) Descriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{6} +} + +func (x *PrincipalNetworkDomain) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PrincipalNetworkDomain) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PrincipalNetworkDomain) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *PrincipalNetworkDomain) GetOnd() []*OrchestratedNetworkingDevice { + if x != nil { + return x.Ond + } + return nil +} + +func (x *PrincipalNetworkDomain) GetSbi() []*southbound.SouthboundInterface { + if x != nil { + return x.Sbi + } + return nil +} + +func (x *PrincipalNetworkDomain) GetChange() []*Change { + if x != nil { + return x.Change + } + return nil +} + +type OrchestratedNetworkingDevice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Device []*gnmi.Notification `protobuf:"bytes,3,rep,name=device,proto3" json:"device,omitempty"` + Sbi *southbound.SouthboundInterface `protobuf:"bytes,4,opt,name=sbi,proto3" json:"sbi,omitempty"` +} + +func (x *OrchestratedNetworkingDevice) Reset() { + *x = OrchestratedNetworkingDevice{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OrchestratedNetworkingDevice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrchestratedNetworkingDevice) ProtoMessage() {} + +func (x *OrchestratedNetworkingDevice) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrchestratedNetworkingDevice.ProtoReflect.Descriptor instead. +func (*OrchestratedNetworkingDevice) Descriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{7} +} + +func (x *OrchestratedNetworkingDevice) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *OrchestratedNetworkingDevice) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *OrchestratedNetworkingDevice) GetDevice() []*gnmi.Notification { + if x != nil { + return x.Device + } + return nil +} + +func (x *OrchestratedNetworkingDevice) GetSbi() *southbound.SouthboundInterface { + if x != nil { + return x.Sbi + } + return nil +} + +type Change struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Age int64 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` + State Change_State `protobuf:"varint,3,opt,name=state,proto3,enum=gosdn.pnd.Change_State" json:"state,omitempty"` +} + +func (x *Change) Reset() { + *x = Change{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Change) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Change) ProtoMessage() {} + +func (x *Change) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Change.ProtoReflect.Descriptor instead. +func (*Change) Descriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{8} +} + +func (x *Change) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Change) GetAge() int64 { + if x != nil { + return x.Age + } + return 0 +} + +func (x *Change) GetState() Change_State { + if x != nil { + return x.State + } + return Change_PENDING +} + +type SetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Ond []*SetOnd `protobuf:"bytes,2,rep,name=ond,proto3" json:"ond,omitempty"` + Sbi []*SetSbi `protobuf:"bytes,3,rep,name=sbi,proto3" json:"sbi,omitempty"` + Change []*SetChange `protobuf:"bytes,4,rep,name=change,proto3" json:"change,omitempty"` + ChangeRequest []*ChangeRequest `protobuf:"bytes,5,rep,name=changeRequest,proto3" json:"changeRequest,omitempty"` + Pid string `protobuf:"bytes,6,opt,name=pid,proto3" json:"pid,omitempty"` +} + +func (x *SetRequest) Reset() { + *x = SetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetRequest) ProtoMessage() {} + +func (x *SetRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetRequest.ProtoReflect.Descriptor instead. +func (*SetRequest) Descriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{9} +} + +func (x *SetRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *SetRequest) GetOnd() []*SetOnd { + if x != nil { + return x.Ond + } + return nil +} + +func (x *SetRequest) GetSbi() []*SetSbi { + if x != nil { + return x.Sbi + } + return nil +} + +func (x *SetRequest) GetChange() []*SetChange { + if x != nil { + return x.Change + } + return nil +} + +func (x *SetRequest) GetChangeRequest() []*ChangeRequest { + if x != nil { + return x.ChangeRequest + } + return nil +} + +func (x *SetRequest) GetPid() string { + if x != nil { + return x.Pid + } + return "" +} + +type SetOnd struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Sbi *southbound.SouthboundInterface `protobuf:"bytes,2,opt,name=sbi,proto3" json:"sbi,omitempty"` + DeviceName string `protobuf:"bytes,3,opt,name=deviceName,proto3" json:"deviceName,omitempty"` + TransportOption *transport.TransportOption `protobuf:"bytes,4,opt,name=transportOption,proto3" json:"transportOption,omitempty"` +} + +func (x *SetOnd) Reset() { + *x = SetOnd{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetOnd) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetOnd) ProtoMessage() {} + +func (x *SetOnd) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetOnd.ProtoReflect.Descriptor instead. +func (*SetOnd) Descriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{10} +} + +func (x *SetOnd) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *SetOnd) GetSbi() *southbound.SouthboundInterface { + if x != nil { + return x.Sbi + } + return nil +} + +func (x *SetOnd) GetDeviceName() string { + if x != nil { + return x.DeviceName + } + return "" +} + +func (x *SetOnd) GetTransportOption() *transport.TransportOption { + if x != nil { + return x.TransportOption + } + return nil +} + +type SetSbi struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetSbi) Reset() { + *x = SetSbi{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetSbi) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSbi) ProtoMessage() {} + +func (x *SetSbi) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSbi.ProtoReflect.Descriptor instead. +func (*SetSbi) Descriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{11} +} + +type SetChange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Cuid string `protobuf:"bytes,1,opt,name=cuid,proto3" json:"cuid,omitempty"` + Op SetChange_Operation `protobuf:"varint,2,opt,name=op,proto3,enum=gosdn.pnd.SetChange_Operation" json:"op,omitempty"` +} + +func (x *SetChange) Reset() { + *x = SetChange{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetChange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetChange) ProtoMessage() {} + +func (x *SetChange) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetChange.ProtoReflect.Descriptor instead. +func (*SetChange) Descriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{12} +} + +func (x *SetChange) GetCuid() string { + if x != nil { + return x.Cuid + } + return "" +} + +func (x *SetChange) GetOp() SetChange_Operation { + if x != nil { + return x.Op + } + return SetChange_CREATE +} + +type SetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Status SetResponseStatus `protobuf:"varint,2,opt,name=Status,proto3,enum=gosdn.pnd.SetResponseStatus" json:"Status,omitempty"` + Responses []*SetResponse `protobuf:"bytes,3,rep,name=responses,proto3" json:"responses,omitempty"` +} + +func (x *SetResponse) Reset() { + *x = SetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetResponse) ProtoMessage() {} + +func (x *SetResponse) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetResponse.ProtoReflect.Descriptor instead. +func (*SetResponse) Descriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{13} +} + +func (x *SetResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *SetResponse) GetStatus() SetResponseStatus { + if x != nil { + return x.Status + } + return SetResponse_OK +} + +func (x *SetResponse) GetResponses() []*SetResponse { + if x != nil { + return x.Responses + } + return nil +} + +type ChangeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + ApiOp ApiOperation `protobuf:"varint,4,opt,name=apiOp,proto3,enum=gosdn.pnd.ApiOperation" json:"apiOp,omitempty"` +} + +func (x *ChangeRequest) Reset() { + *x = ChangeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeRequest) ProtoMessage() {} + +func (x *ChangeRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeRequest.ProtoReflect.Descriptor instead. +func (*ChangeRequest) Descriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{14} +} + +func (x *ChangeRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ChangeRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *ChangeRequest) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *ChangeRequest) GetApiOp() ApiOperation { + if x != nil { + return x.ApiOp + } + return ApiOperation_UPDATE +} + +type DeleteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Type DeleteRequest_Type `protobuf:"varint,2,opt,name=type,proto3,enum=gosdn.pnd.DeleteRequest_Type" json:"type,omitempty"` + Uuid string `protobuf:"bytes,3,opt,name=uuid,proto3" json:"uuid,omitempty"` + Pid string `protobuf:"bytes,4,opt,name=pid,proto3" json:"pid,omitempty"` +} + +func (x *DeleteRequest) Reset() { + *x = DeleteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteRequest) ProtoMessage() {} + +func (x *DeleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead. +func (*DeleteRequest) Descriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{15} +} + +func (x *DeleteRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *DeleteRequest) GetType() DeleteRequest_Type { + if x != nil { + return x.Type + } + return DeleteRequest_OND +} + +func (x *DeleteRequest) GetUuid() string { + if x != nil { + return x.Uuid + } + return "" +} + +func (x *DeleteRequest) GetPid() string { + if x != nil { + return x.Pid + } + return "" +} + +type DeleteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Status DeleteResponseStatus `protobuf:"varint,2,opt,name=Status,proto3,enum=gosdn.pnd.DeleteResponseStatus" json:"Status,omitempty"` +} + +func (x *DeleteResponse) Reset() { + *x = DeleteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteResponse) ProtoMessage() {} + +func (x *DeleteResponse) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_pnd_pnd_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead. +func (*DeleteResponse) Descriptor() ([]byte, []int) { + return file_gosdn_pnd_pnd_proto_rawDescGZIP(), []int{16} +} + +func (x *DeleteResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *DeleteResponse) GetStatus() DeleteResponseStatus { + if x != nil { + return x.Status + } + return DeleteResponse_OK +} + +var File_gosdn_pnd_pnd_proto protoreflect.FileDescriptor + +var file_gosdn_pnd_pnd_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6e, 0x64, 0x2f, 0x70, 0x6e, 0x64, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, + 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, + 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x73, 0x6f, 0x75, + 0x74, 0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xec, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x25, 0x0a, 0x03, 0x70, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x67, + 0x65, 0x74, 0x50, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x03, 0x70, 0x6e, 0x64, 0x12, 0x25, 0x0a, 0x03, + 0x6f, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x73, 0x64, + 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x67, 0x65, 0x74, 0x4f, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x03, + 0x6f, 0x6e, 0x64, 0x12, 0x25, 0x0a, 0x03, 0x73, 0x62, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x67, 0x65, 0x74, + 0x53, 0x62, 0x69, 0x48, 0x00, 0x52, 0x03, 0x73, 0x62, 0x69, 0x12, 0x2e, 0x0a, 0x06, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x67, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x48, 0x00, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, + 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x42, 0x09, 0x0a, 0x07, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x08, 0x0a, 0x06, 0x67, 0x65, 0x74, 0x50, 0x6e, + 0x64, 0x22, 0x2c, 0x0a, 0x06, 0x67, 0x65, 0x74, 0x4f, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x61, + 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, 0x10, 0x0a, + 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x22, + 0x2c, 0x0a, 0x06, 0x67, 0x65, 0x74, 0x53, 0x62, 0x69, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x73, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x73, 0x69, 0x64, 0x22, 0x31, 0x0a, + 0x09, 0x67, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, 0x12, 0x0a, 0x04, + 0x63, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x63, 0x75, 0x69, 0x64, + 0x22, 0xff, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x33, + 0x0a, 0x03, 0x70, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, + 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x03, + 0x70, 0x6e, 0x64, 0x12, 0x39, 0x0a, 0x03, 0x6f, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x4f, 0x72, 0x63, + 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x69, 0x6e, 0x67, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x03, 0x6f, 0x6e, 0x64, 0x12, 0x37, + 0x0a, 0x03, 0x73, 0x62, 0x69, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x53, + 0x6f, 0x75, 0x74, 0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x52, 0x03, 0x73, 0x62, 0x69, 0x12, 0x29, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, + 0x70, 0x6e, 0x64, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x22, 0xfd, 0x01, 0x0a, 0x16, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x03, 0x6f, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x4f, 0x72, 0x63, + 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x69, 0x6e, 0x67, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x03, 0x6f, 0x6e, 0x64, 0x12, 0x37, + 0x0a, 0x03, 0x73, 0x62, 0x69, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x53, + 0x6f, 0x75, 0x74, 0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x52, 0x03, 0x73, 0x62, 0x69, 0x12, 0x29, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, + 0x70, 0x6e, 0x64, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x1c, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x4e, + 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x64, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x03, 0x73, 0x62, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x2e, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, 0x03, 0x73, 0x62, 0x69, 0x22, 0x8d, 0x01, 0x0a, + 0x06, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, + 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x32, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x0d, + 0x0a, 0x09, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, + 0x09, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x02, 0x22, 0xf4, 0x01, 0x0a, + 0x0a, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x23, 0x0a, 0x03, 0x6f, 0x6e, 0x64, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, + 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x74, 0x4f, 0x6e, 0x64, 0x52, 0x03, 0x6f, 0x6e, 0x64, 0x12, 0x23, + 0x0a, 0x03, 0x73, 0x62, 0x69, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x74, 0x53, 0x62, 0x69, 0x52, 0x03, + 0x73, 0x62, 0x69, 0x12, 0x2c, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, + 0x73, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, + 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x52, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x70, 0x69, 0x64, 0x22, 0xc7, 0x01, 0x0a, 0x06, 0x73, 0x65, 0x74, 0x4f, 0x6e, 0x64, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x37, 0x0a, 0x03, 0x73, 0x62, 0x69, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x73, 0x6f, + 0x75, 0x74, 0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, 0x03, 0x73, 0x62, + 0x69, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x08, 0x0a, + 0x06, 0x73, 0x65, 0x74, 0x53, 0x62, 0x69, 0x22, 0x81, 0x01, 0x0a, 0x09, 0x73, 0x65, 0x74, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x75, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x02, 0x6f, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, + 0x64, 0x2e, 0x73, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x6f, 0x70, 0x22, 0x30, 0x0a, 0x09, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, + 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x01, 0x12, 0x0b, + 0x0a, 0x07, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x10, 0x02, 0x22, 0xb5, 0x01, 0x0a, 0x0b, + 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x35, 0x0a, 0x06, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, + 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, + 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x1b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, + 0x52, 0x10, 0x01, 0x22, 0x78, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2d, + 0x0a, 0x05, 0x61, 0x70, 0x69, 0x4f, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, + 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x41, 0x70, 0x69, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x61, 0x70, 0x69, 0x4f, 0x70, 0x22, 0xa9, 0x01, + 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x31, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x75, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x21, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, + 0x0a, 0x03, 0x4f, 0x4e, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x42, 0x49, 0x10, 0x01, + 0x12, 0x07, 0x0a, 0x03, 0x50, 0x4e, 0x44, 0x10, 0x02, 0x22, 0x85, 0x01, 0x0a, 0x0e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x38, 0x0a, 0x06, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x22, 0x1b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x06, + 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, + 0x01, 0x2a, 0x33, 0x0a, 0x0c, 0x41, 0x70, 0x69, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, + 0x07, 0x52, 0x45, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, + 0x4c, 0x45, 0x54, 0x45, 0x10, 0x02, 0x32, 0xb0, 0x01, 0x0a, 0x03, 0x70, 0x6e, 0x64, 0x12, 0x34, + 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x15, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, + 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x03, 0x53, 0x65, 0x74, 0x12, 0x15, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x53, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x12, 0x18, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, + 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6e, 0x64, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x29, 0x5a, 0x27, 0x63, 0x6f, 0x64, + 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x63, 0x6f, + 0x63, 0x73, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, + 0x2f, 0x70, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_gosdn_pnd_pnd_proto_rawDescOnce sync.Once + file_gosdn_pnd_pnd_proto_rawDescData = file_gosdn_pnd_pnd_proto_rawDesc +) + +func file_gosdn_pnd_pnd_proto_rawDescGZIP() []byte { + file_gosdn_pnd_pnd_proto_rawDescOnce.Do(func() { + file_gosdn_pnd_pnd_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_pnd_pnd_proto_rawDescData) + }) + return file_gosdn_pnd_pnd_proto_rawDescData +} + +var file_gosdn_pnd_pnd_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_gosdn_pnd_pnd_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_gosdn_pnd_pnd_proto_goTypes = []interface{}{ + (ApiOperation)(0), // 0: gosdn.pnd.ApiOperation + (Change_State)(0), // 1: gosdn.pnd.Change.State + (SetChange_Operation)(0), // 2: gosdn.pnd.setChange.Operation + (SetResponseStatus)(0), // 3: gosdn.pnd.SetResponse.status + (DeleteRequest_Type)(0), // 4: gosdn.pnd.DeleteRequest.Type + (DeleteResponseStatus)(0), // 5: gosdn.pnd.DeleteResponse.status + (*GetRequest)(nil), // 6: gosdn.pnd.GetRequest + (*GetPnd)(nil), // 7: gosdn.pnd.getPnd + (*GetOnd)(nil), // 8: gosdn.pnd.getOnd + (*GetSbi)(nil), // 9: gosdn.pnd.getSbi + (*GetChange)(nil), // 10: gosdn.pnd.getChange + (*GetResponse)(nil), // 11: gosdn.pnd.GetResponse + (*PrincipalNetworkDomain)(nil), // 12: gosdn.pnd.PrincipalNetworkDomain + (*OrchestratedNetworkingDevice)(nil), // 13: gosdn.pnd.OrchestratedNetworkingDevice + (*Change)(nil), // 14: gosdn.pnd.Change + (*SetRequest)(nil), // 15: gosdn.pnd.SetRequest + (*SetOnd)(nil), // 16: gosdn.pnd.setOnd + (*SetSbi)(nil), // 17: gosdn.pnd.setSbi + (*SetChange)(nil), // 18: gosdn.pnd.setChange + (*SetResponse)(nil), // 19: gosdn.pnd.SetResponse + (*ChangeRequest)(nil), // 20: gosdn.pnd.ChangeRequest + (*DeleteRequest)(nil), // 21: gosdn.pnd.DeleteRequest + (*DeleteResponse)(nil), // 22: gosdn.pnd.DeleteResponse + (*southbound.SouthboundInterface)(nil), // 23: gosdn.southbound.SouthboundInterface + (*gnmi.Notification)(nil), // 24: gnmi.Notification + (*transport.TransportOption)(nil), // 25: gosdn.transport.TransportOption +} +var file_gosdn_pnd_pnd_proto_depIdxs = []int32{ + 7, // 0: gosdn.pnd.GetRequest.pnd:type_name -> gosdn.pnd.getPnd + 8, // 1: gosdn.pnd.GetRequest.ond:type_name -> gosdn.pnd.getOnd + 9, // 2: gosdn.pnd.GetRequest.sbi:type_name -> gosdn.pnd.getSbi + 10, // 3: gosdn.pnd.GetRequest.change:type_name -> gosdn.pnd.getChange + 12, // 4: gosdn.pnd.GetResponse.pnd:type_name -> gosdn.pnd.PrincipalNetworkDomain + 13, // 5: gosdn.pnd.GetResponse.ond:type_name -> gosdn.pnd.OrchestratedNetworkingDevice + 23, // 6: gosdn.pnd.GetResponse.sbi:type_name -> gosdn.southbound.SouthboundInterface + 14, // 7: gosdn.pnd.GetResponse.change:type_name -> gosdn.pnd.Change + 13, // 8: gosdn.pnd.PrincipalNetworkDomain.ond:type_name -> gosdn.pnd.OrchestratedNetworkingDevice + 23, // 9: gosdn.pnd.PrincipalNetworkDomain.sbi:type_name -> gosdn.southbound.SouthboundInterface + 14, // 10: gosdn.pnd.PrincipalNetworkDomain.change:type_name -> gosdn.pnd.Change + 24, // 11: gosdn.pnd.OrchestratedNetworkingDevice.device:type_name -> gnmi.Notification + 23, // 12: gosdn.pnd.OrchestratedNetworkingDevice.sbi:type_name -> gosdn.southbound.SouthboundInterface + 1, // 13: gosdn.pnd.Change.state:type_name -> gosdn.pnd.Change.State + 16, // 14: gosdn.pnd.SetRequest.ond:type_name -> gosdn.pnd.setOnd + 17, // 15: gosdn.pnd.SetRequest.sbi:type_name -> gosdn.pnd.setSbi + 18, // 16: gosdn.pnd.SetRequest.change:type_name -> gosdn.pnd.setChange + 20, // 17: gosdn.pnd.SetRequest.changeRequest:type_name -> gosdn.pnd.ChangeRequest + 23, // 18: gosdn.pnd.setOnd.sbi:type_name -> gosdn.southbound.SouthboundInterface + 25, // 19: gosdn.pnd.setOnd.transportOption:type_name -> gosdn.transport.TransportOption + 2, // 20: gosdn.pnd.setChange.op:type_name -> gosdn.pnd.setChange.Operation + 3, // 21: gosdn.pnd.SetResponse.Status:type_name -> gosdn.pnd.SetResponse.status + 19, // 22: gosdn.pnd.SetResponse.responses:type_name -> gosdn.pnd.SetResponse + 0, // 23: gosdn.pnd.ChangeRequest.apiOp:type_name -> gosdn.pnd.ApiOperation + 4, // 24: gosdn.pnd.DeleteRequest.type:type_name -> gosdn.pnd.DeleteRequest.Type + 5, // 25: gosdn.pnd.DeleteResponse.Status:type_name -> gosdn.pnd.DeleteResponse.status + 6, // 26: gosdn.pnd.pnd.Get:input_type -> gosdn.pnd.GetRequest + 15, // 27: gosdn.pnd.pnd.Set:input_type -> gosdn.pnd.SetRequest + 21, // 28: gosdn.pnd.pnd.Delete:input_type -> gosdn.pnd.DeleteRequest + 11, // 29: gosdn.pnd.pnd.Get:output_type -> gosdn.pnd.GetResponse + 19, // 30: gosdn.pnd.pnd.Set:output_type -> gosdn.pnd.SetResponse + 22, // 31: gosdn.pnd.pnd.Delete:output_type -> gosdn.pnd.DeleteResponse + 29, // [29:32] is the sub-list for method output_type + 26, // [26:29] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name +} + +func init() { file_gosdn_pnd_pnd_proto_init() } +func file_gosdn_pnd_pnd_proto_init() { + if File_gosdn_pnd_pnd_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_gosdn_pnd_pnd_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_pnd_pnd_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPnd); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_pnd_pnd_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOnd); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_pnd_pnd_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSbi); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_pnd_pnd_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetChange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_pnd_pnd_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_pnd_pnd_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrincipalNetworkDomain); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_pnd_pnd_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrchestratedNetworkingDevice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_pnd_pnd_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Change); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_pnd_pnd_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_pnd_pnd_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetOnd); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_pnd_pnd_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetSbi); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_pnd_pnd_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetChange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_pnd_pnd_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_pnd_pnd_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChangeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_pnd_pnd_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_pnd_pnd_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_gosdn_pnd_pnd_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*GetRequest_Pnd)(nil), + (*GetRequest_Ond)(nil), + (*GetRequest_Sbi)(nil), + (*GetRequest_Change)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_gosdn_pnd_pnd_proto_rawDesc, + NumEnums: 6, + NumMessages: 17, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_gosdn_pnd_pnd_proto_goTypes, + DependencyIndexes: file_gosdn_pnd_pnd_proto_depIdxs, + EnumInfos: file_gosdn_pnd_pnd_proto_enumTypes, + MessageInfos: file_gosdn_pnd_pnd_proto_msgTypes, + }.Build() + File_gosdn_pnd_pnd_proto = out.File + file_gosdn_pnd_pnd_proto_rawDesc = nil + file_gosdn_pnd_pnd_proto_goTypes = nil + file_gosdn_pnd_pnd_proto_depIdxs = nil +} diff --git a/go/gosdn/pnd/pnd_grpc.pb.go b/go/gosdn/pnd/pnd_grpc.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..edfb8e5cf6c746a774eae0ad8cc50f855dd810ee --- /dev/null +++ b/go/gosdn/pnd/pnd_grpc.pb.go @@ -0,0 +1,162 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package pnd + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// PndClient is the client API for Pnd service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type PndClient interface { + Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) + Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error) + Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) +} + +type pndClient struct { + cc grpc.ClientConnInterface +} + +func NewPndClient(cc grpc.ClientConnInterface) PndClient { + return &pndClient{cc} +} + +func (c *pndClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) { + out := new(GetResponse) + err := c.cc.Invoke(ctx, "/gosdn.pnd.pnd/Get", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pndClient) Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error) { + out := new(SetResponse) + err := c.cc.Invoke(ctx, "/gosdn.pnd.pnd/Set", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pndClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) { + out := new(DeleteResponse) + err := c.cc.Invoke(ctx, "/gosdn.pnd.pnd/Delete", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PndServer is the server API for Pnd service. +// All implementations must embed UnimplementedPndServer +// for forward compatibility +type PndServer interface { + Get(context.Context, *GetRequest) (*GetResponse, error) + Set(context.Context, *SetRequest) (*SetResponse, error) + Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) + mustEmbedUnimplementedPndServer() +} + +// UnimplementedPndServer must be embedded to have forward compatible implementations. +type UnimplementedPndServer struct { +} + +func (*UnimplementedPndServer) Get(context.Context, *GetRequest) (*GetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (*UnimplementedPndServer) Set(context.Context, *SetRequest) (*SetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Set not implemented") +} +func (*UnimplementedPndServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (*UnimplementedPndServer) mustEmbedUnimplementedPndServer() {} + +func RegisterPndServer(s *grpc.Server, srv PndServer) { + s.RegisterService(&_Pnd_serviceDesc, srv) +} + +func _Pnd_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PndServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gosdn.pnd.pnd/Get", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PndServer).Get(ctx, req.(*GetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Pnd_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PndServer).Set(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gosdn.pnd.pnd/Set", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PndServer).Set(ctx, req.(*SetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Pnd_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PndServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gosdn.pnd.pnd/Delete", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PndServer).Delete(ctx, req.(*DeleteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Pnd_serviceDesc = grpc.ServiceDesc{ + ServiceName: "gosdn.pnd.pnd", + HandlerType: (*PndServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _Pnd_Get_Handler, + }, + { + MethodName: "Set", + Handler: _Pnd_Set_Handler, + }, + { + MethodName: "Delete", + Handler: _Pnd_Delete_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "gosdn/pnd/pnd.proto", +} diff --git a/go/gosdn/southbound/southbound.pb.go b/go/gosdn/southbound/southbound.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..73e17e806a6fa0ab3dd920c35b15e70ff2fc52e5 --- /dev/null +++ b/go/gosdn/southbound/southbound.pb.go @@ -0,0 +1,212 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.17.2 +// source: gosdn/southbound/southbound.proto + +package southbound + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Type int32 + +const ( + Type_OPENCONFIG Type = 0 + Type_CONTAINERISED Type = 1 +) + +// Enum value maps for Type. +var ( + Type_name = map[int32]string{ + 0: "OPENCONFIG", + 1: "CONTAINERISED", + } + Type_value = map[string]int32{ + "OPENCONFIG": 0, + "CONTAINERISED": 1, + } +) + +func (x Type) Enum() *Type { + p := new(Type) + *p = x + return p +} + +func (x Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Type) Descriptor() protoreflect.EnumDescriptor { + return file_gosdn_southbound_southbound_proto_enumTypes[0].Descriptor() +} + +func (Type) Type() protoreflect.EnumType { + return &file_gosdn_southbound_southbound_proto_enumTypes[0] +} + +func (x Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Type.Descriptor instead. +func (Type) EnumDescriptor() ([]byte, []int) { + return file_gosdn_southbound_southbound_proto_rawDescGZIP(), []int{0} +} + +type SouthboundInterface struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Type Type `protobuf:"varint,2,opt,name=type,proto3,enum=gosdn.southbound.Type" json:"type,omitempty"` +} + +func (x *SouthboundInterface) Reset() { + *x = SouthboundInterface{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_southbound_southbound_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SouthboundInterface) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SouthboundInterface) ProtoMessage() {} + +func (x *SouthboundInterface) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_southbound_southbound_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SouthboundInterface.ProtoReflect.Descriptor instead. +func (*SouthboundInterface) Descriptor() ([]byte, []int) { + return file_gosdn_southbound_southbound_proto_rawDescGZIP(), []int{0} +} + +func (x *SouthboundInterface) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *SouthboundInterface) GetType() Type { + if x != nil { + return x.Type + } + return Type_OPENCONFIG +} + +var File_gosdn_southbound_southbound_proto protoreflect.FileDescriptor + +var file_gosdn_southbound_southbound_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x2f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x73, 0x6f, 0x75, 0x74, 0x68, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x51, 0x0a, 0x13, 0x53, 0x6f, 0x75, 0x74, 0x68, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2a, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x67, + 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x2e, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x2a, 0x29, 0x0a, 0x04, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x45, 0x4e, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, + 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x49, + 0x53, 0x45, 0x44, 0x10, 0x01, 0x42, 0x30, 0x5a, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, + 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x63, 0x6f, 0x63, 0x73, 0x6e, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x73, 0x6f, 0x75, + 0x74, 0x68, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_gosdn_southbound_southbound_proto_rawDescOnce sync.Once + file_gosdn_southbound_southbound_proto_rawDescData = file_gosdn_southbound_southbound_proto_rawDesc +) + +func file_gosdn_southbound_southbound_proto_rawDescGZIP() []byte { + file_gosdn_southbound_southbound_proto_rawDescOnce.Do(func() { + file_gosdn_southbound_southbound_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_southbound_southbound_proto_rawDescData) + }) + return file_gosdn_southbound_southbound_proto_rawDescData +} + +var file_gosdn_southbound_southbound_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_gosdn_southbound_southbound_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_gosdn_southbound_southbound_proto_goTypes = []interface{}{ + (Type)(0), // 0: gosdn.southbound.Type + (*SouthboundInterface)(nil), // 1: gosdn.southbound.SouthboundInterface +} +var file_gosdn_southbound_southbound_proto_depIdxs = []int32{ + 0, // 0: gosdn.southbound.SouthboundInterface.type:type_name -> gosdn.southbound.Type + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_gosdn_southbound_southbound_proto_init() } +func file_gosdn_southbound_southbound_proto_init() { + if File_gosdn_southbound_southbound_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_gosdn_southbound_southbound_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SouthboundInterface); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_gosdn_southbound_southbound_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_gosdn_southbound_southbound_proto_goTypes, + DependencyIndexes: file_gosdn_southbound_southbound_proto_depIdxs, + EnumInfos: file_gosdn_southbound_southbound_proto_enumTypes, + MessageInfos: file_gosdn_southbound_southbound_proto_msgTypes, + }.Build() + File_gosdn_southbound_southbound_proto = out.File + file_gosdn_southbound_southbound_proto_rawDesc = nil + file_gosdn_southbound_southbound_proto_goTypes = nil + file_gosdn_southbound_southbound_proto_depIdxs = nil +} diff --git a/go/gosdn/transport/transport.pb.go b/go/gosdn/transport/transport.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..72b13694dd38c4fdbaf50d5db207ffb1210dbe80 --- /dev/null +++ b/go/gosdn/transport/transport.pb.go @@ -0,0 +1,410 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.17.2 +// source: gosdn/transport/transport.proto + +package transport + +import ( + gnmi "github.com/openconfig/gnmi/proto/gnmi" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type TransportOption struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` + Tls bool `protobuf:"varint,4,opt,name=tls,proto3" json:"tls,omitempty"` + // Types that are assignable to TransportOption: + // *TransportOption_GnmiTransportOption + // *TransportOption_RestconfTransportOption + TransportOption isTransportOption_TransportOption `protobuf_oneof:"transportOption"` + Csbi bool `protobuf:"varint,7,opt,name=csbi,proto3" json:"csbi,omitempty"` +} + +func (x *TransportOption) Reset() { + *x = TransportOption{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_transport_transport_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransportOption) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransportOption) ProtoMessage() {} + +func (x *TransportOption) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_transport_transport_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransportOption.ProtoReflect.Descriptor instead. +func (*TransportOption) Descriptor() ([]byte, []int) { + return file_gosdn_transport_transport_proto_rawDescGZIP(), []int{0} +} + +func (x *TransportOption) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *TransportOption) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *TransportOption) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *TransportOption) GetTls() bool { + if x != nil { + return x.Tls + } + return false +} + +func (m *TransportOption) GetTransportOption() isTransportOption_TransportOption { + if m != nil { + return m.TransportOption + } + return nil +} + +func (x *TransportOption) GetGnmiTransportOption() *GnmiTransportOption { + if x, ok := x.GetTransportOption().(*TransportOption_GnmiTransportOption); ok { + return x.GnmiTransportOption + } + return nil +} + +func (x *TransportOption) GetRestconfTransportOption() *RestconfTransportOption { + if x, ok := x.GetTransportOption().(*TransportOption_RestconfTransportOption); ok { + return x.RestconfTransportOption + } + return nil +} + +func (x *TransportOption) GetCsbi() bool { + if x != nil { + return x.Csbi + } + return false +} + +type isTransportOption_TransportOption interface { + isTransportOption_TransportOption() +} + +type TransportOption_GnmiTransportOption struct { + GnmiTransportOption *GnmiTransportOption `protobuf:"bytes,5,opt,name=GnmiTransportOption,proto3,oneof"` +} + +type TransportOption_RestconfTransportOption struct { + RestconfTransportOption *RestconfTransportOption `protobuf:"bytes,6,opt,name=RestconfTransportOption,proto3,oneof"` +} + +func (*TransportOption_GnmiTransportOption) isTransportOption_TransportOption() {} + +func (*TransportOption_RestconfTransportOption) isTransportOption_TransportOption() {} + +type GnmiTransportOption struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Compression string `protobuf:"bytes,1,opt,name=compression,proto3" json:"compression,omitempty"` + GrpcDialOptions map[string]string `protobuf:"bytes,2,rep,name=grpcDialOptions,proto3" json:"grpcDialOptions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` + Encoding gnmi.Encoding `protobuf:"varint,4,opt,name=encoding,proto3,enum=gnmi.Encoding" json:"encoding,omitempty"` +} + +func (x *GnmiTransportOption) Reset() { + *x = GnmiTransportOption{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_transport_transport_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GnmiTransportOption) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GnmiTransportOption) ProtoMessage() {} + +func (x *GnmiTransportOption) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_transport_transport_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GnmiTransportOption.ProtoReflect.Descriptor instead. +func (*GnmiTransportOption) Descriptor() ([]byte, []int) { + return file_gosdn_transport_transport_proto_rawDescGZIP(), []int{1} +} + +func (x *GnmiTransportOption) GetCompression() string { + if x != nil { + return x.Compression + } + return "" +} + +func (x *GnmiTransportOption) GetGrpcDialOptions() map[string]string { + if x != nil { + return x.GrpcDialOptions + } + return nil +} + +func (x *GnmiTransportOption) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *GnmiTransportOption) GetEncoding() gnmi.Encoding { + if x != nil { + return x.Encoding + } + return gnmi.Encoding_JSON +} + +type RestconfTransportOption struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RestconfTransportOption) Reset() { + *x = RestconfTransportOption{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_transport_transport_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RestconfTransportOption) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RestconfTransportOption) ProtoMessage() {} + +func (x *RestconfTransportOption) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_transport_transport_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RestconfTransportOption.ProtoReflect.Descriptor instead. +func (*RestconfTransportOption) Descriptor() ([]byte, []int) { + return file_gosdn_transport_transport_proto_rawDescGZIP(), []int{2} +} + +var File_gosdn_transport_transport_proto protoreflect.FileDescriptor + +var file_gosdn_transport_transport_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x6e, 0x6d, 0x69, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x67, 0x6e, 0x6d, 0x69, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdc, 0x02, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, + 0x74, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x12, 0x58, + 0x0a, 0x13, 0x47, 0x6e, 0x6d, 0x69, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x47, 0x6e, + 0x6d, 0x69, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x48, 0x00, 0x52, 0x13, 0x47, 0x6e, 0x6d, 0x69, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x64, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x74, + 0x63, 0x6f, 0x6e, 0x66, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x73, 0x64, + 0x6e, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x74, + 0x63, 0x6f, 0x6e, 0x66, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x17, 0x52, 0x65, 0x73, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, + 0x0a, 0x04, 0x63, 0x73, 0x62, 0x69, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x63, 0x73, + 0x62, 0x69, 0x42, 0x11, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa2, 0x02, 0x0a, 0x13, 0x47, 0x6e, 0x6d, 0x69, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, + 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x63, 0x0a, 0x0f, 0x67, 0x72, 0x70, 0x63, 0x44, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, + 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x47, 0x6e, 0x6d, 0x69, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, + 0x72, 0x70, 0x63, 0x44, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0f, 0x67, 0x72, 0x70, 0x63, 0x44, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2a, 0x0a, 0x08, 0x65, 0x6e, + 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x67, + 0x6e, 0x6d, 0x69, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x65, 0x6e, + 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x1a, 0x42, 0x0a, 0x14, 0x47, 0x72, 0x70, 0x63, 0x44, 0x69, + 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x65, + 0x73, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x2f, 0x5a, 0x2d, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, + 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x63, 0x6f, 0x63, 0x73, 0x6e, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_gosdn_transport_transport_proto_rawDescOnce sync.Once + file_gosdn_transport_transport_proto_rawDescData = file_gosdn_transport_transport_proto_rawDesc +) + +func file_gosdn_transport_transport_proto_rawDescGZIP() []byte { + file_gosdn_transport_transport_proto_rawDescOnce.Do(func() { + file_gosdn_transport_transport_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_transport_transport_proto_rawDescData) + }) + return file_gosdn_transport_transport_proto_rawDescData +} + +var file_gosdn_transport_transport_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_gosdn_transport_transport_proto_goTypes = []interface{}{ + (*TransportOption)(nil), // 0: gosdn.transport.TransportOption + (*GnmiTransportOption)(nil), // 1: gosdn.transport.GnmiTransportOption + (*RestconfTransportOption)(nil), // 2: gosdn.transport.RestconfTransportOption + nil, // 3: gosdn.transport.GnmiTransportOption.GrpcDialOptionsEntry + (gnmi.Encoding)(0), // 4: gnmi.Encoding +} +var file_gosdn_transport_transport_proto_depIdxs = []int32{ + 1, // 0: gosdn.transport.TransportOption.GnmiTransportOption:type_name -> gosdn.transport.GnmiTransportOption + 2, // 1: gosdn.transport.TransportOption.RestconfTransportOption:type_name -> gosdn.transport.RestconfTransportOption + 3, // 2: gosdn.transport.GnmiTransportOption.grpcDialOptions:type_name -> gosdn.transport.GnmiTransportOption.GrpcDialOptionsEntry + 4, // 3: gosdn.transport.GnmiTransportOption.encoding:type_name -> gnmi.Encoding + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_gosdn_transport_transport_proto_init() } +func file_gosdn_transport_transport_proto_init() { + if File_gosdn_transport_transport_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_gosdn_transport_transport_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransportOption); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_transport_transport_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GnmiTransportOption); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_transport_transport_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RestconfTransportOption); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_gosdn_transport_transport_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*TransportOption_GnmiTransportOption)(nil), + (*TransportOption_RestconfTransportOption)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_gosdn_transport_transport_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_gosdn_transport_transport_proto_goTypes, + DependencyIndexes: file_gosdn_transport_transport_proto_depIdxs, + MessageInfos: file_gosdn_transport_transport_proto_msgTypes, + }.Build() + File_gosdn_transport_transport_proto = out.File + file_gosdn_transport_transport_proto_rawDesc = nil + file_gosdn_transport_transport_proto_goTypes = nil + file_gosdn_transport_transport_proto_depIdxs = nil +} diff --git a/gogen.go b/gogen.go new file mode 100644 index 0000000000000000000000000000000000000000..ed3771bd667ed022f3ca1e4cfb20049863d59834 --- /dev/null +++ b/gogen.go @@ -0,0 +1,3 @@ +// go:generate protoc --proto_path=./proto --go_out=./go --go-grpc_out=./go --go-grpc_opt=paths=source_relative --go_opt=paths=source_relative --proto_path=/Users/mk/go/src ./proto/gosdn/pnd/pnd.proto ./proto/gosdn/core/core.proto + +package api \ No newline at end of file diff --git a/proto/gosdn/core/core.proto b/proto/gosdn/core/core.proto new file mode 100644 index 0000000000000000000000000000000000000000..54db20c35f6ab7ffcce4721ce588307a139bef8c --- /dev/null +++ b/proto/gosdn/core/core.proto @@ -0,0 +1,41 @@ +syntax = "proto3"; + +package gosdn.core; + +import "gosdn/pnd/pnd.proto"; + +option go_package = "code.fbi.h-da.de/cocsn/api/go/gosdn/core"; + +service core { + rpc Get(GetRequest) returns (GetResponse); + rpc Set(SetRequest) returns (SetResponse); +} + +message GetRequest { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + bool all = 2; + repeated string pid = 3; +} +message GetResponse { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + repeated .gosdn.pnd.PrincipalNetworkDomain pnd = 2; +} +message SetRequest { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + repeated setPnd pnd = 2; +} + +message setPnd { + string name = 1; + string description = 2; + string sbi = 3; +} + +message SetResponse { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + enum status { + OK = 0; + ERROR = 1; + } + status Status = 2; +} diff --git a/proto/gosdn/csbi/csbi.proto b/proto/gosdn/csbi/csbi.proto new file mode 100644 index 0000000000000000000000000000000000000000..fe32f48d5896abd18ed413d3297ed43a27c5181b --- /dev/null +++ b/proto/gosdn/csbi/csbi.proto @@ -0,0 +1,74 @@ +syntax = "proto3"; + +package gosdn.csbi; + +import "gosdn/transport/transport.proto"; + +option go_package = "code.fbi.h-da.de/cocsn/api/go/gosdn/csbi"; + +service csbi { + rpc Get(GetRequest) returns (GetResponse); + rpc Create(CreateRequest) returns (CreateResponse); + rpc Delete(DeleteRequest) returns (DeleteResponse); + rpc Hello(Syn) returns (Ack); +} + +message Syn { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + string id = 2; + string address = 3; +} + +message Ack { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + .gosdn.transport.TransportOption TransportOption = 2; +} + +message GetRequest { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + bool all = 2; + repeated string did = 3; +} + +message GetResponse { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + repeated Deployment deployments = 2; +} + +message Deployment { + string id = 1; + string name = 2; + State state = 3; +} + +enum State { + ANNOUNCED = 0; + BUILT = 1; + DEPLOYED = 2; + RUNNING = 3; + DECOMMISSIONED = 4; +} + +message CreateRequest { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + repeated .gosdn.transport.TransportOption TransportOption = 2; +} + +message CreateResponse { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + repeated Deployment deployments = 2; +} + +message DeleteRequest { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + repeated string did = 2; +} + +message DeleteResponse { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + enum status { + OK = 0; + ERROR = 1; + } + status Status = 2; +} diff --git a/proto/gosdn/pnd/pnd.proto b/proto/gosdn/pnd/pnd.proto new file mode 100644 index 0000000000000000000000000000000000000000..8c864370a2b6a77dfcb55e5a0928468bbca6c00a --- /dev/null +++ b/proto/gosdn/pnd/pnd.proto @@ -0,0 +1,153 @@ +syntax = "proto3"; + +package gosdn.pnd; + +import "google/protobuf/descriptor.proto"; +import "github.com/openconfig/gnmi/proto/gnmi/gnmi.proto"; +import "gosdn/transport/transport.proto"; +import "gosdn/southbound/southbound.proto"; + +option go_package = "code.fbi.h-da.de/cocsn/api/go/gosdn/pnd"; + +service pnd { + rpc Get(GetRequest) returns (GetResponse); + rpc Set(SetRequest) returns (SetResponse); + rpc Delete(DeleteRequest) returns (DeleteResponse); +} + +message GetRequest { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + oneof request { + getPnd pnd = 2; + getOnd ond = 3; + getSbi sbi = 4; + getChange change = 5; + } + string pid = 6; +} + +message getPnd {} + +message getOnd { + bool all = 1; + repeated string did = 2; +} + +message getSbi { + bool all = 1; + repeated string sid = 2; +} + +message getChange { + bool all = 1; + repeated string cuid = 2; +} + +message GetResponse { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + PrincipalNetworkDomain pnd = 2; + repeated OrchestratedNetworkingDevice ond = 3; + repeated .gosdn.southbound.SouthboundInterface sbi = 5; + repeated Change change = 7; +} + +message PrincipalNetworkDomain { + string id = 1; + string name = 2; + string description = 3; + repeated OrchestratedNetworkingDevice ond = 4; + repeated .gosdn.southbound.SouthboundInterface sbi = 5; + repeated Change change = 6; +} + +message OrchestratedNetworkingDevice { + string id = 1; + string name = 2; + repeated gnmi.Notification device = 3; + .gosdn.southbound.SouthboundInterface sbi = 4; +} + +message Change { + string id = 1; + int64 age = 2; + enum State { + PENDING = 0; + COMMITTED = 1; + CONFIRMED = 2; + } + State state = 3; +} + +message SetRequest { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + repeated setOnd ond = 2; + repeated setSbi sbi = 3; + repeated setChange change = 4; + repeated ChangeRequest changeRequest = 5; + string pid = 6; +} + +message setOnd { + string address = 1; + .gosdn.southbound.SouthboundInterface sbi = 2; + string deviceName = 3; + .gosdn.transport.TransportOption transportOption = 4; +} + +message setSbi { + +} + +message setChange { + enum Operation { + CREATE = 0; + COMMIT = 1; + CONFIRM = 2; + } + string cuid = 1; + Operation op = 2; +} + +message SetResponse{ + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + enum status { + OK = 0; + ERROR = 1; + } + status Status = 2; + repeated SetResponse responses = 3; +} + +message ChangeRequest { + string id = 1; + string path = 2; + string value = 3; + ApiOperation apiOp = 4; +} + +enum ApiOperation { + UPDATE = 0; + REPLACE = 1; + DELETE = 2; +} + +message DeleteRequest { + enum Type { + OND = 0; + SBI = 1; + PND = 2; + } + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + Type type = 2; + string uuid = 3; + string pid = 4; +} + +message DeleteResponse { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + enum status { + OK = 0; + ERROR = 1; + } + status Status = 2; +} diff --git a/proto/gosdn/southbound/southbound.proto b/proto/gosdn/southbound/southbound.proto new file mode 100644 index 0000000000000000000000000000000000000000..079f1cf1645310c5bd1cfc7f574f70af9de12be3 --- /dev/null +++ b/proto/gosdn/southbound/southbound.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +package gosdn.southbound; + +import "google/protobuf/descriptor.proto"; + +option go_package = "code.fbi.h-da.de/cocsn/api/go/gosdn/southbound"; + + +message SouthboundInterface { + string id = 1; + Type type = 2; +} + +enum Type { + OPENCONFIG = 0; + CONTAINERISED = 1; +} diff --git a/proto/gosdn/transport/transport.proto b/proto/gosdn/transport/transport.proto new file mode 100644 index 0000000000000000000000000000000000000000..b3319f87dda2cf26123a151075e3a3535b0974cd --- /dev/null +++ b/proto/gosdn/transport/transport.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; + +package gosdn.transport; + +import "google/protobuf/descriptor.proto"; +import "github.com/openconfig/gnmi/proto/gnmi/gnmi.proto"; + +option go_package = "code.fbi.h-da.de/cocsn/api/go/gosdn/transport"; + +message TransportOption { + string address = 1; + string username = 2; + string password = 3; + bool tls = 4; + oneof transportOption { + GnmiTransportOption GnmiTransportOption = 5; + RestconfTransportOption RestconfTransportOption = 6; + } + bool csbi = 7; +} + +message GnmiTransportOption { + string compression = 1; + map<string,string> grpcDialOptions = 2; + string token = 3; + gnmi.Encoding encoding = 4; +} + +message RestconfTransportOption { + +} \ No newline at end of file