Skip to content
Snippets Groups Projects
Commit c65e5b03 authored by Manuel Kieweg's avatar Manuel Kieweg
Browse files

merge

parents 748f66e8 506dfc22
No related branches found
No related tags found
No related merge requests found
Showing with 4954 additions and 0 deletions
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
)
go/go.sum 0 → 100644
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=
// 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
}
// 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",
}
This diff is collapsed.
// 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",
}
This diff is collapsed.
// 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",
}
// 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
}
// 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
}
// 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
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;
}
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;
}
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;
}
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;
}
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment