diff --git a/.cobra.yaml b/.cobra.yaml old mode 100644 new mode 100755 diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile old mode 100644 new mode 100755 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json old mode 100644 new mode 100755 diff --git a/.dockerignore b/.dockerignore old mode 100644 new mode 100755 diff --git a/.editorconfig b/.editorconfig old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml old mode 100644 new mode 100755 diff --git a/.gitlab/ci/.build-binaries.yml b/.gitlab/ci/.build-binaries.yml old mode 100644 new mode 100755 diff --git a/.gitlab/ci/.build-container-images.yml b/.gitlab/ci/.build-container-images.yml old mode 100644 new mode 100755 diff --git a/.gitlab/ci/.code-quality-ci.yml b/.gitlab/ci/.code-quality-ci.yml old mode 100644 new mode 100755 diff --git a/.gitlab/ci/.mk-docs-deploy.yml b/.gitlab/ci/.mk-docs-deploy.yml old mode 100644 new mode 100755 diff --git a/.gitlab/ci/.react-ui.yml b/.gitlab/ci/.react-ui.yml new file mode 100755 index 0000000000000000000000000000000000000000..873b694c892b39870eb60ad629f836055089734b --- /dev/null +++ b/.gitlab/ci/.react-ui.yml @@ -0,0 +1,3 @@ +build-react-ui: + stage: build + \ No newline at end of file diff --git a/.gitlab/ci/.release-container.yml b/.gitlab/ci/.release-container.yml old mode 100644 new mode 100755 diff --git a/.gitlab/ci/.renovate.yml b/.gitlab/ci/.renovate.yml old mode 100644 new mode 100755 diff --git a/.gitlab/ci/.security-and-compliance-ci.yml b/.gitlab/ci/.security-and-compliance-ci.yml old mode 100644 new mode 100755 diff --git a/.gitlab/ci/.test.yml b/.gitlab/ci/.test.yml old mode 100644 new mode 100755 diff --git a/.gitlab/ci/gnmi-cert-integration.Dockerfile b/.gitlab/ci/gnmi-cert-integration.Dockerfile old mode 100644 new mode 100755 diff --git a/.gitlab/ci/gosdn-integration.Dockerfile b/.gitlab/ci/gosdn-integration.Dockerfile old mode 100644 new mode 100755 diff --git a/.gitlab/ci/legacy/.test.yml b/.gitlab/ci/legacy/.test.yml old mode 100644 new mode 100755 diff --git a/.gitlab/issue_templates/Change Request.md b/.gitlab/issue_templates/Change Request.md old mode 100644 new mode 100755 diff --git a/.gitlab/issue_templates/Feature Proposal.md b/.gitlab/issue_templates/Feature Proposal.md old mode 100644 new mode 100755 diff --git a/.gitlab/issue_templates/Issue Template.md b/.gitlab/issue_templates/Issue Template.md old mode 100644 new mode 100755 diff --git a/.gitlab/merge_request_templates/Default.md b/.gitlab/merge_request_templates/Default.md old mode 100644 new mode 100755 diff --git a/.gitmodules b/.gitmodules old mode 100644 new mode 100755 diff --git a/.golangci.yml b/.golangci.yml old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/Makefile b/Makefile old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/api/LICENSE b/api/LICENSE old mode 100644 new mode 100755 diff --git a/api/Makefile b/api/Makefile old mode 100644 new mode 100755 diff --git a/api/README.md b/api/README.md old mode 100644 new mode 100755 diff --git a/api/buf.gen.yaml b/api/buf.gen.yaml old mode 100644 new mode 100755 diff --git a/api/buf.work.yaml b/api/buf.work.yaml old mode 100644 new mode 100755 diff --git a/api/cmd/gogen.go b/api/cmd/gogen.go old mode 100644 new mode 100755 diff --git a/api/deps/buf.yaml b/api/deps/buf.yaml old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/.github/workflows/ci-cpp-build-gnmi.yml b/api/deps/github.com/openconfig/gnmi/.github/workflows/ci-cpp-build-gnmi.yml old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/BUILD.bazel b/api/deps/github.com/openconfig/gnmi/BUILD.bazel old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/CONTRIBUTING.md b/api/deps/github.com/openconfig/gnmi/CONTRIBUTING.md old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/LICENSE b/api/deps/github.com/openconfig/gnmi/LICENSE old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/README.md b/api/deps/github.com/openconfig/gnmi/README.md old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/WORKSPACE.bazel b/api/deps/github.com/openconfig/gnmi/WORKSPACE.bazel old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/cache/cache.go b/api/deps/github.com/openconfig/gnmi/cache/cache.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/cache/cache_test.go b/api/deps/github.com/openconfig/gnmi/cache/cache_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/cli/cli.go b/api/deps/github.com/openconfig/gnmi/cli/cli.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/cli/cli_test.go b/api/deps/github.com/openconfig/gnmi/cli/cli_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/client/cache.go b/api/deps/github.com/openconfig/gnmi/client/cache.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/client/cache_test.go b/api/deps/github.com/openconfig/gnmi/client/cache_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/client/client.go b/api/deps/github.com/openconfig/gnmi/client/client.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/client/client_test.go b/api/deps/github.com/openconfig/gnmi/client/client_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/client/fake/fake.go b/api/deps/github.com/openconfig/gnmi/client/fake/fake.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/client/fake/fake_test.go b/api/deps/github.com/openconfig/gnmi/client/fake/fake_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/client/flags/flags_test.go b/api/deps/github.com/openconfig/gnmi/client/flags/flags_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/client/flags/intmap.go b/api/deps/github.com/openconfig/gnmi/client/flags/intmap.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/client/flags/stringlist.go b/api/deps/github.com/openconfig/gnmi/client/flags/stringlist.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/client/flags/stringmap.go b/api/deps/github.com/openconfig/gnmi/client/flags/stringmap.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/client/gnmi/client.go b/api/deps/github.com/openconfig/gnmi/client/gnmi/client.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/client/gnmi/client_test.go b/api/deps/github.com/openconfig/gnmi/client/gnmi/client_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/client/gnmi/credentials.go b/api/deps/github.com/openconfig/gnmi/client/gnmi/credentials.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/client/grpcutil/lookup.go b/api/deps/github.com/openconfig/gnmi/client/grpcutil/lookup.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/client/grpcutil/lookup_test.go b/api/deps/github.com/openconfig/gnmi/client/grpcutil/lookup_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/client/notification.go b/api/deps/github.com/openconfig/gnmi/client/notification.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/client/query.go b/api/deps/github.com/openconfig/gnmi/client/query.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/client/reconnect.go b/api/deps/github.com/openconfig/gnmi/client/reconnect.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/client/reconnect_test.go b/api/deps/github.com/openconfig/gnmi/client/reconnect_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/client/register.go b/api/deps/github.com/openconfig/gnmi/client/register.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/client/values.go b/api/deps/github.com/openconfig/gnmi/client/values.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/cmd/gnmi_cli/gnmi_cli.go b/api/deps/github.com/openconfig/gnmi/cmd/gnmi_cli/gnmi_cli.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/cmd/gnmi_cli/gnmi_cli_test.go b/api/deps/github.com/openconfig/gnmi/cmd/gnmi_cli/gnmi_cli_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/docker/Dockerfile b/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/docker/Dockerfile old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/docker/README.md b/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/docker/README.md old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/docker/config/cert.pem b/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/docker/config/cert.pem old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/docker/config/example.cfg b/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/docker/config/example.cfg old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/docker/config/key.pem b/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/docker/config/key.pem old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/docker/supervisord.conf b/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/docker/supervisord.conf old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/gnmi_collector.go b/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/gnmi_collector.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/gnmi_collector_test.go b/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/gnmi_collector_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/testdata/bad.cfg b/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/testdata/bad.cfg old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/testdata/bad.crt b/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/testdata/bad.crt old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/testdata/bad.key b/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/testdata/bad.key old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/testdata/good.cfg b/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/testdata/good.cfg old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/testdata/good.crt b/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/testdata/good.crt old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/testdata/good.key b/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/testdata/good.key old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/testdata/unparseable.cfg b/api/deps/github.com/openconfig/gnmi/cmd/gnmi_collector/testdata/unparseable.cfg old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/coalesce/coalesce.go b/api/deps/github.com/openconfig/gnmi/coalesce/coalesce.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/coalesce/coalesce_test.go b/api/deps/github.com/openconfig/gnmi/coalesce/coalesce_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/collector/collector.go b/api/deps/github.com/openconfig/gnmi/collector/collector.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/collector/collector_test.go b/api/deps/github.com/openconfig/gnmi/collector/collector_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/connection/connection.go b/api/deps/github.com/openconfig/gnmi/connection/connection.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/connection/connection_test.go b/api/deps/github.com/openconfig/gnmi/connection/connection_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/ctree/tree.go b/api/deps/github.com/openconfig/gnmi/ctree/tree.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/ctree/tree_test.go b/api/deps/github.com/openconfig/gnmi/ctree/tree_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/errdiff/errdiff.go b/api/deps/github.com/openconfig/gnmi/errdiff/errdiff.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/errdiff/errdiff_test.go b/api/deps/github.com/openconfig/gnmi/errdiff/errdiff_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/errlist/errlist.go b/api/deps/github.com/openconfig/gnmi/errlist/errlist.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/errlist/errlist_test.go b/api/deps/github.com/openconfig/gnmi/errlist/errlist_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/gnmi_deps.bzl b/api/deps/github.com/openconfig/gnmi/gnmi_deps.bzl old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/go.mod b/api/deps/github.com/openconfig/gnmi/go.mod old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/go.sum b/api/deps/github.com/openconfig/gnmi/go.sum old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/latency/latency.go b/api/deps/github.com/openconfig/gnmi/latency/latency.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/latency/latency_test.go b/api/deps/github.com/openconfig/gnmi/latency/latency_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/manager/manager.go b/api/deps/github.com/openconfig/gnmi/manager/manager.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/manager/manager_test.go b/api/deps/github.com/openconfig/gnmi/manager/manager_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/manager/meta.go b/api/deps/github.com/openconfig/gnmi/manager/meta.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/manager/meta_test.go b/api/deps/github.com/openconfig/gnmi/manager/meta_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/match/match.go b/api/deps/github.com/openconfig/gnmi/match/match.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/match/match_test.go b/api/deps/github.com/openconfig/gnmi/match/match_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/metadata/metadata.go b/api/deps/github.com/openconfig/gnmi/metadata/metadata.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/metadata/metadata_test.go b/api/deps/github.com/openconfig/gnmi/metadata/metadata_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/metadata/yang/gnmi-collector-metadata.yang b/api/deps/github.com/openconfig/gnmi/metadata/yang/gnmi-collector-metadata.yang old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/path/path.go b/api/deps/github.com/openconfig/gnmi/path/path.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/path/path_test.go b/api/deps/github.com/openconfig/gnmi/path/path_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/collector/BUILD.bazel b/api/deps/github.com/openconfig/gnmi/proto/collector/BUILD.bazel old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/collector/collector.pb.go b/api/deps/github.com/openconfig/gnmi/proto/collector/collector.pb.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/collector/collector.proto b/api/deps/github.com/openconfig/gnmi/proto/collector/collector.proto old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/collector/collector_grpc.pb.go b/api/deps/github.com/openconfig/gnmi/proto/collector/collector_grpc.pb.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/collector/collector_pb2.py b/api/deps/github.com/openconfig/gnmi/proto/collector/collector_pb2.py old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/collector/collector_pb2_grpc.py b/api/deps/github.com/openconfig/gnmi/proto/collector/collector_pb2_grpc.py old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/gnmi/BUILD.bazel b/api/deps/github.com/openconfig/gnmi/proto/gnmi/BUILD.bazel old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/gnmi/gnmi.pb.go b/api/deps/github.com/openconfig/gnmi/proto/gnmi/gnmi.pb.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/gnmi/gnmi.proto b/api/deps/github.com/openconfig/gnmi/proto/gnmi/gnmi.proto old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/gnmi/gnmi_grpc.pb.go b/api/deps/github.com/openconfig/gnmi/proto/gnmi/gnmi_grpc.pb.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/gnmi/gnmi_pb2.py b/api/deps/github.com/openconfig/gnmi/proto/gnmi/gnmi_pb2.py old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/gnmi/gnmi_pb2_grpc.py b/api/deps/github.com/openconfig/gnmi/proto/gnmi/gnmi_pb2_grpc.py old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/gnmi_ext/BUILD.bazel b/api/deps/github.com/openconfig/gnmi/proto/gnmi_ext/BUILD.bazel old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.pb.go b/api/deps/github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.pb.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.proto b/api/deps/github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.proto old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext_pb2.py b/api/deps/github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext_pb2.py old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext_pb2_grpc.py b/api/deps/github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext_pb2_grpc.py old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/target/BUILD.bazel b/api/deps/github.com/openconfig/gnmi/proto/target/BUILD.bazel old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/target/target.pb.go b/api/deps/github.com/openconfig/gnmi/proto/target/target.pb.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/target/target.proto b/api/deps/github.com/openconfig/gnmi/proto/target/target.proto old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/target/target_pb2.py b/api/deps/github.com/openconfig/gnmi/proto/target/target_pb2.py old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/proto/target/target_pb2_grpc.py b/api/deps/github.com/openconfig/gnmi/proto/target/target_pb2_grpc.py old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/subscribe/subscribe.go b/api/deps/github.com/openconfig/gnmi/subscribe/subscribe.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/subscribe/subscribe_test.go b/api/deps/github.com/openconfig/gnmi/subscribe/subscribe_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/target/target.go b/api/deps/github.com/openconfig/gnmi/target/target.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/target/target_test.go b/api/deps/github.com/openconfig/gnmi/target/target_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/testing/fake/gnmi/agent.go b/api/deps/github.com/openconfig/gnmi/testing/fake/gnmi/agent.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/testing/fake/gnmi/client.go b/api/deps/github.com/openconfig/gnmi/testing/fake/gnmi/client.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/testing/fake/gnmi/cmd/fake_server/README.md b/api/deps/github.com/openconfig/gnmi/testing/fake/gnmi/cmd/fake_server/README.md old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/testing/fake/gnmi/cmd/fake_server/config.pb.txt b/api/deps/github.com/openconfig/gnmi/testing/fake/gnmi/cmd/fake_server/config.pb.txt old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/testing/fake/gnmi/cmd/fake_server/server.go b/api/deps/github.com/openconfig/gnmi/testing/fake/gnmi/cmd/fake_server/server.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/testing/fake/gnmi/cmd/gen_fake_config/gen_config.go b/api/deps/github.com/openconfig/gnmi/testing/fake/gnmi/cmd/gen_fake_config/gen_config.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/testing/fake/gnmi/gnmi_test.go b/api/deps/github.com/openconfig/gnmi/testing/fake/gnmi/gnmi_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/testing/fake/proto/fake.pb.go b/api/deps/github.com/openconfig/gnmi/testing/fake/proto/fake.pb.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/testing/fake/proto/fake.proto b/api/deps/github.com/openconfig/gnmi/testing/fake/proto/fake.proto old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/testing/fake/proto/fake_grpc.pb.go b/api/deps/github.com/openconfig/gnmi/testing/fake/proto/fake_grpc.pb.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/testing/fake/proto/fake_pb2.py b/api/deps/github.com/openconfig/gnmi/testing/fake/proto/fake_pb2.py old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/testing/fake/proto/fake_pb2_grpc.py b/api/deps/github.com/openconfig/gnmi/testing/fake/proto/fake_pb2_grpc.py old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/testing/fake/queue/fixed_queue.go b/api/deps/github.com/openconfig/gnmi/testing/fake/queue/fixed_queue.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/testing/fake/queue/queue.go b/api/deps/github.com/openconfig/gnmi/testing/fake/queue/queue.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/testing/fake/queue/queue_test.go b/api/deps/github.com/openconfig/gnmi/testing/fake/queue/queue_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/testing/fake/testing/grpc/config/config_test.go b/api/deps/github.com/openconfig/gnmi/testing/fake/testing/grpc/config/config_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/testing/fake/testing/grpc/config/server_option.go b/api/deps/github.com/openconfig/gnmi/testing/fake/testing/grpc/config/server_option.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/testing/fake/testing/tls/tls.go b/api/deps/github.com/openconfig/gnmi/testing/fake/testing/tls/tls.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/testing/fake/testing/tls/tls_test.go b/api/deps/github.com/openconfig/gnmi/testing/fake/testing/tls/tls_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/value/value.go b/api/deps/github.com/openconfig/gnmi/value/value.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/value/value_test.go b/api/deps/github.com/openconfig/gnmi/value/value_test.go old mode 100644 new mode 100755 diff --git a/api/deps/github.com/openconfig/gnmi/watch/watch.go b/api/deps/github.com/openconfig/gnmi/watch/watch.go old mode 100644 new mode 100755 diff --git a/api/go/github.com/openconfig/gnmi/proto/collector/collector.pb.go b/api/go/github.com/openconfig/gnmi/proto/collector/collector.pb.go old mode 100644 new mode 100755 index 09e16b6053907bc724b86ea5219a2e7cb1e3bf0c..3eba4d2363d6c5103edbfcedba8205d6d1580c66 --- a/api/go/github.com/openconfig/gnmi/proto/collector/collector.pb.go +++ b/api/go/github.com/openconfig/gnmi/proto/collector/collector.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: github.com/openconfig/gnmi/proto/collector/collector.proto @@ -27,6 +27,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -37,11 +38,10 @@ const ( ) type ReconnectRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Target []string `protobuf:"bytes,1,rep,name=target,proto3" json:"target,omitempty"` // List of targets to reconnect. unknownFields protoimpl.UnknownFields - - Target []string `protobuf:"bytes,1,rep,name=target,proto3" json:"target,omitempty"` // List of targets to reconnect. + sizeCache protoimpl.SizeCache } func (x *ReconnectRequest) Reset() { @@ -82,9 +82,9 @@ func (x *ReconnectRequest) GetTarget() []string { } type Nil struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Nil) Reset() { @@ -119,7 +119,7 @@ func (*Nil) Descriptor() ([]byte, []int) { var File_github_com_openconfig_gnmi_proto_collector_collector_proto protoreflect.FileDescriptor -var file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDesc = []byte{ +var file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDesc = string([]byte{ 0x0a, 0x3a, 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, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x63, 0x6f, 0x6c, @@ -135,16 +135,16 @@ var file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDesc = [] 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, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x3b, 0x67, 0x6e, 0x6d, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDescOnce sync.Once - file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDescData = file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDesc + file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDescData []byte ) func file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDescGZIP() []byte { file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDescOnce.Do(func() { - file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDescData) + file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDesc), len(file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDesc))) }) return file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDescData } @@ -173,7 +173,7 @@ func file_github_com_openconfig_gnmi_proto_collector_collector_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDesc), len(file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDesc)), NumEnums: 0, NumMessages: 2, NumExtensions: 0, @@ -184,7 +184,6 @@ func file_github_com_openconfig_gnmi_proto_collector_collector_proto_init() { MessageInfos: file_github_com_openconfig_gnmi_proto_collector_collector_proto_msgTypes, }.Build() File_github_com_openconfig_gnmi_proto_collector_collector_proto = out.File - file_github_com_openconfig_gnmi_proto_collector_collector_proto_rawDesc = nil file_github_com_openconfig_gnmi_proto_collector_collector_proto_goTypes = nil file_github_com_openconfig_gnmi_proto_collector_collector_proto_depIdxs = nil } diff --git a/api/go/github.com/openconfig/gnmi/proto/collector/collector_grpc.pb.go b/api/go/github.com/openconfig/gnmi/proto/collector/collector_grpc.pb.go old mode 100644 new mode 100755 diff --git a/api/go/github.com/openconfig/gnmi/proto/gnmi/gnmi.pb.go b/api/go/github.com/openconfig/gnmi/proto/gnmi/gnmi.pb.go old mode 100644 new mode 100755 index d0162888f8ea5b4e40d0010e030796e96be8bb5a..0d1e241b07492d5c4fdf1ce37b7d91a4db6f3cbb --- a/api/go/github.com/openconfig/gnmi/proto/gnmi/gnmi.pb.go +++ b/api/go/github.com/openconfig/gnmi/proto/gnmi/gnmi.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: github.com/openconfig/gnmi/proto/gnmi/gnmi.proto @@ -39,6 +39,7 @@ import ( anypb "google.golang.org/protobuf/types/known/anypb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -329,12 +330,9 @@ func (GetRequest_DataType) EnumDescriptor() ([]byte, []int) { // // Reference: gNMI Specification Section 2.1 type Notification 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. - Prefix *Path `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"` // Prefix used for paths in the message. + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Prefix *Path `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"` // Prefix used for paths in the message. // An alias for the path specified in the prefix field. // Reference: gNMI Specification Section 2.4.2 Alias string `protobuf:"bytes,3,opt,name=alias,proto3" json:"alias,omitempty"` @@ -342,7 +340,9 @@ type Notification struct { Delete []*Path `protobuf:"bytes,5,rep,name=delete,proto3" json:"delete,omitempty"` // Data elements that have been deleted. // This notification contains a set of paths that are always updated together // referenced by a globally unique prefix. - Atomic bool `protobuf:"varint,6,opt,name=atomic,proto3" json:"atomic,omitempty"` + Atomic bool `protobuf:"varint,6,opt,name=atomic,proto3" json:"atomic,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Notification) Reset() { @@ -421,15 +421,14 @@ func (x *Notification) GetAtomic() bool { // Value pair. // Reference: gNMI Specification Section 2.1 type Update struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Path *Path `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // The path (key) for the update. + state protoimpl.MessageState `protogen:"open.v1"` + Path *Path `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // The path (key) for the update. // Deprecated: Marked as deprecated in github.com/openconfig/gnmi/proto/gnmi/gnmi.proto. - Value *Value `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // The value (value) for the update. - Val *TypedValue `protobuf:"bytes,3,opt,name=val,proto3" json:"val,omitempty"` // The explicitly typed update value. - Duplicates uint32 `protobuf:"varint,4,opt,name=duplicates,proto3" json:"duplicates,omitempty"` // Number of coalesced duplicates. + Value *Value `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // The value (value) for the update. + Val *TypedValue `protobuf:"bytes,3,opt,name=val,proto3" json:"val,omitempty"` // The explicitly typed update value. + Duplicates uint32 `protobuf:"varint,4,opt,name=duplicates,proto3" json:"duplicates,omitempty"` // Number of coalesced duplicates. + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Update) Reset() { @@ -494,17 +493,14 @@ func (x *Update) GetDuplicates() uint32 { // TypedValue is used to encode a value being sent between the client and // target (originated by either entity). type TypedValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // One of the fields within the val oneof is populated with the value // of the update. The type of the value being included in the Update // determines which field should be populated. In the case that the // encoding is a particular form of the base protobuf type, a specific // field is used to store the value (e.g., json_val). // - // Types that are assignable to Value: + // Types that are valid to be assigned to Value: // // *TypedValue_StringVal // *TypedValue_IntVal @@ -519,7 +515,9 @@ type TypedValue struct { // *TypedValue_JsonIetfVal // *TypedValue_AsciiVal // *TypedValue_ProtoBytes - Value isTypedValue_Value `protobuf_oneof:"value"` + Value isTypedValue_Value `protobuf_oneof:"value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TypedValue) Reset() { @@ -552,100 +550,126 @@ func (*TypedValue) Descriptor() ([]byte, []int) { return file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescGZIP(), []int{2} } -func (m *TypedValue) GetValue() isTypedValue_Value { - if m != nil { - return m.Value +func (x *TypedValue) GetValue() isTypedValue_Value { + if x != nil { + return x.Value } return nil } func (x *TypedValue) GetStringVal() string { - if x, ok := x.GetValue().(*TypedValue_StringVal); ok { - return x.StringVal + if x != nil { + if x, ok := x.Value.(*TypedValue_StringVal); ok { + return x.StringVal + } } return "" } func (x *TypedValue) GetIntVal() int64 { - if x, ok := x.GetValue().(*TypedValue_IntVal); ok { - return x.IntVal + if x != nil { + if x, ok := x.Value.(*TypedValue_IntVal); ok { + return x.IntVal + } } return 0 } func (x *TypedValue) GetUintVal() uint64 { - if x, ok := x.GetValue().(*TypedValue_UintVal); ok { - return x.UintVal + if x != nil { + if x, ok := x.Value.(*TypedValue_UintVal); ok { + return x.UintVal + } } return 0 } func (x *TypedValue) GetBoolVal() bool { - if x, ok := x.GetValue().(*TypedValue_BoolVal); ok { - return x.BoolVal + if x != nil { + if x, ok := x.Value.(*TypedValue_BoolVal); ok { + return x.BoolVal + } } return false } func (x *TypedValue) GetBytesVal() []byte { - if x, ok := x.GetValue().(*TypedValue_BytesVal); ok { - return x.BytesVal + if x != nil { + if x, ok := x.Value.(*TypedValue_BytesVal); ok { + return x.BytesVal + } } return nil } func (x *TypedValue) GetFloatVal() float32 { - if x, ok := x.GetValue().(*TypedValue_FloatVal); ok { - return x.FloatVal + if x != nil { + if x, ok := x.Value.(*TypedValue_FloatVal); ok { + return x.FloatVal + } } return 0 } func (x *TypedValue) GetDecimalVal() *Decimal64 { - if x, ok := x.GetValue().(*TypedValue_DecimalVal); ok { - return x.DecimalVal + if x != nil { + if x, ok := x.Value.(*TypedValue_DecimalVal); ok { + return x.DecimalVal + } } return nil } func (x *TypedValue) GetLeaflistVal() *ScalarArray { - if x, ok := x.GetValue().(*TypedValue_LeaflistVal); ok { - return x.LeaflistVal + if x != nil { + if x, ok := x.Value.(*TypedValue_LeaflistVal); ok { + return x.LeaflistVal + } } return nil } func (x *TypedValue) GetAnyVal() *anypb.Any { - if x, ok := x.GetValue().(*TypedValue_AnyVal); ok { - return x.AnyVal + if x != nil { + if x, ok := x.Value.(*TypedValue_AnyVal); ok { + return x.AnyVal + } } return nil } func (x *TypedValue) GetJsonVal() []byte { - if x, ok := x.GetValue().(*TypedValue_JsonVal); ok { - return x.JsonVal + if x != nil { + if x, ok := x.Value.(*TypedValue_JsonVal); ok { + return x.JsonVal + } } return nil } func (x *TypedValue) GetJsonIetfVal() []byte { - if x, ok := x.GetValue().(*TypedValue_JsonIetfVal); ok { - return x.JsonIetfVal + if x != nil { + if x, ok := x.Value.(*TypedValue_JsonIetfVal); ok { + return x.JsonIetfVal + } } return nil } func (x *TypedValue) GetAsciiVal() string { - if x, ok := x.GetValue().(*TypedValue_AsciiVal); ok { - return x.AsciiVal + if x != nil { + if x, ok := x.Value.(*TypedValue_AsciiVal); ok { + return x.AsciiVal + } } return "" } func (x *TypedValue) GetProtoBytes() []byte { - if x, ok := x.GetValue().(*TypedValue_ProtoBytes); ok { - return x.ProtoBytes + if x != nil { + if x, ok := x.Value.(*TypedValue_ProtoBytes); ok { + return x.ProtoBytes + } } return nil } @@ -741,18 +765,17 @@ func (*TypedValue_ProtoBytes) isTypedValue_Value() {} // associated attributes. // Reference: gNMI Specification Section 2.2.2. type Path struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Elements of the path are no longer encoded as a string, but rather within // the elem field as a PathElem message. // // Deprecated: Marked as deprecated in github.com/openconfig/gnmi/proto/gnmi/gnmi.proto. - Element []string `protobuf:"bytes,1,rep,name=element,proto3" json:"element,omitempty"` - Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` // Label to disambiguate path. - Elem []*PathElem `protobuf:"bytes,3,rep,name=elem,proto3" json:"elem,omitempty"` // Elements of the path. - Target string `protobuf:"bytes,4,opt,name=target,proto3" json:"target,omitempty"` // The name of the target + Element []string `protobuf:"bytes,1,rep,name=element,proto3" json:"element,omitempty"` + Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` // Label to disambiguate path. + Elem []*PathElem `protobuf:"bytes,3,rep,name=elem,proto3" json:"elem,omitempty"` // Elements of the path. + Target string `protobuf:"bytes,4,opt,name=target,proto3" json:"target,omitempty"` // The name of the target + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Path) Reset() { @@ -818,12 +841,11 @@ func (x *Path) GetTarget() string { // that may be associated with it. // Reference: gNMI Specification Section 2.2.2. type PathElem struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The name of the element in the path. + Key map[string]string `protobuf:"bytes,2,rep,name=key,proto3" json:"key,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Map of key (attribute) name to value. unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The name of the element in the path. - Key map[string]string `protobuf:"bytes,2,rep,name=key,proto3" json:"key,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Map of key (attribute) name to value. + sizeCache protoimpl.SizeCache } func (x *PathElem) Reset() { @@ -876,12 +898,11 @@ func (x *PathElem) GetKey() map[string]string { // // Deprecated: Marked as deprecated in github.com/openconfig/gnmi/proto/gnmi/gnmi.proto. type Value struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // Value of the variable being transmitted. + Type Encoding `protobuf:"varint,2,opt,name=type,proto3,enum=gnmi.Encoding" json:"type,omitempty"` // Encoding used for the value field. unknownFields protoimpl.UnknownFields - - Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // Value of the variable being transmitted. - Type Encoding `protobuf:"varint,2,opt,name=type,proto3,enum=gnmi.Encoding" json:"type,omitempty"` // Encoding used for the value field. + sizeCache protoimpl.SizeCache } func (x *Value) Reset() { @@ -935,13 +956,12 @@ func (x *Value) GetType() Encoding { // // Deprecated: Marked as deprecated in github.com/openconfig/gnmi/proto/gnmi/gnmi.proto. type Error struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // Canonical gRPC error code. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // Human readable error. + Data *anypb.Any `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // Optional additional information. unknownFields protoimpl.UnknownFields - - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // Canonical gRPC error code. - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // Human readable error. - Data *anypb.Any `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // Optional additional information. + sizeCache protoimpl.SizeCache } func (x *Error) Reset() { @@ -999,12 +1019,11 @@ func (x *Error) GetData() *anypb.Any { // is expressed as a set of digits with the precision specifying the // number of digits following the decimal point in the digit set. type Decimal64 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Digits int64 `protobuf:"varint,1,opt,name=digits,proto3" json:"digits,omitempty"` // Set of digits. + Precision uint32 `protobuf:"varint,2,opt,name=precision,proto3" json:"precision,omitempty"` // Number of digits following the decimal point. unknownFields protoimpl.UnknownFields - - Digits int64 `protobuf:"varint,1,opt,name=digits,proto3" json:"digits,omitempty"` // Set of digits. - Precision uint32 `protobuf:"varint,2,opt,name=precision,proto3" json:"precision,omitempty"` // Number of digits following the decimal point. + sizeCache protoimpl.SizeCache } func (x *Decimal64) Reset() { @@ -1053,14 +1072,13 @@ func (x *Decimal64) GetPrecision() uint32 { // ScalarArray is used to encode a mixed-type array of values. type ScalarArray struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The set of elements within the array. Each TypedValue message should // specify only elements that have a field identifier of 1-7 (i.e., the // values are scalar values). - Element []*TypedValue `protobuf:"bytes,1,rep,name=element,proto3" json:"element,omitempty"` + Element []*TypedValue `protobuf:"bytes,1,rep,name=element,proto3" json:"element,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ScalarArray) Reset() { @@ -1107,11 +1125,8 @@ func (x *ScalarArray) GetElement() []*TypedValue { // used to define aliases or trigger polled data to be sent by the target. // Reference: gNMI Specification Section 3.5.1.1 type SubscribeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Request: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Request: // // *SubscribeRequest_Subscribe // *SubscribeRequest_Poll @@ -1119,7 +1134,9 @@ type SubscribeRequest struct { Request isSubscribeRequest_Request `protobuf_oneof:"request"` // Extension messages associated with the SubscribeRequest. See the // gNMI extension specification for further definition. - Extension []*gnmi_ext.Extension `protobuf:"bytes,5,rep,name=extension,proto3" json:"extension,omitempty"` + Extension []*gnmi_ext.Extension `protobuf:"bytes,5,rep,name=extension,proto3" json:"extension,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SubscribeRequest) Reset() { @@ -1152,30 +1169,36 @@ func (*SubscribeRequest) Descriptor() ([]byte, []int) { return file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescGZIP(), []int{9} } -func (m *SubscribeRequest) GetRequest() isSubscribeRequest_Request { - if m != nil { - return m.Request +func (x *SubscribeRequest) GetRequest() isSubscribeRequest_Request { + if x != nil { + return x.Request } return nil } func (x *SubscribeRequest) GetSubscribe() *SubscriptionList { - if x, ok := x.GetRequest().(*SubscribeRequest_Subscribe); ok { - return x.Subscribe + if x != nil { + if x, ok := x.Request.(*SubscribeRequest_Subscribe); ok { + return x.Subscribe + } } return nil } func (x *SubscribeRequest) GetPoll() *Poll { - if x, ok := x.GetRequest().(*SubscribeRequest_Poll); ok { - return x.Poll + if x != nil { + if x, ok := x.Request.(*SubscribeRequest_Poll); ok { + return x.Poll + } } return nil } func (x *SubscribeRequest) GetAliases() *AliasList { - if x, ok := x.GetRequest().(*SubscribeRequest_Aliases); ok { - return x.Aliases + if x != nil { + if x, ok := x.Request.(*SubscribeRequest_Aliases); ok { + return x.Aliases + } } return nil } @@ -1214,9 +1237,9 @@ func (*SubscribeRequest_Aliases) isSubscribeRequest_Request() {} // subscription. // Reference: gNMI Specification Section Section 3.5.1.4 type Poll struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Poll) Reset() { @@ -1256,11 +1279,8 @@ func (*Poll) Descriptor() ([]byte, []int) { // synchronized). // Reference: gNMI Specification Section 3.5.1.4 type SubscribeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Response: // // *SubscribeResponse_Update // *SubscribeResponse_SyncResponse @@ -1268,7 +1288,9 @@ type SubscribeResponse struct { Response isSubscribeResponse_Response `protobuf_oneof:"response"` // Extension messages associated with the SubscribeResponse. See the // gNMI extension specification for further definition. - Extension []*gnmi_ext.Extension `protobuf:"bytes,5,rep,name=extension,proto3" json:"extension,omitempty"` + Extension []*gnmi_ext.Extension `protobuf:"bytes,5,rep,name=extension,proto3" json:"extension,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SubscribeResponse) Reset() { @@ -1301,31 +1323,37 @@ func (*SubscribeResponse) Descriptor() ([]byte, []int) { return file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescGZIP(), []int{11} } -func (m *SubscribeResponse) GetResponse() isSubscribeResponse_Response { - if m != nil { - return m.Response +func (x *SubscribeResponse) GetResponse() isSubscribeResponse_Response { + if x != nil { + return x.Response } return nil } func (x *SubscribeResponse) GetUpdate() *Notification { - if x, ok := x.GetResponse().(*SubscribeResponse_Update); ok { - return x.Update + if x != nil { + if x, ok := x.Response.(*SubscribeResponse_Update); ok { + return x.Update + } } return nil } func (x *SubscribeResponse) GetSyncResponse() bool { - if x, ok := x.GetResponse().(*SubscribeResponse_SyncResponse); ok { - return x.SyncResponse + if x != nil { + if x, ok := x.Response.(*SubscribeResponse_SyncResponse); ok { + return x.SyncResponse + } } return false } // Deprecated: Marked as deprecated in github.com/openconfig/gnmi/proto/gnmi/gnmi.proto. func (x *SubscribeResponse) GetError() *Error { - if x, ok := x.GetResponse().(*SubscribeResponse_Error); ok { - return x.Error + if x != nil { + if x, ok := x.Response.(*SubscribeResponse_Error); ok { + return x.Error + } } return nil } @@ -1370,12 +1398,9 @@ func (*SubscribeResponse_Error) isSubscribeResponse_Response() {} // subscription. // Reference: gNMI Specification Section 3.5.1.2 type SubscriptionList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Prefix *Path `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // Prefix used for paths. - Subscription []*Subscription `protobuf:"bytes,2,rep,name=subscription,proto3" json:"subscription,omitempty"` // Set of subscriptions to create. + state protoimpl.MessageState `protogen:"open.v1"` + Prefix *Path `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // Prefix used for paths. + Subscription []*Subscription `protobuf:"bytes,2,rep,name=subscription,proto3" json:"subscription,omitempty"` // Set of subscriptions to create. // Whether target defined aliases are allowed within the subscription. UseAliases bool `protobuf:"varint,3,opt,name=use_aliases,json=useAliases,proto3" json:"use_aliases,omitempty"` Qos *QOSMarking `protobuf:"bytes,4,opt,name=qos,proto3" json:"qos,omitempty"` // DSCP marking to be used. @@ -1394,7 +1419,9 @@ type SubscriptionList struct { // rather only the sync message followed by any subsequent updates to the // current state. For ONCE and POLL modes, this causes the server to send only // the sync message (Sec. 3.5.2.3). - UpdatesOnly bool `protobuf:"varint,9,opt,name=updates_only,json=updatesOnly,proto3" json:"updates_only,omitempty"` + UpdatesOnly bool `protobuf:"varint,9,opt,name=updates_only,json=updatesOnly,proto3" json:"updates_only,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SubscriptionList) Reset() { @@ -1496,13 +1523,10 @@ func (x *SubscriptionList) GetUpdatesOnly() bool { // should trigger updates to be sent. // Reference: gNMI Specification Section 3.5.1.3 type Subscription struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Path *Path `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // The data tree path. - Mode SubscriptionMode `protobuf:"varint,2,opt,name=mode,proto3,enum=gnmi.SubscriptionMode" json:"mode,omitempty"` // Subscription mode to be used. - SampleInterval uint64 `protobuf:"varint,3,opt,name=sample_interval,json=sampleInterval,proto3" json:"sample_interval,omitempty"` // ns between samples in SAMPLE mode. + state protoimpl.MessageState `protogen:"open.v1"` + Path *Path `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // The data tree path. + Mode SubscriptionMode `protobuf:"varint,2,opt,name=mode,proto3,enum=gnmi.SubscriptionMode" json:"mode,omitempty"` // Subscription mode to be used. + SampleInterval uint64 `protobuf:"varint,3,opt,name=sample_interval,json=sampleInterval,proto3" json:"sample_interval,omitempty"` // ns between samples in SAMPLE mode. // Indicates whether values that have not changed should be sent in a SAMPLE // subscription. SuppressRedundant bool `protobuf:"varint,4,opt,name=suppress_redundant,json=suppressRedundant,proto3" json:"suppress_redundant,omitempty"` @@ -1510,6 +1534,8 @@ type Subscription struct { // suppress_redundant is in use. The target should send a value at least once // in the period specified. HeartbeatInterval uint64 `protobuf:"varint,5,opt,name=heartbeat_interval,json=heartbeatInterval,proto3" json:"heartbeat_interval,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Subscription) Reset() { @@ -1581,11 +1607,10 @@ func (x *Subscription) GetHeartbeatInterval() uint64 { // updates from the target. // Reference: gNMI Specification Section 3.5.1.2 type QOSMarking struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Marking uint32 `protobuf:"varint,1,opt,name=marking,proto3" json:"marking,omitempty"` unknownFields protoimpl.UnknownFields - - Marking uint32 `protobuf:"varint,1,opt,name=marking,proto3" json:"marking,omitempty"` + sizeCache protoimpl.SizeCache } func (x *QOSMarking) Reset() { @@ -1631,12 +1656,11 @@ func (x *QOSMarking) GetMarking() uint32 { // data tree element paths. // Reference: gNMI Specification Section 2.4.2 type Alias struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Path *Path `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // The path to be aliased. + Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` // The alias value, a string prefixed by "#". unknownFields protoimpl.UnknownFields - - Path *Path `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // The path to be aliased. - Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` // The alias value, a string prefixed by "#". + sizeCache protoimpl.SizeCache } func (x *Alias) Reset() { @@ -1687,11 +1711,10 @@ func (x *Alias) GetAlias() string { // a client to create a set of aliases that the target is to utilize. // Reference: gNMI Specification Section 3.5.1.6 type AliasList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Alias []*Alias `protobuf:"bytes,1,rep,name=alias,proto3" json:"alias,omitempty"` // The set of aliases to be created. unknownFields protoimpl.UnknownFields - - Alias []*Alias `protobuf:"bytes,1,rep,name=alias,proto3" json:"alias,omitempty"` // The set of aliases to be created. + sizeCache protoimpl.SizeCache } func (x *AliasList) Reset() { @@ -1739,17 +1762,16 @@ func (x *AliasList) GetAlias() []*Alias { // a single SetRequest are considered to be a transaction. // Reference: gNMI Specification Section 3.4.1 type SetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Prefix *Path `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // Prefix used for paths in the message. - Delete []*Path `protobuf:"bytes,2,rep,name=delete,proto3" json:"delete,omitempty"` // Paths to be deleted from the data tree. - Replace []*Update `protobuf:"bytes,3,rep,name=replace,proto3" json:"replace,omitempty"` // Updates specifying elements to be replaced. - Update []*Update `protobuf:"bytes,4,rep,name=update,proto3" json:"update,omitempty"` // Updates specifying elements to updated. + state protoimpl.MessageState `protogen:"open.v1"` + Prefix *Path `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // Prefix used for paths in the message. + Delete []*Path `protobuf:"bytes,2,rep,name=delete,proto3" json:"delete,omitempty"` // Paths to be deleted from the data tree. + Replace []*Update `protobuf:"bytes,3,rep,name=replace,proto3" json:"replace,omitempty"` // Updates specifying elements to be replaced. + Update []*Update `protobuf:"bytes,4,rep,name=update,proto3" json:"update,omitempty"` // Updates specifying elements to updated. // Extension messages associated with the SetRequest. See the // gNMI extension specification for further definition. - Extension []*gnmi_ext.Extension `protobuf:"bytes,5,rep,name=extension,proto3" json:"extension,omitempty"` + Extension []*gnmi_ext.Extension `protobuf:"bytes,5,rep,name=extension,proto3" json:"extension,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SetRequest) Reset() { @@ -1825,11 +1847,8 @@ func (x *SetRequest) GetExtension() []*gnmi_ext.Extension { // details where required. // Reference: gNMI Specification Section 3.4.2 type SetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Prefix *Path `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // Prefix used for paths. + state protoimpl.MessageState `protogen:"open.v1"` + Prefix *Path `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // Prefix used for paths. // A set of responses specifying the result of the operations specified in // the SetRequest. Response []*UpdateResult `protobuf:"bytes,2,rep,name=response,proto3" json:"response,omitempty"` @@ -1838,7 +1857,9 @@ type SetResponse struct { Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp of transaction (ns since epoch). // Extension messages associated with the SetResponse. See the // gNMI extension specification for further definition. - Extension []*gnmi_ext.Extension `protobuf:"bytes,5,rep,name=extension,proto3" json:"extension,omitempty"` + Extension []*gnmi_ext.Extension `protobuf:"bytes,5,rep,name=extension,proto3" json:"extension,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SetResponse) Reset() { @@ -1911,10 +1932,7 @@ func (x *SetResponse) GetExtension() []*gnmi_ext.Extension { // result of an operation specified within a SetRequest message. // Reference: gNMI Specification Section 3.4.2 type UpdateResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Deprecated timestamp for the UpdateResult, this field has been // replaced by the timestamp within the SetResponse message, since // all mutations effected by a set should be applied as a single @@ -1924,8 +1942,10 @@ type UpdateResult struct { Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Path *Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` // Path associated with the update. // Deprecated: Marked as deprecated in github.com/openconfig/gnmi/proto/gnmi/gnmi.proto. - Message *Error `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // Status of the update operation. - Op UpdateResult_Operation `protobuf:"varint,4,opt,name=op,proto3,enum=gnmi.UpdateResult_Operation" json:"op,omitempty"` // Update operation type. + Message *Error `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // Status of the update operation. + Op UpdateResult_Operation `protobuf:"varint,4,opt,name=op,proto3,enum=gnmi.UpdateResult_Operation" json:"op,omitempty"` // Update operation type. + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UpdateResult) Reset() { @@ -1995,18 +2015,17 @@ func (x *UpdateResult) GetOp() UpdateResult_Operation { // must use all schema models that it has. // Reference: gNMI Specification Section 3.3.1 type GetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Prefix *Path `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // Prefix used for paths. - Path []*Path `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` // Paths requested by the client. - Type GetRequest_DataType `protobuf:"varint,3,opt,name=type,proto3,enum=gnmi.GetRequest_DataType" json:"type,omitempty"` // The type of data being requested. - Encoding Encoding `protobuf:"varint,5,opt,name=encoding,proto3,enum=gnmi.Encoding" json:"encoding,omitempty"` // Encoding to be used. - UseModels []*ModelData `protobuf:"bytes,6,rep,name=use_models,json=useModels,proto3" json:"use_models,omitempty"` // The schema models to be used. + state protoimpl.MessageState `protogen:"open.v1"` + Prefix *Path `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // Prefix used for paths. + Path []*Path `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` // Paths requested by the client. + Type GetRequest_DataType `protobuf:"varint,3,opt,name=type,proto3,enum=gnmi.GetRequest_DataType" json:"type,omitempty"` // The type of data being requested. + Encoding Encoding `protobuf:"varint,5,opt,name=encoding,proto3,enum=gnmi.Encoding" json:"encoding,omitempty"` // Encoding to be used. + UseModels []*ModelData `protobuf:"bytes,6,rep,name=use_models,json=useModels,proto3" json:"use_models,omitempty"` // The schema models to be used. // Extension messages associated with the GetRequest. See the // gNMI extension specification for further definition. - Extension []*gnmi_ext.Extension `protobuf:"bytes,7,rep,name=extension,proto3" json:"extension,omitempty"` + Extension []*gnmi_ext.Extension `protobuf:"bytes,7,rep,name=extension,proto3" json:"extension,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetRequest) Reset() { @@ -2086,16 +2105,15 @@ func (x *GetRequest) GetExtension() []*gnmi_ext.Extension { // by the client in the GetRequest. // Reference: gNMI Specification Section 3.3.2 type GetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Notification []*Notification `protobuf:"bytes,1,rep,name=notification,proto3" json:"notification,omitempty"` // Data values. + state protoimpl.MessageState `protogen:"open.v1"` + Notification []*Notification `protobuf:"bytes,1,rep,name=notification,proto3" json:"notification,omitempty"` // Data values. // Deprecated: Marked as deprecated in github.com/openconfig/gnmi/proto/gnmi/gnmi.proto. Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // Errors that occurred in the Get. // Extension messages associated with the GetResponse. See the // gNMI extension specification for further definition. - Extension []*gnmi_ext.Extension `protobuf:"bytes,3,rep,name=extension,proto3" json:"extension,omitempty"` + Extension []*gnmi_ext.Extension `protobuf:"bytes,3,rep,name=extension,proto3" json:"extension,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetResponse) Reset() { @@ -2154,13 +2172,12 @@ func (x *GetResponse) GetExtension() []*gnmi_ext.Extension { // that the target reports its capabilities. // Reference: gNMI Specification Section 3.2.1 type CapabilityRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Extension messages associated with the CapabilityRequest. See the // gNMI extension specification for further definition. - Extension []*gnmi_ext.Extension `protobuf:"bytes,1,rep,name=extension,proto3" json:"extension,omitempty"` + Extension []*gnmi_ext.Extension `protobuf:"bytes,1,rep,name=extension,proto3" json:"extension,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CapabilityRequest) Reset() { @@ -2204,16 +2221,15 @@ func (x *CapabilityRequest) GetExtension() []*gnmi_ext.Extension { // client within the Capabilities RPC. // Reference: gNMI Specification Section 3.2.2 type CapabilityResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SupportedModels []*ModelData `protobuf:"bytes,1,rep,name=supported_models,json=supportedModels,proto3" json:"supported_models,omitempty"` // Supported schema models. - SupportedEncodings []Encoding `protobuf:"varint,2,rep,packed,name=supported_encodings,json=supportedEncodings,proto3,enum=gnmi.Encoding" json:"supported_encodings,omitempty"` // Supported encodings. - GNMIVersion string `protobuf:"bytes,3,opt,name=gNMI_version,json=gNMIVersion,proto3" json:"gNMI_version,omitempty"` // Supported gNMI version. + state protoimpl.MessageState `protogen:"open.v1"` + SupportedModels []*ModelData `protobuf:"bytes,1,rep,name=supported_models,json=supportedModels,proto3" json:"supported_models,omitempty"` // Supported schema models. + SupportedEncodings []Encoding `protobuf:"varint,2,rep,packed,name=supported_encodings,json=supportedEncodings,proto3,enum=gnmi.Encoding" json:"supported_encodings,omitempty"` // Supported encodings. + GNMIVersion string `protobuf:"bytes,3,opt,name=gNMI_version,json=gNMIVersion,proto3" json:"gNMI_version,omitempty"` // Supported gNMI version. // Extension messages associated with the CapabilityResponse. See the // gNMI extension specification for further definition. - Extension []*gnmi_ext.Extension `protobuf:"bytes,4,rep,name=extension,proto3" json:"extension,omitempty"` + Extension []*gnmi_ext.Extension `protobuf:"bytes,4,rep,name=extension,proto3" json:"extension,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CapabilityResponse) Reset() { @@ -2280,13 +2296,12 @@ func (x *CapabilityResponse) GetExtension() []*gnmi_ext.Extension { // the set of models from which data tree elements should be reported. // Reference: gNMI Specification Section 3.2.3 type ModelData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Name of the model. + Organization string `protobuf:"bytes,2,opt,name=organization,proto3" json:"organization,omitempty"` // Organization publishing the model. + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // Semantic version of the model. unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Name of the model. - Organization string `protobuf:"bytes,2,opt,name=organization,proto3" json:"organization,omitempty"` // Organization publishing the model. - Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // Semantic version of the model. + sizeCache protoimpl.SizeCache } func (x *ModelData) Reset() { @@ -2361,7 +2376,7 @@ var ( var File_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto protoreflect.FileDescriptor -var file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc = []byte{ +var file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc = string([]byte{ 0x0a, 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, @@ -2671,16 +2686,16 @@ var file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc = []byte{ 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, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescOnce sync.Once - file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescData = file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc + file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescData []byte ) func file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescGZIP() []byte { file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescOnce.Do(func() { - file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescData) + file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc), len(file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc))) }) return file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDescData } @@ -2830,7 +2845,7 @@ func file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc), len(file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc)), NumEnums: 5, NumMessages: 26, NumExtensions: 1, @@ -2843,7 +2858,6 @@ func file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_init() { ExtensionInfos: file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_extTypes, }.Build() File_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto = out.File - file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_rawDesc = nil file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_goTypes = nil file_github_com_openconfig_gnmi_proto_gnmi_gnmi_proto_depIdxs = nil } diff --git a/api/go/github.com/openconfig/gnmi/proto/gnmi/gnmi_grpc.pb.go b/api/go/github.com/openconfig/gnmi/proto/gnmi/gnmi_grpc.pb.go old mode 100644 new mode 100755 diff --git a/api/go/github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.pb.go b/api/go/github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.pb.go old mode 100644 new mode 100755 index aaaa55d00a30af1ce6c4a75447a9b6d7de6a5122..5536b80f43ec09a50dd8e97150bfff1c5b936b6f --- a/api/go/github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.pb.go +++ b/api/go/github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.proto @@ -32,6 +32,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -93,16 +94,15 @@ func (ExtensionID) EnumDescriptor() ([]byte, []int) { // The Extension message contains a single gNMI extension. type Extension struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Ext: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Ext: // // *Extension_RegisteredExt // *Extension_MasterArbitration // *Extension_History - Ext isExtension_Ext `protobuf_oneof:"ext"` + Ext isExtension_Ext `protobuf_oneof:"ext"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Extension) Reset() { @@ -135,30 +135,36 @@ func (*Extension) Descriptor() ([]byte, []int) { return file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescGZIP(), []int{0} } -func (m *Extension) GetExt() isExtension_Ext { - if m != nil { - return m.Ext +func (x *Extension) GetExt() isExtension_Ext { + if x != nil { + return x.Ext } return nil } func (x *Extension) GetRegisteredExt() *RegisteredExtension { - if x, ok := x.GetExt().(*Extension_RegisteredExt); ok { - return x.RegisteredExt + if x != nil { + if x, ok := x.Ext.(*Extension_RegisteredExt); ok { + return x.RegisteredExt + } } return nil } func (x *Extension) GetMasterArbitration() *MasterArbitration { - if x, ok := x.GetExt().(*Extension_MasterArbitration); ok { - return x.MasterArbitration + if x != nil { + if x, ok := x.Ext.(*Extension_MasterArbitration); ok { + return x.MasterArbitration + } } return nil } func (x *Extension) GetHistory() *History { - if x, ok := x.GetExt().(*Extension_History); ok { - return x.History + if x != nil { + if x, ok := x.Ext.(*Extension_History); ok { + return x.History + } } return nil } @@ -189,12 +195,11 @@ func (*Extension_History) isExtension_Ext() {} // The RegisteredExtension message defines an extension which is defined outside // of this file. type RegisteredExtension struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id ExtensionID `protobuf:"varint,1,opt,name=id,proto3,enum=gnmi_ext.ExtensionID" json:"id,omitempty"` // The unique ID assigned to this extension. + Msg []byte `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // The binary-marshalled protobuf extension payload. unknownFields protoimpl.UnknownFields - - Id ExtensionID `protobuf:"varint,1,opt,name=id,proto3,enum=gnmi_ext.ExtensionID" json:"id,omitempty"` // The unique ID assigned to this extension. - Msg []byte `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // The binary-marshalled protobuf extension payload. + sizeCache protoimpl.SizeCache } func (x *RegisteredExtension) Reset() { @@ -247,12 +252,11 @@ func (x *RegisteredExtension) GetMsg() []byte { // The document about gNMI master arbitration can be found at // https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-master-arbitration.md type MasterArbitration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Role *Role `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` + ElectionId *Uint128 `protobuf:"bytes,2,opt,name=election_id,json=electionId,proto3" json:"election_id,omitempty"` unknownFields protoimpl.UnknownFields - - Role *Role `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` - ElectionId *Uint128 `protobuf:"bytes,2,opt,name=election_id,json=electionId,proto3" json:"election_id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *MasterArbitration) Reset() { @@ -301,12 +305,11 @@ func (x *MasterArbitration) GetElectionId() *Uint128 { // Representation of unsigned 128-bit integer. type Uint128 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + High uint64 `protobuf:"varint,1,opt,name=high,proto3" json:"high,omitempty"` + Low uint64 `protobuf:"varint,2,opt,name=low,proto3" json:"low,omitempty"` unknownFields protoimpl.UnknownFields - - High uint64 `protobuf:"varint,1,opt,name=high,proto3" json:"high,omitempty"` - Low uint64 `protobuf:"varint,2,opt,name=low,proto3" json:"low,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Uint128) Reset() { @@ -355,11 +358,10 @@ func (x *Uint128) GetLow() uint64 { // There can be one master for each role. The role is identified by its id. type Role struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Role) Reset() { @@ -403,15 +405,14 @@ func (x *Role) GetId() string { // spec can be found at // https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-history.md type History struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Request: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Request: // // *History_SnapshotTime // *History_Range - Request isHistory_Request `protobuf_oneof:"request"` + Request isHistory_Request `protobuf_oneof:"request"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *History) Reset() { @@ -444,23 +445,27 @@ func (*History) Descriptor() ([]byte, []int) { return file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescGZIP(), []int{5} } -func (m *History) GetRequest() isHistory_Request { - if m != nil { - return m.Request +func (x *History) GetRequest() isHistory_Request { + if x != nil { + return x.Request } return nil } func (x *History) GetSnapshotTime() int64 { - if x, ok := x.GetRequest().(*History_SnapshotTime); ok { - return x.SnapshotTime + if x != nil { + if x, ok := x.Request.(*History_SnapshotTime); ok { + return x.SnapshotTime + } } return 0 } func (x *History) GetRange() *TimeRange { - if x, ok := x.GetRequest().(*History_Range); ok { - return x.Range + if x != nil { + if x, ok := x.Request.(*History_Range); ok { + return x.Range + } } return nil } @@ -482,12 +487,11 @@ func (*History_SnapshotTime) isHistory_Request() {} func (*History_Range) isHistory_Request() {} type TimeRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` // Nanoseconds since the epoch + End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` // Nanoseconds since the epoch unknownFields protoimpl.UnknownFields - - Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` // Nanoseconds since the epoch - End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` // Nanoseconds since the epoch + sizeCache protoimpl.SizeCache } func (x *TimeRange) Reset() { @@ -536,7 +540,7 @@ func (x *TimeRange) GetEnd() int64 { var File_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto protoreflect.FileDescriptor -var file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDesc = []byte{ +var file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDesc = string([]byte{ 0x0a, 0x38, 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, 0x5f, 0x65, 0x78, 0x74, 0x2f, 0x67, 0x6e, 0x6d, 0x69, @@ -588,16 +592,16 @@ var file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDesc = []by 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, 0x5f, 0x65, 0x78, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescOnce sync.Once - file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescData = file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDesc + file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescData []byte ) func file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescGZIP() []byte { file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescOnce.Do(func() { - file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescData) + file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDesc), len(file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDesc))) }) return file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDescData } @@ -647,7 +651,7 @@ func file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDesc), len(file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDesc)), NumEnums: 1, NumMessages: 7, NumExtensions: 0, @@ -659,7 +663,6 @@ func file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_init() { MessageInfos: file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_msgTypes, }.Build() File_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto = out.File - file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_rawDesc = nil file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_goTypes = nil file_github_com_openconfig_gnmi_proto_gnmi_ext_gnmi_ext_proto_depIdxs = nil } diff --git a/api/go/github.com/openconfig/gnmi/proto/target/target.pb.go b/api/go/github.com/openconfig/gnmi/proto/target/target.pb.go old mode 100644 new mode 100755 index 168a726d8cd58bebc94304cab9af31183b30b4d7..607f004a958349760e6319f97fc759bb5d8a6b81 --- a/api/go/github.com/openconfig/gnmi/proto/target/target.pb.go +++ b/api/go/github.com/openconfig/gnmi/proto/target/target.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: github.com/openconfig/gnmi/proto/target/target.proto @@ -31,6 +31,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -43,21 +44,18 @@ const ( // Configuration holds all information necessary for a caching gNMI collector // to establish subscriptions to a list of gNMI targets. type Configuration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Request is a keyed list of all SubscriptionRequests that can be sent to // to targets in the Configuration. // The request must have at minimum a SubscriptionList with a prefix // containing origin and one or more Subscriptions. Only the STREAM mode is // supported. - Request map[string]*gnmi.SubscribeRequest `protobuf:"bytes,1,rep,name=request,proto3" json:"request,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Request map[string]*gnmi.SubscribeRequest `protobuf:"bytes,1,rep,name=request,proto3" json:"request,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Target is the full list of targets connected to by a caching gNMI // collector. The key of the map is a unique name to identify a target and // is set in the prefix.target of a SubscriptionRequest message when connecting // to each respective target. - Target map[string]*Target `protobuf:"bytes,2,rep,name=target,proto3" json:"target,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Target map[string]*Target `protobuf:"bytes,2,rep,name=target,proto3" json:"target,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Identifier for the caching collector. InstanceId string `protobuf:"bytes,3,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` // Revision for this Configuration. Systems that non-atomically write @@ -65,7 +63,9 @@ type Configuration struct { // protobuf serialization of fields in order. Presence of this field makes no // guarantee. Consumers should account for atomicity constraints of their // environment and any custom encoding. - Revision int64 `protobuf:"varint,536870911,opt,name=revision,proto3" json:"revision,omitempty"` + Revision int64 `protobuf:"varint,536870911,opt,name=revision,proto3" json:"revision,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Configuration) Reset() { @@ -129,10 +129,7 @@ func (x *Configuration) GetRevision() int64 { // Target is the information necessary to establish a single gNMI Subscribe RPC // to be collected and cached. type Target struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A list of address and port or name that resolves to an address and port. Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` // Credentials to use in metadata for authorization of the RPC @@ -141,7 +138,9 @@ type Target struct { // the request map of the Configuration message. Request string `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"` // Additional target metadata. - Meta map[string]string `protobuf:"bytes,4,rep,name=meta,proto3" json:"meta,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Meta map[string]string `protobuf:"bytes,4,rep,name=meta,proto3" json:"meta,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Target) Reset() { @@ -205,14 +204,13 @@ func (x *Target) GetMeta() map[string]string { // Credentials contains the fields necessary for authentication of the client to // the target. type Credentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // Password lookup ID. - PasswordId string `protobuf:"bytes,3,opt,name=password_id,json=passwordId,proto3" json:"password_id,omitempty"` + PasswordId string `protobuf:"bytes,3,opt,name=password_id,json=passwordId,proto3" json:"password_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Credentials) Reset() { @@ -268,7 +266,7 @@ func (x *Credentials) GetPasswordId() string { var File_github_com_openconfig_gnmi_proto_target_target_proto protoreflect.FileDescriptor -var file_github_com_openconfig_gnmi_proto_target_target_proto_rawDesc = []byte{ +var file_github_com_openconfig_gnmi_proto_target_target_proto_rawDesc = string([]byte{ 0x0a, 0x34, 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, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, @@ -323,16 +321,16 @@ var file_github_com_openconfig_gnmi_proto_target_target_proto_rawDesc = []byte{ 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, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_github_com_openconfig_gnmi_proto_target_target_proto_rawDescOnce sync.Once - file_github_com_openconfig_gnmi_proto_target_target_proto_rawDescData = file_github_com_openconfig_gnmi_proto_target_target_proto_rawDesc + file_github_com_openconfig_gnmi_proto_target_target_proto_rawDescData []byte ) func file_github_com_openconfig_gnmi_proto_target_target_proto_rawDescGZIP() []byte { file_github_com_openconfig_gnmi_proto_target_target_proto_rawDescOnce.Do(func() { - file_github_com_openconfig_gnmi_proto_target_target_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_openconfig_gnmi_proto_target_target_proto_rawDescData) + file_github_com_openconfig_gnmi_proto_target_target_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_github_com_openconfig_gnmi_proto_target_target_proto_rawDesc), len(file_github_com_openconfig_gnmi_proto_target_target_proto_rawDesc))) }) return file_github_com_openconfig_gnmi_proto_target_target_proto_rawDescData } @@ -370,7 +368,7 @@ func file_github_com_openconfig_gnmi_proto_target_target_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_github_com_openconfig_gnmi_proto_target_target_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_github_com_openconfig_gnmi_proto_target_target_proto_rawDesc), len(file_github_com_openconfig_gnmi_proto_target_target_proto_rawDesc)), NumEnums: 0, NumMessages: 6, NumExtensions: 0, @@ -381,7 +379,6 @@ func file_github_com_openconfig_gnmi_proto_target_target_proto_init() { MessageInfos: file_github_com_openconfig_gnmi_proto_target_target_proto_msgTypes, }.Build() File_github_com_openconfig_gnmi_proto_target_target_proto = out.File - file_github_com_openconfig_gnmi_proto_target_target_proto_rawDesc = nil file_github_com_openconfig_gnmi_proto_target_target_proto_goTypes = nil file_github_com_openconfig_gnmi_proto_target_target_proto_depIdxs = nil } diff --git a/api/go/github.com/openconfig/gnmi/testing/fake/proto/fake.pb.go b/api/go/github.com/openconfig/gnmi/testing/fake/proto/fake.pb.go old mode 100644 new mode 100755 index 1beb87208c350ef0fca3df478125ce69273784ca..18fcb63861fb8a5ff0a7499cb6248b1fc11d8396 --- a/api/go/github.com/openconfig/gnmi/testing/fake/proto/fake.pb.go +++ b/api/go/github.com/openconfig/gnmi/testing/fake/proto/fake.pb.go @@ -4,7 +4,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: github.com/openconfig/gnmi/testing/fake/proto/fake.proto @@ -17,6 +17,7 @@ import ( anypb "google.golang.org/protobuf/types/known/anypb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -130,12 +131,11 @@ func (Config_ClientType) EnumDescriptor() ([]byte, []int) { // Configuration is used to store all agent configuration for the fake agent // server. Each config describes a single agent hosted on the server. type Configuration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Repeated list of targets to emulate. - Config []*Config `protobuf:"bytes,1,rep,name=config,proto3" json:"config,omitempty"` + Config []*Config `protobuf:"bytes,1,rep,name=config,proto3" json:"config,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Configuration) Reset() { @@ -176,12 +176,11 @@ func (x *Configuration) GetConfig() []*Config { } type Credentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` unknownFields protoimpl.UnknownFields - - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Credentials) Reset() { @@ -231,10 +230,7 @@ func (x *Credentials) GetPassword() string { // Config is a collection of values that together represent the update streams // for one or more fake devices. type Config struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The target for which the fake will publish values for. Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` // Port for the agent to listen on. If 0 or unset the agent will pick a port @@ -269,7 +265,7 @@ type Config struct { EnableDelay bool `protobuf:"varint,10,opt,name=enable_delay,json=enableDelay,proto3" json:"enable_delay,omitempty"` // Generator for value series for the target. // - // Types that are assignable to Generator: + // Types that are valid to be assigned to Generator: // // *Config_Custom // *Config_Random @@ -278,7 +274,9 @@ type Config struct { // tunnel_addr is the address of the tunnel server. TunnelAddr string `protobuf:"bytes,11,opt,name=tunnel_addr,json=tunnelAddr,proto3" json:"tunnel_addr,omitempty"` // tunnel_crt is the certificate file for the tunnel conection. - TunnelCrt string `protobuf:"bytes,12,opt,name=tunnel_crt,json=tunnelCrt,proto3" json:"tunnel_crt,omitempty"` + TunnelCrt string `protobuf:"bytes,12,opt,name=tunnel_crt,json=tunnelCrt,proto3" json:"tunnel_crt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Config) Reset() { @@ -383,30 +381,36 @@ func (x *Config) GetEnableDelay() bool { return false } -func (m *Config) GetGenerator() isConfig_Generator { - if m != nil { - return m.Generator +func (x *Config) GetGenerator() isConfig_Generator { + if x != nil { + return x.Generator } return nil } func (x *Config) GetCustom() *anypb.Any { - if x, ok := x.GetGenerator().(*Config_Custom); ok { - return x.Custom + if x != nil { + if x, ok := x.Generator.(*Config_Custom); ok { + return x.Custom + } } return nil } func (x *Config) GetRandom() *RandomGenerator { - if x, ok := x.GetGenerator().(*Config_Random); ok { - return x.Random + if x != nil { + if x, ok := x.Generator.(*Config_Random); ok { + return x.Random + } } return nil } func (x *Config) GetFixed() *FixedGenerator { - if x, ok := x.GetGenerator().(*Config_Fixed); ok { - return x.Fixed + if x != nil { + if x, ok := x.Generator.(*Config_Fixed); ok { + return x.Fixed + } } return nil } @@ -448,11 +452,10 @@ func (*Config_Random) isConfig_Generator() {} func (*Config_Fixed) isConfig_Generator() {} type FixedGenerator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Responses []*gnmi.SubscribeResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` unknownFields protoimpl.UnknownFields - - Responses []*gnmi.SubscribeResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` + sizeCache protoimpl.SizeCache } func (x *FixedGenerator) Reset() { @@ -493,12 +496,11 @@ func (x *FixedGenerator) GetResponses() []*gnmi.SubscribeResponse { } type RandomGenerator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Seed int64 `protobuf:"varint,1,opt,name=seed,proto3" json:"seed,omitempty"` + Values []*Value `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` unknownFields protoimpl.UnknownFields - - Seed int64 `protobuf:"varint,1,opt,name=seed,proto3" json:"seed,omitempty"` - Values []*Value `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` + sizeCache protoimpl.SizeCache } func (x *RandomGenerator) Reset() { @@ -547,9 +549,9 @@ func (x *RandomGenerator) GetValues() []*Value { // Delete will cause the value to be deleted at the Value's path. type DeleteValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeleteValue) Reset() { @@ -586,10 +588,7 @@ func (*DeleteValue) Descriptor() ([]byte, []int) { // path. A file containing a list of values can be used to simulate a network // device for integration tests. type Value struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The device specific, or OpenConfig path corresponding to a value. Path []string `protobuf:"bytes,1,rep,name=path,proto3" json:"path,omitempty"` // The initial timestamp and configuration on how the timestamp will change @@ -605,7 +604,7 @@ type Value struct { // The initial value of the chosen type including configuration on how the // value will mutate for subsequent updates. // - // Types that are assignable to Value: + // Types that are valid to be assigned to Value: // // *Value_IntValue // *Value_DoubleValue @@ -615,7 +614,9 @@ type Value struct { // *Value_BoolValue // *Value_UintValue // *Value_StringListValue - Value isValue_Value `protobuf_oneof:"value"` + Value isValue_Value `protobuf_oneof:"value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Value) Reset() { @@ -676,65 +677,81 @@ func (x *Value) GetSeed() int64 { return 0 } -func (m *Value) GetValue() isValue_Value { - if m != nil { - return m.Value +func (x *Value) GetValue() isValue_Value { + if x != nil { + return x.Value } return nil } func (x *Value) GetIntValue() *IntValue { - if x, ok := x.GetValue().(*Value_IntValue); ok { - return x.IntValue + if x != nil { + if x, ok := x.Value.(*Value_IntValue); ok { + return x.IntValue + } } return nil } func (x *Value) GetDoubleValue() *DoubleValue { - if x, ok := x.GetValue().(*Value_DoubleValue); ok { - return x.DoubleValue + if x != nil { + if x, ok := x.Value.(*Value_DoubleValue); ok { + return x.DoubleValue + } } return nil } func (x *Value) GetStringValue() *StringValue { - if x, ok := x.GetValue().(*Value_StringValue); ok { - return x.StringValue + if x != nil { + if x, ok := x.Value.(*Value_StringValue); ok { + return x.StringValue + } } return nil } func (x *Value) GetSync() uint64 { - if x, ok := x.GetValue().(*Value_Sync); ok { - return x.Sync + if x != nil { + if x, ok := x.Value.(*Value_Sync); ok { + return x.Sync + } } return 0 } func (x *Value) GetDelete() *DeleteValue { - if x, ok := x.GetValue().(*Value_Delete); ok { - return x.Delete + if x != nil { + if x, ok := x.Value.(*Value_Delete); ok { + return x.Delete + } } return nil } func (x *Value) GetBoolValue() *BoolValue { - if x, ok := x.GetValue().(*Value_BoolValue); ok { - return x.BoolValue + if x != nil { + if x, ok := x.Value.(*Value_BoolValue); ok { + return x.BoolValue + } } return nil } func (x *Value) GetUintValue() *UintValue { - if x, ok := x.GetValue().(*Value_UintValue); ok { - return x.UintValue + if x != nil { + if x, ok := x.Value.(*Value_UintValue); ok { + return x.UintValue + } } return nil } func (x *Value) GetStringListValue() *StringListValue { - if x, ok := x.GetValue().(*Value_StringListValue); ok { - return x.StringListValue + if x != nil { + if x, ok := x.Value.(*Value_StringListValue); ok { + return x.StringListValue + } } return nil } @@ -792,10 +809,7 @@ func (*Value_UintValue) isValue_Value() {} func (*Value_StringListValue) isValue_Value() {} type Timestamp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Initial timestamp for the corresponding value, nanoseconds since epoch. // This value need have no relation to absolute real-time as the stream of // of updates is generated without regard to the real clock and can be run @@ -804,8 +818,10 @@ type Timestamp struct { // These values will vary the change in the timestamp for subsequent outputs // by a value between delta_min and delta_max. Set to the same value to force // a set periodic interval. - DeltaMin int64 `protobuf:"varint,2,opt,name=delta_min,json=deltaMin,proto3" json:"delta_min,omitempty"` - DeltaMax int64 `protobuf:"varint,3,opt,name=delta_max,json=deltaMax,proto3" json:"delta_max,omitempty"` + DeltaMin int64 `protobuf:"varint,2,opt,name=delta_min,json=deltaMin,proto3" json:"delta_min,omitempty"` + DeltaMax int64 `protobuf:"varint,3,opt,name=delta_max,json=deltaMax,proto3" json:"delta_max,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Timestamp) Reset() { @@ -860,10 +876,7 @@ func (x *Timestamp) GetDeltaMax() int64 { } type IntValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // If distribution is IntRange, value is used as the initial value // inside [minimum, maximum] and hold the value as it mutates. // If distribution is IntList, value is only used to hold the value as it @@ -871,11 +884,13 @@ type IntValue struct { // If no distribution is set, value is used as it mutates, i.e. constant // update. Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` - // Types that are assignable to Distribution: + // Types that are valid to be assigned to Distribution: // // *IntValue_Range // *IntValue_List - Distribution isIntValue_Distribution `protobuf_oneof:"distribution"` + Distribution isIntValue_Distribution `protobuf_oneof:"distribution"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *IntValue) Reset() { @@ -915,23 +930,27 @@ func (x *IntValue) GetValue() int64 { return 0 } -func (m *IntValue) GetDistribution() isIntValue_Distribution { - if m != nil { - return m.Distribution +func (x *IntValue) GetDistribution() isIntValue_Distribution { + if x != nil { + return x.Distribution } return nil } func (x *IntValue) GetRange() *IntRange { - if x, ok := x.GetDistribution().(*IntValue_Range); ok { - return x.Range + if x != nil { + if x, ok := x.Distribution.(*IntValue_Range); ok { + return x.Range + } } return nil } func (x *IntValue) GetList() *IntList { - if x, ok := x.GetDistribution().(*IntValue_List); ok { - return x.List + if x != nil { + if x, ok := x.Distribution.(*IntValue_List); ok { + return x.List + } } return nil } @@ -953,10 +972,7 @@ func (*IntValue_Range) isIntValue_Distribution() {} func (*IntValue_List) isIntValue_Distribution() {} type IntRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The range of the value allowed. Minimum int64 `protobuf:"varint,1,opt,name=minimum,proto3" json:"minimum,omitempty"` Maximum int64 `protobuf:"varint,2,opt,name=maximum,proto3" json:"maximum,omitempty"` @@ -965,8 +981,10 @@ type IntRange struct { // minimum and maximum are still respected and values will saturate at the // boundaries if they are exceeded. If not set subsequent value is a value // randomly chosen between minimum and maximum. - DeltaMin int64 `protobuf:"varint,3,opt,name=delta_min,json=deltaMin,proto3" json:"delta_min,omitempty"` - DeltaMax int64 `protobuf:"varint,4,opt,name=delta_max,json=deltaMax,proto3" json:"delta_max,omitempty"` + DeltaMin int64 `protobuf:"varint,3,opt,name=delta_min,json=deltaMin,proto3" json:"delta_min,omitempty"` + DeltaMax int64 `protobuf:"varint,4,opt,name=delta_max,json=deltaMax,proto3" json:"delta_max,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *IntRange) Reset() { @@ -1028,15 +1046,14 @@ func (x *IntRange) GetDeltaMax() int64 { } type IntList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The set of values which can be used. Options []int64 `protobuf:"varint,1,rep,packed,name=options,proto3" json:"options,omitempty"` // Set to true to randomize selection of value from options. If false, the // values are cycled in order, starting at index 0. - Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"` + Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *IntList) Reset() { @@ -1084,10 +1101,7 @@ func (x *IntList) GetRandom() bool { } type DoubleValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // If distribution is DoubleRange, value is used as the initial value // inside [minimum, maximum] and hold the value as it mutates. // If distribution is DoubleList, value is only used to hold the value as it @@ -1095,11 +1109,13 @@ type DoubleValue struct { // If no distribution is set, value is used as it mutates, i.e. constant // update. Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` - // Types that are assignable to Distribution: + // Types that are valid to be assigned to Distribution: // // *DoubleValue_Range // *DoubleValue_List - Distribution isDoubleValue_Distribution `protobuf_oneof:"distribution"` + Distribution isDoubleValue_Distribution `protobuf_oneof:"distribution"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DoubleValue) Reset() { @@ -1139,23 +1155,27 @@ func (x *DoubleValue) GetValue() float64 { return 0 } -func (m *DoubleValue) GetDistribution() isDoubleValue_Distribution { - if m != nil { - return m.Distribution +func (x *DoubleValue) GetDistribution() isDoubleValue_Distribution { + if x != nil { + return x.Distribution } return nil } func (x *DoubleValue) GetRange() *DoubleRange { - if x, ok := x.GetDistribution().(*DoubleValue_Range); ok { - return x.Range + if x != nil { + if x, ok := x.Distribution.(*DoubleValue_Range); ok { + return x.Range + } } return nil } func (x *DoubleValue) GetList() *DoubleList { - if x, ok := x.GetDistribution().(*DoubleValue_List); ok { - return x.List + if x != nil { + if x, ok := x.Distribution.(*DoubleValue_List); ok { + return x.List + } } return nil } @@ -1177,10 +1197,7 @@ func (*DoubleValue_Range) isDoubleValue_Distribution() {} func (*DoubleValue_List) isDoubleValue_Distribution() {} type DoubleRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The range of the value allowed. Minimum float64 `protobuf:"fixed64,1,opt,name=minimum,proto3" json:"minimum,omitempty"` Maximum float64 `protobuf:"fixed64,2,opt,name=maximum,proto3" json:"maximum,omitempty"` @@ -1188,8 +1205,10 @@ type DoubleRange struct { // where delta is randomly chosen between delta_min and delta_max. The range // minimum and maximum are still respected. If not set subsequent value is a // value randomly chosen between minimum and maximum. - DeltaMin float64 `protobuf:"fixed64,3,opt,name=delta_min,json=deltaMin,proto3" json:"delta_min,omitempty"` - DeltaMax float64 `protobuf:"fixed64,4,opt,name=delta_max,json=deltaMax,proto3" json:"delta_max,omitempty"` + DeltaMin float64 `protobuf:"fixed64,3,opt,name=delta_min,json=deltaMin,proto3" json:"delta_min,omitempty"` + DeltaMax float64 `protobuf:"fixed64,4,opt,name=delta_max,json=deltaMax,proto3" json:"delta_max,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DoubleRange) Reset() { @@ -1251,15 +1270,14 @@ func (x *DoubleRange) GetDeltaMax() float64 { } type DoubleList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The set of values which can be used. Options []float64 `protobuf:"fixed64,1,rep,packed,name=options,proto3" json:"options,omitempty"` // Set to true to randomize selection of value from options. If false, the // values are cycled in order. - Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"` + Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DoubleList) Reset() { @@ -1307,19 +1325,18 @@ func (x *DoubleList) GetRandom() bool { } type StringValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // If distribution is StringList, value is used to hold the value as it // mutates. // If no distribution is set, value is used as it mutates, i.e. constant // update. Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - // Types that are assignable to Distribution: + // Types that are valid to be assigned to Distribution: // // *StringValue_List - Distribution isStringValue_Distribution `protobuf_oneof:"distribution"` + Distribution isStringValue_Distribution `protobuf_oneof:"distribution"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StringValue) Reset() { @@ -1359,16 +1376,18 @@ func (x *StringValue) GetValue() string { return "" } -func (m *StringValue) GetDistribution() isStringValue_Distribution { - if m != nil { - return m.Distribution +func (x *StringValue) GetDistribution() isStringValue_Distribution { + if x != nil { + return x.Distribution } return nil } func (x *StringValue) GetList() *StringList { - if x, ok := x.GetDistribution().(*StringValue_List); ok { - return x.List + if x != nil { + if x, ok := x.Distribution.(*StringValue_List); ok { + return x.List + } } return nil } @@ -1384,15 +1403,14 @@ type StringValue_List struct { func (*StringValue_List) isStringValue_Distribution() {} type StringList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The set of strings which can be used. Options []string `protobuf:"bytes,1,rep,name=options,proto3" json:"options,omitempty"` // Set to true to randomize selection of value from options. If false, the // values are cycled in order, starting at index 0. - Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"` + Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StringList) Reset() { @@ -1440,19 +1458,18 @@ func (x *StringList) GetRandom() bool { } type StringListValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // If distribution is StringList, value is used to hold the value as it // mutates. // If no distribution is set, value is used as it mutates, i.e. constant // update. Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` - // Types that are assignable to Distribution: + // Types that are valid to be assigned to Distribution: // // *StringListValue_List - Distribution isStringListValue_Distribution `protobuf_oneof:"distribution"` + Distribution isStringListValue_Distribution `protobuf_oneof:"distribution"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StringListValue) Reset() { @@ -1492,16 +1509,18 @@ func (x *StringListValue) GetValue() []string { return nil } -func (m *StringListValue) GetDistribution() isStringListValue_Distribution { - if m != nil { - return m.Distribution +func (x *StringListValue) GetDistribution() isStringListValue_Distribution { + if x != nil { + return x.Distribution } return nil } func (x *StringListValue) GetList() *StringList { - if x, ok := x.GetDistribution().(*StringListValue_List); ok { - return x.List + if x != nil { + if x, ok := x.Distribution.(*StringListValue_List); ok { + return x.List + } } return nil } @@ -1517,19 +1536,18 @@ type StringListValue_List struct { func (*StringListValue_List) isStringListValue_Distribution() {} type BoolValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // If distribution is BoolList, value is only used to hold the value as it // mutates. // If no distribution is set, value is used as it mutates, i.e. constant // update. Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` - // Types that are assignable to Distribution: + // Types that are valid to be assigned to Distribution: // // *BoolValue_List - Distribution isBoolValue_Distribution `protobuf_oneof:"distribution"` + Distribution isBoolValue_Distribution `protobuf_oneof:"distribution"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *BoolValue) Reset() { @@ -1569,16 +1587,18 @@ func (x *BoolValue) GetValue() bool { return false } -func (m *BoolValue) GetDistribution() isBoolValue_Distribution { - if m != nil { - return m.Distribution +func (x *BoolValue) GetDistribution() isBoolValue_Distribution { + if x != nil { + return x.Distribution } return nil } func (x *BoolValue) GetList() *BoolList { - if x, ok := x.GetDistribution().(*BoolValue_List); ok { - return x.List + if x != nil { + if x, ok := x.Distribution.(*BoolValue_List); ok { + return x.List + } } return nil } @@ -1594,15 +1614,14 @@ type BoolValue_List struct { func (*BoolValue_List) isBoolValue_Distribution() {} type BoolList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The set of values which can be used. Options []bool `protobuf:"varint,1,rep,packed,name=options,proto3" json:"options,omitempty"` // Set to true to randomize selection of value from options. If false, the // values are cycled in order, starting at index 0. - Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"` + Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *BoolList) Reset() { @@ -1650,10 +1669,7 @@ func (x *BoolList) GetRandom() bool { } type UintValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // If distribution is UintRange, value is used as the initial value // inside [minimum, maximum] and hold the value as it mutates. // If distribution is UintList, value is only used to hold the value as it @@ -1661,11 +1677,13 @@ type UintValue struct { // If no distribution is set, value is used as it mutates, i.e. constant // update. Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` - // Types that are assignable to Distribution: + // Types that are valid to be assigned to Distribution: // // *UintValue_Range // *UintValue_List - Distribution isUintValue_Distribution `protobuf_oneof:"distribution"` + Distribution isUintValue_Distribution `protobuf_oneof:"distribution"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UintValue) Reset() { @@ -1705,23 +1723,27 @@ func (x *UintValue) GetValue() uint64 { return 0 } -func (m *UintValue) GetDistribution() isUintValue_Distribution { - if m != nil { - return m.Distribution +func (x *UintValue) GetDistribution() isUintValue_Distribution { + if x != nil { + return x.Distribution } return nil } func (x *UintValue) GetRange() *UintRange { - if x, ok := x.GetDistribution().(*UintValue_Range); ok { - return x.Range + if x != nil { + if x, ok := x.Distribution.(*UintValue_Range); ok { + return x.Range + } } return nil } func (x *UintValue) GetList() *UintList { - if x, ok := x.GetDistribution().(*UintValue_List); ok { - return x.List + if x != nil { + if x, ok := x.Distribution.(*UintValue_List); ok { + return x.List + } } return nil } @@ -1743,10 +1765,7 @@ func (*UintValue_Range) isUintValue_Distribution() {} func (*UintValue_List) isUintValue_Distribution() {} type UintRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The range of the value allowed. Minimum uint64 `protobuf:"varint,1,opt,name=minimum,proto3" json:"minimum,omitempty"` Maximum uint64 `protobuf:"varint,2,opt,name=maximum,proto3" json:"maximum,omitempty"` @@ -1755,8 +1774,10 @@ type UintRange struct { // minimum and maximum are still respected and values will saturate at the // boundaries if they are exceeded. If not set subsequent value is a value // randomly chosen between minimum and maximum. - DeltaMin int64 `protobuf:"varint,3,opt,name=delta_min,json=deltaMin,proto3" json:"delta_min,omitempty"` - DeltaMax int64 `protobuf:"varint,4,opt,name=delta_max,json=deltaMax,proto3" json:"delta_max,omitempty"` + DeltaMin int64 `protobuf:"varint,3,opt,name=delta_min,json=deltaMin,proto3" json:"delta_min,omitempty"` + DeltaMax int64 `protobuf:"varint,4,opt,name=delta_max,json=deltaMax,proto3" json:"delta_max,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UintRange) Reset() { @@ -1818,15 +1839,14 @@ func (x *UintRange) GetDeltaMax() int64 { } type UintList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The set of values which can be used. Options []uint64 `protobuf:"varint,1,rep,packed,name=options,proto3" json:"options,omitempty"` // Set to true to randomize selection of value from options. If false, the // values are cycled in order, starting at index 0. - Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"` + Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UintList) Reset() { @@ -1875,7 +1895,7 @@ func (x *UintList) GetRandom() bool { var File_github_com_openconfig_gnmi_testing_fake_proto_fake_proto protoreflect.FileDescriptor -var file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDesc = []byte{ +var file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDesc = string([]byte{ 0x0a, 0x38, 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, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x66, 0x61, 0x6b, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, @@ -2092,16 +2112,16 @@ var file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDesc = []by 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x66, 0x61, 0x6b, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x66, 0x61, 0x6b, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDescOnce sync.Once - file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDescData = file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDesc + file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDescData []byte ) func file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDescGZIP() []byte { file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDescOnce.Do(func() { - file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDescData) + file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDesc), len(file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDesc))) }) return file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDescData } @@ -2221,7 +2241,7 @@ func file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDesc), len(file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDesc)), NumEnums: 2, NumMessages: 22, NumExtensions: 0, @@ -2233,7 +2253,6 @@ func file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_init() { MessageInfos: file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_msgTypes, }.Build() File_github_com_openconfig_gnmi_testing_fake_proto_fake_proto = out.File - file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_rawDesc = nil file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_goTypes = nil file_github_com_openconfig_gnmi_testing_fake_proto_fake_proto_depIdxs = nil } diff --git a/api/go/github.com/openconfig/gnmi/testing/fake/proto/fake_grpc.pb.go b/api/go/github.com/openconfig/gnmi/testing/fake/proto/fake_grpc.pb.go old mode 100644 new mode 100755 diff --git a/api/go/gosdn/app/app.pb.go b/api/go/gosdn/app/app.pb.go old mode 100644 new mode 100755 index 8064592bd3de7f15d5080d99ae2a40d3546d4d9e..2f69f65da012e1aceb6291d3d379063c337dc3e8 --- a/api/go/gosdn/app/app.pb.go +++ b/api/go/gosdn/app/app.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/app/app.proto @@ -15,6 +15,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -25,13 +26,12 @@ const ( ) type AppRegisterRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Appname string `protobuf:"bytes,2,opt,name=appname,proto3" json:"appname,omitempty"` + Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Appname string `protobuf:"bytes,2,opt,name=appname,proto3" json:"appname,omitempty"` - Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AppRegisterRequest) Reset() { @@ -86,12 +86,11 @@ func (x *AppRegisterRequest) GetToken() string { } type AppRegisterResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Queueconnection string `protobuf:"bytes,2,opt,name=queueconnection,proto3" json:"queueconnection,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Queueconnection string `protobuf:"bytes,2,opt,name=queueconnection,proto3" json:"queueconnection,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AppRegisterResponse) Reset() { @@ -139,12 +138,11 @@ func (x *AppRegisterResponse) GetQueueconnection() string { } type AppDeregisterRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Appname string `protobuf:"bytes,2,opt,name=appname,proto3" json:"appname,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Appname string `protobuf:"bytes,2,opt,name=appname,proto3" json:"appname,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AppDeregisterRequest) Reset() { @@ -192,11 +190,10 @@ func (x *AppDeregisterRequest) GetAppname() string { } type AppDeregisterResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AppDeregisterResponse) Reset() { @@ -238,7 +235,7 @@ func (x *AppDeregisterResponse) GetTimestamp() int64 { var File_gosdn_app_app_proto protoreflect.FileDescriptor -var file_gosdn_app_app_proto_rawDesc = []byte{ +var file_gosdn_app_app_proto_rawDesc = string([]byte{ 0x0a, 0x13, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x61, 0x70, 0x70, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, @@ -290,16 +287,16 @@ var file_gosdn_app_app_proto_rawDesc = []byte{ 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_app_app_proto_rawDescOnce sync.Once - file_gosdn_app_app_proto_rawDescData = file_gosdn_app_app_proto_rawDesc + file_gosdn_app_app_proto_rawDescData []byte ) func file_gosdn_app_app_proto_rawDescGZIP() []byte { file_gosdn_app_app_proto_rawDescOnce.Do(func() { - file_gosdn_app_app_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_app_app_proto_rawDescData) + file_gosdn_app_app_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_app_app_proto_rawDesc), len(file_gosdn_app_app_proto_rawDesc))) }) return file_gosdn_app_app_proto_rawDescData } @@ -332,7 +329,7 @@ func file_gosdn_app_app_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_app_app_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_app_app_proto_rawDesc), len(file_gosdn_app_app_proto_rawDesc)), NumEnums: 0, NumMessages: 4, NumExtensions: 0, @@ -343,7 +340,6 @@ func file_gosdn_app_app_proto_init() { MessageInfos: file_gosdn_app_app_proto_msgTypes, }.Build() File_gosdn_app_app_proto = out.File - file_gosdn_app_app_proto_rawDesc = nil file_gosdn_app_app_proto_goTypes = nil file_gosdn_app_app_proto_depIdxs = nil } diff --git a/api/go/gosdn/app/app.pb.gw.go b/api/go/gosdn/app/app.pb.gw.go old mode 100644 new mode 100755 index 8ff05688f11ada4e8cbe589a431fa490e0e7a8b2..852173e5aff0f6702467464452ea95a238f33bb2 --- a/api/go/gosdn/app/app.pb.gw.go +++ b/api/go/gosdn/app/app.pb.gw.go @@ -10,6 +10,7 @@ package app import ( "context" + "errors" "io" "net/http" @@ -24,63 +25,62 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_AppService_Register_0(ctx context.Context, marshaler runtime.Marshaler, client AppServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AppRegisterRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AppRegisterRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Register(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AppService_Register_0(ctx context.Context, marshaler runtime.Marshaler, server AppServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AppRegisterRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AppRegisterRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Register(ctx, &protoReq) return msg, metadata, err - } func request_AppService_Deregister_0(ctx context.Context, marshaler runtime.Marshaler, client AppServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AppDeregisterRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AppDeregisterRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Deregister(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AppService_Deregister_0(ctx context.Context, marshaler runtime.Marshaler, server AppServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AppDeregisterRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AppDeregisterRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Deregister(ctx, &protoReq) return msg, metadata, err - } // RegisterAppServiceHandlerServer registers the http handlers for service AppService to "mux". @@ -89,16 +89,13 @@ func local_request_AppService_Deregister_0(ctx context.Context, marshaler runtim // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAppServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAppServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AppServiceServer) error { - - mux.Handle("POST", pattern_AppService_Register_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_AppService_Register_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.app.AppService/Register", runtime.WithHTTPPathPattern("/register")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.app.AppService/Register", runtime.WithHTTPPathPattern("/register")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -110,20 +107,15 @@ func RegisterAppServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AppService_Register_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_AppService_Deregister_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_AppService_Deregister_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.app.AppService/Deregister", runtime.WithHTTPPathPattern("/deregister")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.app.AppService/Deregister", runtime.WithHTTPPathPattern("/deregister")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -135,9 +127,7 @@ func RegisterAppServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AppService_Deregister_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -164,7 +154,6 @@ func RegisterAppServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.Ser } }() }() - return RegisterAppServiceHandler(ctx, mux, conn) } @@ -180,14 +169,11 @@ func RegisterAppServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AppServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAppServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AppServiceClient) error { - - mux.Handle("POST", pattern_AppService_Register_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_AppService_Register_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.app.AppService/Register", runtime.WithHTTPPathPattern("/register")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.app.AppService/Register", runtime.WithHTTPPathPattern("/register")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -198,18 +184,13 @@ func RegisterAppServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AppService_Register_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_AppService_Deregister_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_AppService_Deregister_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.app.AppService/Deregister", runtime.WithHTTPPathPattern("/deregister")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.app.AppService/Deregister", runtime.WithHTTPPathPattern("/deregister")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -220,22 +201,17 @@ func RegisterAppServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AppService_Deregister_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( - pattern_AppService_Register_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"register"}, "")) - + pattern_AppService_Register_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"register"}, "")) pattern_AppService_Deregister_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"deregister"}, "")) ) var ( - forward_AppService_Register_0 = runtime.ForwardResponseMessage - + forward_AppService_Register_0 = runtime.ForwardResponseMessage forward_AppService_Deregister_0 = runtime.ForwardResponseMessage ) diff --git a/api/go/gosdn/app/app_grpc.pb.go b/api/go/gosdn/app/app_grpc.pb.go old mode 100644 new mode 100755 diff --git a/api/go/gosdn/configurationmanagement/configurationmanagement.pb.go b/api/go/gosdn/configurationmanagement/configurationmanagement.pb.go old mode 100644 new mode 100755 index b4600ce3f5febf0339cd5e2d8608b8c65cd1ffff..1a8b68cabba56fc5ab1067360802da8fde8deba9 --- a/api/go/gosdn/configurationmanagement/configurationmanagement.pb.go +++ b/api/go/gosdn/configurationmanagement/configurationmanagement.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/configurationmanagement/configurationmanagement.proto @@ -14,6 +14,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -24,12 +25,11 @@ const ( ) type ExportSDNConfigRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ExportSDNConfigRequest) Reset() { @@ -77,12 +77,11 @@ func (x *ExportSDNConfigRequest) GetPid() string { } type ExportSDNConfigResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + SdnConfigData string `protobuf:"bytes,2,opt,name=sdnConfigData,proto3" json:"sdnConfigData,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - SdnConfigData string `protobuf:"bytes,2,opt,name=sdnConfigData,proto3" json:"sdnConfigData,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ExportSDNConfigResponse) Reset() { @@ -130,13 +129,12 @@ func (x *ExportSDNConfigResponse) GetSdnConfigData() string { } type ImportSDNConfigRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` + SdnConfigData string `protobuf:"bytes,3,opt,name=sdnConfigData,proto3" json:"sdnConfigData,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` - SdnConfigData string `protobuf:"bytes,3,opt,name=sdnConfigData,proto3" json:"sdnConfigData,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ImportSDNConfigRequest) Reset() { @@ -191,11 +189,10 @@ func (x *ImportSDNConfigRequest) GetSdnConfigData() string { } type ImportSDNConfigResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + sizeCache protoimpl.SizeCache } func (x *ImportSDNConfigResponse) Reset() { @@ -237,7 +234,7 @@ func (x *ImportSDNConfigResponse) GetTimestamp() int64 { var File_gosdn_configurationmanagement_configurationmanagement_proto protoreflect.FileDescriptor -var file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc = []byte{ +var file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc = string([]byte{ 0x0a, 0x3b, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x61, 0x6e, @@ -297,16 +294,16 @@ var file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc = [ 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 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_configurationmanagement_configurationmanagement_proto_rawDescOnce sync.Once - file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescData = file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc + file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescData []byte ) func file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescGZIP() []byte { file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescOnce.Do(func() { - file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescData) + file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc), len(file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc))) }) return file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescData } @@ -339,7 +336,7 @@ func file_gosdn_configurationmanagement_configurationmanagement_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc), len(file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc)), NumEnums: 0, NumMessages: 4, NumExtensions: 0, @@ -350,7 +347,6 @@ func file_gosdn_configurationmanagement_configurationmanagement_proto_init() { MessageInfos: file_gosdn_configurationmanagement_configurationmanagement_proto_msgTypes, }.Build() File_gosdn_configurationmanagement_configurationmanagement_proto = out.File - file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc = nil file_gosdn_configurationmanagement_configurationmanagement_proto_goTypes = nil file_gosdn_configurationmanagement_configurationmanagement_proto_depIdxs = nil } diff --git a/api/go/gosdn/configurationmanagement/configurationmanagement.pb.gw.go b/api/go/gosdn/configurationmanagement/configurationmanagement.pb.gw.go old mode 100644 new mode 100755 index a0a3160e0a336ac38a290d5115a1d5717ff1efcd..20532a16287ee289ec75dccd97ab6a8aa12286e9 --- a/api/go/gosdn/configurationmanagement/configurationmanagement.pb.gw.go +++ b/api/go/gosdn/configurationmanagement/configurationmanagement.pb.gw.go @@ -10,6 +10,7 @@ package core import ( "context" + "errors" "io" "net/http" @@ -24,151 +25,114 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - var ( - filter_ConfigurationManagementService_ExportSDNConfig_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join ) -func request_ConfigurationManagementService_ExportSDNConfig_0(ctx context.Context, marshaler runtime.Marshaler, client ConfigurationManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ExportSDNConfigRequest - var metadata runtime.ServerMetadata +var filter_ConfigurationManagementService_ExportSDNConfig_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +func request_ConfigurationManagementService_ExportSDNConfig_0(ctx context.Context, marshaler runtime.Marshaler, client ConfigurationManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - val string - ok bool - err error - _ = err + protoReq ExportSDNConfigRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pid"] + val, ok := pathParams["pid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pid") } - protoReq.Pid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ConfigurationManagementService_ExportSDNConfig_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ExportSDNConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ConfigurationManagementService_ExportSDNConfig_0(ctx context.Context, marshaler runtime.Marshaler, server ConfigurationManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ExportSDNConfigRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq ExportSDNConfigRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pid"] + val, ok := pathParams["pid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pid") } - protoReq.Pid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ConfigurationManagementService_ExportSDNConfig_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ExportSDNConfig(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_ConfigurationManagementService_ImportSDNConfig_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_ConfigurationManagementService_ImportSDNConfig_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_ConfigurationManagementService_ImportSDNConfig_0(ctx context.Context, marshaler runtime.Marshaler, client ConfigurationManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ImportSDNConfigRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq ImportSDNConfigRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pid"] + val, ok := pathParams["pid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pid") } - protoReq.Pid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ConfigurationManagementService_ImportSDNConfig_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ImportSDNConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ConfigurationManagementService_ImportSDNConfig_0(ctx context.Context, marshaler runtime.Marshaler, server ConfigurationManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ImportSDNConfigRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq ImportSDNConfigRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pid"] + val, ok := pathParams["pid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pid") } - protoReq.Pid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ConfigurationManagementService_ImportSDNConfig_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ImportSDNConfig(ctx, &protoReq) return msg, metadata, err - } // RegisterConfigurationManagementServiceHandlerServer registers the http handlers for service ConfigurationManagementService to "mux". @@ -177,16 +141,13 @@ func local_request_ConfigurationManagementService_ImportSDNConfig_0(ctx context. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterConfigurationManagementServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterConfigurationManagementServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ConfigurationManagementServiceServer) error { - - mux.Handle("GET", pattern_ConfigurationManagementService_ExportSDNConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_ConfigurationManagementService_ExportSDNConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.configurationmanagement.ConfigurationManagementService/ExportSDNConfig", runtime.WithHTTPPathPattern("/export/{pid}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.configurationmanagement.ConfigurationManagementService/ExportSDNConfig", runtime.WithHTTPPathPattern("/export/{pid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -198,20 +159,15 @@ func RegisterConfigurationManagementServiceHandlerServer(ctx context.Context, mu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ConfigurationManagementService_ExportSDNConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_ConfigurationManagementService_ImportSDNConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ConfigurationManagementService_ImportSDNConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.configurationmanagement.ConfigurationManagementService/ImportSDNConfig", runtime.WithHTTPPathPattern("/import/{pid}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.configurationmanagement.ConfigurationManagementService/ImportSDNConfig", runtime.WithHTTPPathPattern("/import/{pid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -223,9 +179,7 @@ func RegisterConfigurationManagementServiceHandlerServer(ctx context.Context, mu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ConfigurationManagementService_ImportSDNConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -252,7 +206,6 @@ func RegisterConfigurationManagementServiceHandlerFromEndpoint(ctx context.Conte } }() }() - return RegisterConfigurationManagementServiceHandler(ctx, mux, conn) } @@ -268,14 +221,11 @@ func RegisterConfigurationManagementServiceHandler(ctx context.Context, mux *run // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ConfigurationManagementServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterConfigurationManagementServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConfigurationManagementServiceClient) error { - - mux.Handle("GET", pattern_ConfigurationManagementService_ExportSDNConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_ConfigurationManagementService_ExportSDNConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.configurationmanagement.ConfigurationManagementService/ExportSDNConfig", runtime.WithHTTPPathPattern("/export/{pid}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.configurationmanagement.ConfigurationManagementService/ExportSDNConfig", runtime.WithHTTPPathPattern("/export/{pid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -286,18 +236,13 @@ func RegisterConfigurationManagementServiceHandlerClient(ctx context.Context, mu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ConfigurationManagementService_ExportSDNConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_ConfigurationManagementService_ImportSDNConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ConfigurationManagementService_ImportSDNConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.configurationmanagement.ConfigurationManagementService/ImportSDNConfig", runtime.WithHTTPPathPattern("/import/{pid}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.configurationmanagement.ConfigurationManagementService/ImportSDNConfig", runtime.WithHTTPPathPattern("/import/{pid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -308,22 +253,17 @@ func RegisterConfigurationManagementServiceHandlerClient(ctx context.Context, mu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ConfigurationManagementService_ImportSDNConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( pattern_ConfigurationManagementService_ExportSDNConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"export", "pid"}, "")) - pattern_ConfigurationManagementService_ImportSDNConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"import", "pid"}, "")) ) var ( forward_ConfigurationManagementService_ExportSDNConfig_0 = runtime.ForwardResponseMessage - forward_ConfigurationManagementService_ImportSDNConfig_0 = runtime.ForwardResponseMessage ) diff --git a/api/go/gosdn/configurationmanagement/configurationmanagement_grpc.pb.go b/api/go/gosdn/configurationmanagement/configurationmanagement_grpc.pb.go old mode 100644 new mode 100755 diff --git a/api/go/gosdn/conflict/conflict.pb.go b/api/go/gosdn/conflict/conflict.pb.go old mode 100644 new mode 100755 index a1c9d5c448ec17c6425096fa274d2387f262df62..89b844920edf23c2b9cd5f8549977f5386a45b50 --- a/api/go/gosdn/conflict/conflict.pb.go +++ b/api/go/gosdn/conflict/conflict.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/conflict/conflict.proto @@ -12,6 +12,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -22,11 +23,10 @@ const ( ) type Metadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ResourceVersion int64 `protobuf:"varint,1,opt,name=resourceVersion,proto3" json:"resourceVersion,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + ResourceVersion int64 `protobuf:"varint,1,opt,name=resourceVersion,proto3" json:"resourceVersion,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Metadata) Reset() { @@ -68,7 +68,7 @@ func (x *Metadata) GetResourceVersion() int64 { var File_gosdn_conflict_conflict_proto protoreflect.FileDescriptor -var file_gosdn_conflict_conflict_proto_rawDesc = []byte{ +var file_gosdn_conflict_conflict_proto_rawDesc = string([]byte{ 0x0a, 0x1d, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x1a, @@ -82,16 +82,16 @@ var file_gosdn_conflict_conflict_proto_rawDesc = []byte{ 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_conflict_conflict_proto_rawDescOnce sync.Once - file_gosdn_conflict_conflict_proto_rawDescData = file_gosdn_conflict_conflict_proto_rawDesc + file_gosdn_conflict_conflict_proto_rawDescData []byte ) func file_gosdn_conflict_conflict_proto_rawDescGZIP() []byte { file_gosdn_conflict_conflict_proto_rawDescOnce.Do(func() { - file_gosdn_conflict_conflict_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_conflict_conflict_proto_rawDescData) + file_gosdn_conflict_conflict_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_conflict_conflict_proto_rawDesc), len(file_gosdn_conflict_conflict_proto_rawDesc))) }) return file_gosdn_conflict_conflict_proto_rawDescData } @@ -117,7 +117,7 @@ func file_gosdn_conflict_conflict_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_conflict_conflict_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_conflict_conflict_proto_rawDesc), len(file_gosdn_conflict_conflict_proto_rawDesc)), NumEnums: 0, NumMessages: 1, NumExtensions: 0, @@ -128,7 +128,6 @@ func file_gosdn_conflict_conflict_proto_init() { MessageInfos: file_gosdn_conflict_conflict_proto_msgTypes, }.Build() File_gosdn_conflict_conflict_proto = out.File - file_gosdn_conflict_conflict_proto_rawDesc = nil file_gosdn_conflict_conflict_proto_goTypes = nil file_gosdn_conflict_conflict_proto_depIdxs = nil } diff --git a/api/go/gosdn/csbi/csbi.pb.go b/api/go/gosdn/csbi/csbi.pb.go old mode 100644 new mode 100755 index 55f5c6d639a4f5fd4a694cd22d02422e9fee2e3e..39d930645bb15dbf9cec3e90f86c4dc3a9328da6 --- a/api/go/gosdn/csbi/csbi.pb.go +++ b/api/go/gosdn/csbi/csbi.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/csbi/csbi.proto @@ -13,6 +13,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -81,13 +82,12 @@ func (State) EnumDescriptor() ([]byte, []int) { } type Syn struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + 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"` 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"` + sizeCache protoimpl.SizeCache } func (x *Syn) Reset() { @@ -142,12 +142,11 @@ func (x *Syn) GetAddress() string { } type Ack struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` 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=transport_option,json=transportOption,proto3" json:"transport_option,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Ack) Reset() { @@ -195,13 +194,12 @@ func (x *Ack) GetTransportOption() *transport.TransportOption { } type GetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + 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"` 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"` + sizeCache protoimpl.SizeCache } func (x *GetRequest) Reset() { @@ -256,13 +254,12 @@ func (x *GetRequest) GetDid() []string { } type GetPayloadRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` + File string `protobuf:"bytes,3,opt,name=file,proto3" json:"file,omitempty"` 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,opt,name=did,proto3" json:"did,omitempty"` - File string `protobuf:"bytes,3,opt,name=file,proto3" json:"file,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetPayloadRequest) Reset() { @@ -317,12 +314,11 @@ func (x *GetPayloadRequest) GetFile() string { } type GetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + 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"` 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"` + sizeCache protoimpl.SizeCache } func (x *GetResponse) Reset() { @@ -370,13 +366,12 @@ func (x *GetResponse) GetDeployments() []*Deployment { } type Deployment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + 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"` 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"` + sizeCache protoimpl.SizeCache } func (x *Deployment) Reset() { @@ -431,12 +426,11 @@ func (x *Deployment) GetState() State { } type CreateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` 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=transport_option,json=transportOption,proto3" json:"transport_option,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CreateRequest) Reset() { @@ -484,12 +478,11 @@ func (x *CreateRequest) GetTransportOption() []*transport.TransportOption { } type CreateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + 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"` 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"` + sizeCache protoimpl.SizeCache } func (x *CreateResponse) Reset() { @@ -537,11 +530,10 @@ func (x *CreateResponse) GetDeployments() []*Deployment { } type Payload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` unknownFields protoimpl.UnknownFields - - Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Payload) Reset() { @@ -582,12 +574,11 @@ func (x *Payload) GetChunk() []byte { } type DeleteRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + 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"` 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"` + sizeCache protoimpl.SizeCache } func (x *DeleteRequest) Reset() { @@ -635,11 +626,10 @@ func (x *DeleteRequest) GetDid() []string { } type DeleteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + sizeCache protoimpl.SizeCache } func (x *DeleteResponse) Reset() { @@ -681,7 +671,7 @@ func (x *DeleteResponse) GetTimestamp() int64 { var File_gosdn_csbi_csbi_proto protoreflect.FileDescriptor -var file_gosdn_csbi_csbi_proto_rawDesc = []byte{ +var file_gosdn_csbi_csbi_proto_rawDesc = string([]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, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, @@ -786,16 +776,16 @@ var file_gosdn_csbi_csbi_proto_rawDesc = []byte{ 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 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 + file_gosdn_csbi_csbi_proto_rawDescData []byte ) 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) + file_gosdn_csbi_csbi_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_csbi_csbi_proto_rawDesc), len(file_gosdn_csbi_csbi_proto_rawDesc))) }) return file_gosdn_csbi_csbi_proto_rawDescData } @@ -851,7 +841,7 @@ func file_gosdn_csbi_csbi_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_csbi_csbi_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_csbi_csbi_proto_rawDesc), len(file_gosdn_csbi_csbi_proto_rawDesc)), NumEnums: 1, NumMessages: 11, NumExtensions: 0, @@ -863,7 +853,6 @@ func file_gosdn_csbi_csbi_proto_init() { 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/api/go/gosdn/csbi/csbi_grpc.pb.go b/api/go/gosdn/csbi/csbi_grpc.pb.go old mode 100644 new mode 100755 diff --git a/api/go/gosdn/networkelement/networkelement.pb.go b/api/go/gosdn/networkelement/networkelement.pb.go old mode 100644 new mode 100755 index a58431fdb61a1a3eda72b3c3228141eeea634fb2..17e66647eb62526acac70faceba3524b7fa141a2 --- a/api/go/gosdn/networkelement/networkelement.pb.go +++ b/api/go/gosdn/networkelement/networkelement.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/networkelement/networkelement.proto @@ -19,6 +19,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -293,12 +294,11 @@ func (StreamMode) EnumDescriptor() ([]byte, []int) { // TODO: change name to fit the rest type UpdateNetworkElementRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` NetworkElement *ManagedNetworkElement `protobuf:"bytes,2,opt,name=network_element,json=networkElement,proto3" json:"network_element,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UpdateNetworkElementRequest) Reset() { @@ -346,11 +346,10 @@ func (x *UpdateNetworkElementRequest) GetNetworkElement() *ManagedNetworkElement } type UpdateNetworkElementResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UpdateNetworkElementResponse) Reset() { @@ -391,10 +390,7 @@ func (x *UpdateNetworkElementResponse) GetTimestamp() int64 { } type ManagedNetworkElement struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Model string `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"` @@ -405,6 +401,8 @@ type ManagedNetworkElement struct { Metadata *conflict.Metadata `protobuf:"bytes,8,opt,name=metadata,proto3" json:"metadata,omitempty"` AssociatedPnd string `protobuf:"bytes,9,opt,name=associated_pnd,json=associatedPnd,proto3" json:"associated_pnd,omitempty"` GnmiSubscribePaths []string `protobuf:"bytes,10,rep,name=gnmi_subscribe_paths,json=gnmiSubscribePaths,proto3" json:"gnmi_subscribe_paths,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ManagedNetworkElement) Reset() { @@ -508,14 +506,13 @@ func (x *ManagedNetworkElement) GetGnmiSubscribePaths() []string { } type FlattenedManagedNetworkElement struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` + Pluginid string `protobuf:"bytes,4,opt,name=pluginid,proto3" json:"pluginid,omitempty"` 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"` - Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` - Pluginid string `protobuf:"bytes,4,opt,name=pluginid,proto3" json:"pluginid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *FlattenedManagedNetworkElement) Reset() { @@ -577,12 +574,11 @@ func (x *FlattenedManagedNetworkElement) GetPluginid() string { } type GetAllRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetAllRequest) Reset() { @@ -630,15 +626,14 @@ func (x *GetAllRequest) GetPid() string { } type GetAllResponse 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. + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. - Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` - Mne []*ManagedNetworkElement `protobuf:"bytes,3,rep,name=mne,proto3" json:"mne,omitempty"` + Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` + Mne []*ManagedNetworkElement `protobuf:"bytes,3,rep,name=mne,proto3" json:"mne,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetAllResponse) Reset() { @@ -693,12 +688,11 @@ func (x *GetAllResponse) GetMne() []*ManagedNetworkElement { } type GetAllFlattenedRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetAllFlattenedRequest) Reset() { @@ -746,15 +740,14 @@ func (x *GetAllFlattenedRequest) GetPid() string { } type GetAllFlattenedResponse 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. + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. - Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` - Mne []*FlattenedManagedNetworkElement `protobuf:"bytes,3,rep,name=mne,proto3" json:"mne,omitempty"` + Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` + Mne []*FlattenedManagedNetworkElement `protobuf:"bytes,3,rep,name=mne,proto3" json:"mne,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetAllFlattenedResponse) Reset() { @@ -809,12 +802,11 @@ func (x *GetAllFlattenedResponse) GetMne() []*FlattenedManagedNetworkElement { } type ParseYangRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Yang string `protobuf:"bytes,2,opt,name=yang,proto3" json:"yang,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Yang string `protobuf:"bytes,2,opt,name=yang,proto3" json:"yang,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ParseYangRequest) Reset() { @@ -862,12 +854,11 @@ func (x *ParseYangRequest) GetYang() string { } type ParseYangResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Json string `protobuf:"bytes,2,opt,name=json,proto3" json:"json,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Json string `protobuf:"bytes,2,opt,name=json,proto3" json:"json,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ParseYangResponse) Reset() { @@ -915,13 +906,12 @@ func (x *ParseYangResponse) GetJson() string { } type GetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` + Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` - Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetRequest) Reset() { @@ -976,15 +966,14 @@ func (x *GetRequest) GetPid() string { } 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. + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. - Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` - Mne *ManagedNetworkElement `protobuf:"bytes,3,opt,name=mne,proto3" json:"mne,omitempty"` + Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` + Mne *ManagedNetworkElement `protobuf:"bytes,3,opt,name=mne,proto3" json:"mne,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetResponse) Reset() { @@ -1039,13 +1028,12 @@ func (x *GetResponse) GetMne() *ManagedNetworkElement { } type GetFlattenedRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` + Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` - Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetFlattenedRequest) Reset() { @@ -1100,15 +1088,14 @@ func (x *GetFlattenedRequest) GetPid() string { } type GetFlattenedResponse 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. + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. - Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` - Mne *FlattenedManagedNetworkElement `protobuf:"bytes,3,opt,name=mne,proto3" json:"mne,omitempty"` + Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` + Mne *FlattenedManagedNetworkElement `protobuf:"bytes,3,opt,name=mne,proto3" json:"mne,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetFlattenedResponse) Reset() { @@ -1163,10 +1150,7 @@ func (x *GetFlattenedResponse) GetMne() *FlattenedManagedNetworkElement { } type SetMne struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` PluginId string `protobuf:"bytes,3,opt,name=pluginId,proto3" json:"pluginId,omitempty"` @@ -1174,6 +1158,8 @@ type SetMne struct { TransportOption *transport.TransportOption `protobuf:"bytes,5,opt,name=transport_option,json=transportOption,proto3" json:"transport_option,omitempty"` GnmiSubscribePaths []string `protobuf:"bytes,6,rep,name=gnmi_subscribe_paths,json=gnmiSubscribePaths,proto3" json:"gnmi_subscribe_paths,omitempty"` MneId string `protobuf:"bytes,7,opt,name=mne_id,json=mneId,proto3" json:"mne_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SetMne) Reset() { @@ -1256,13 +1242,12 @@ func (x *SetMne) GetMneId() string { } type AddListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Mne []*SetMne `protobuf:"bytes,2,rep,name=mne,proto3" json:"mne,omitempty"` + Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Mne []*SetMne `protobuf:"bytes,2,rep,name=mne,proto3" json:"mne,omitempty"` - Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AddListRequest) Reset() { @@ -1317,12 +1302,11 @@ func (x *AddListRequest) GetPid() string { } type AddListResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Responses []*SetResponse `protobuf:"bytes,2,rep,name=responses,proto3" json:"responses,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Responses []*SetResponse `protobuf:"bytes,2,rep,name=responses,proto3" json:"responses,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AddListResponse) Reset() { @@ -1370,14 +1354,13 @@ func (x *AddListResponse) GetResponses() []*SetResponse { } type GetPathRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` + Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` + Pid string `protobuf:"bytes,4,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` - Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` - Pid string `protobuf:"bytes,4,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetPathRequest) Reset() { @@ -1439,15 +1422,14 @@ func (x *GetPathRequest) GetPid() string { } type GetPathResponse 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. + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` MneNotification []*gnmi.Notification `protobuf:"bytes,3,rep,name=mne_notification,json=mneNotification,proto3" json:"mne_notification,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetPathResponse) Reset() { @@ -1502,14 +1484,13 @@ func (x *GetPathResponse) GetMneNotification() []*gnmi.Notification { } type GetIntendedPathRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` + IntendedPath string `protobuf:"bytes,3,opt,name=intended_path,json=intendedPath,proto3" json:"intended_path,omitempty"` + Pid string `protobuf:"bytes,4,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` - IntendedPath string `protobuf:"bytes,3,opt,name=intended_path,json=intendedPath,proto3" json:"intended_path,omitempty"` - Pid string `protobuf:"bytes,4,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetIntendedPathRequest) Reset() { @@ -1571,13 +1552,12 @@ func (x *GetIntendedPathRequest) GetPid() string { } type GetIntendedPathResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Timestamp int64 `protobuf:"varint,64,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` MneNotification []*gnmi.Notification `protobuf:"bytes,3,rep,name=mne_notification,json=mneNotification,proto3" json:"mne_notification,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetIntendedPathResponse) Reset() { @@ -1632,12 +1612,11 @@ func (x *GetIntendedPathResponse) GetMneNotification() []*gnmi.Notification { } type SetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + 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"` 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"` + sizeCache protoimpl.SizeCache } func (x *SetResponse) Reset() { @@ -1685,13 +1664,12 @@ func (x *SetResponse) GetId() string { } type SetPathListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + ChangeRequest []*ChangeRequest `protobuf:"bytes,2,rep,name=change_request,json=changeRequest,proto3" json:"change_request,omitempty"` + Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - ChangeRequest []*ChangeRequest `protobuf:"bytes,2,rep,name=change_request,json=changeRequest,proto3" json:"change_request,omitempty"` - Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetPathListRequest) Reset() { @@ -1746,12 +1724,11 @@ func (x *SetPathListRequest) GetPid() string { } type SetPathListResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Responses []*SetResponse `protobuf:"bytes,2,rep,name=responses,proto3" json:"responses,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Responses []*SetResponse `protobuf:"bytes,2,rep,name=responses,proto3" json:"responses,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetPathListResponse) Reset() { @@ -1799,13 +1776,12 @@ func (x *SetPathListResponse) GetResponses() []*SetResponse { } type DeleteRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` + Mneid string `protobuf:"bytes,3,opt,name=mneid,proto3" json:"mneid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` - Mneid string `protobuf:"bytes,3,opt,name=mneid,proto3" json:"mneid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteRequest) Reset() { @@ -1860,11 +1836,10 @@ func (x *DeleteRequest) GetMneid() string { } type DeleteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + sizeCache protoimpl.SizeCache } func (x *DeleteResponse) Reset() { @@ -1905,14 +1880,13 @@ func (x *DeleteResponse) GetTimestamp() int64 { } type Change struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + 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 ChangeState `protobuf:"varint,3,opt,name=state,proto3,enum=gosdn.networkelement.ChangeState" json:"state,omitempty"` + Diff *gnmi.Notification `protobuf:"bytes,4,opt,name=diff,proto3" json:"diff,omitempty"` 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 ChangeState `protobuf:"varint,3,opt,name=state,proto3,enum=gosdn.networkelement.ChangeState" json:"state,omitempty"` - Diff *gnmi.Notification `protobuf:"bytes,4,opt,name=diff,proto3" json:"diff,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Change) Reset() { @@ -1974,14 +1948,13 @@ func (x *Change) GetDiff() *gnmi.Notification { } type ChangeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Mneid string `protobuf:"bytes,1,opt,name=mneid,proto3" json:"mneid,omitempty"` + Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + Value *gnmi.TypedValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + ApiOp ApiOperation `protobuf:"varint,4,opt,name=api_op,json=apiOp,proto3,enum=gosdn.networkelement.ApiOperation" json:"api_op,omitempty"` unknownFields protoimpl.UnknownFields - - Mneid string `protobuf:"bytes,1,opt,name=mneid,proto3" json:"mneid,omitempty"` - Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - Value *gnmi.TypedValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - ApiOp ApiOperation `protobuf:"varint,4,opt,name=api_op,json=apiOp,proto3,enum=gosdn.networkelement.ApiOperation" json:"api_op,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ChangeRequest) Reset() { @@ -2043,12 +2016,11 @@ func (x *ChangeRequest) GetApiOp() ApiOperation { } type SetChange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Cuid string `protobuf:"bytes,1,opt,name=cuid,proto3" json:"cuid,omitempty"` + Op Operation `protobuf:"varint,2,opt,name=op,proto3,enum=gosdn.networkelement.Operation" json:"op,omitempty"` unknownFields protoimpl.UnknownFields - - Cuid string `protobuf:"bytes,1,opt,name=cuid,proto3" json:"cuid,omitempty"` - Op Operation `protobuf:"varint,2,opt,name=op,proto3,enum=gosdn.networkelement.Operation" json:"op,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetChange) Reset() { @@ -2096,12 +2068,11 @@ func (x *SetChange) GetOp() Operation { } type GetChangeListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetChangeListRequest) Reset() { @@ -2149,15 +2120,14 @@ func (x *GetChangeListRequest) GetPid() string { } type GetChangeListResponse 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. + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. - Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` - Change []*Change `protobuf:"bytes,3,rep,name=change,proto3" json:"change,omitempty"` + Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` + Change []*Change `protobuf:"bytes,3,rep,name=change,proto3" json:"change,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetChangeListResponse) Reset() { @@ -2212,13 +2182,12 @@ func (x *GetChangeListResponse) GetChange() []*Change { } type GetChangeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Cuid []string `protobuf:"bytes,2,rep,name=cuid,proto3" json:"cuid,omitempty"` + Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Cuid []string `protobuf:"bytes,2,rep,name=cuid,proto3" json:"cuid,omitempty"` - Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetChangeRequest) Reset() { @@ -2273,15 +2242,14 @@ func (x *GetChangeRequest) GetPid() string { } type GetChangeResponse 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. + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. // TODO: Check if this is really needed. Perhaps a reference to the PND's ID // is also sufficient. - Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` - Change []*Change `protobuf:"bytes,3,rep,name=change,proto3" json:"change,omitempty"` + Pnd *pnd.PrincipalNetworkDomain `protobuf:"bytes,2,opt,name=pnd,proto3" json:"pnd,omitempty"` + Change []*Change `protobuf:"bytes,3,rep,name=change,proto3" json:"change,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetChangeResponse) Reset() { @@ -2336,13 +2304,12 @@ func (x *GetChangeResponse) GetChange() []*Change { } type SetChangeListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Change []*SetChange `protobuf:"bytes,2,rep,name=change,proto3" json:"change,omitempty"` + Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Change []*SetChange `protobuf:"bytes,2,rep,name=change,proto3" json:"change,omitempty"` - Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetChangeListRequest) Reset() { @@ -2397,12 +2364,11 @@ func (x *SetChangeListRequest) GetPid() string { } type SetChangeListResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Responses []*SetResponse `protobuf:"bytes,2,rep,name=responses,proto3" json:"responses,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Responses []*SetResponse `protobuf:"bytes,2,rep,name=responses,proto3" json:"responses,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetChangeListResponse) Reset() { @@ -2452,12 +2418,11 @@ func (x *SetChangeListResponse) GetResponses() []*SetResponse { // The mode determines how the target should trigger updates to be sent. // Reference: gNMI Specification Section 3.5.1.2 type SubscriptionList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Subscription []*Subscription `protobuf:"bytes,1,rep,name=subscription,proto3" json:"subscription,omitempty"` + Mode SubscriptionMode `protobuf:"varint,2,opt,name=mode,proto3,enum=gosdn.networkelement.SubscriptionMode" json:"mode,omitempty"` unknownFields protoimpl.UnknownFields - - Subscription []*Subscription `protobuf:"bytes,1,rep,name=subscription,proto3" json:"subscription,omitempty"` - Mode SubscriptionMode `protobuf:"varint,2,opt,name=mode,proto3,enum=gosdn.networkelement.SubscriptionMode" json:"mode,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SubscriptionList) Reset() { @@ -2505,13 +2470,12 @@ func (x *SubscriptionList) GetMode() SubscriptionMode { } type Subscription struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - StreamMode StreamMode `protobuf:"varint,2,opt,name=stream_mode,json=streamMode,proto3,enum=gosdn.networkelement.StreamMode" json:"stream_mode,omitempty"` - SampleInterval uint64 `protobuf:"varint,3,opt,name=sample_interval,json=sampleInterval,proto3" json:"sample_interval,omitempty"` // time in ns between samples in SAMPLE mode. + state protoimpl.MessageState `protogen:"open.v1"` + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + StreamMode StreamMode `protobuf:"varint,2,opt,name=stream_mode,json=streamMode,proto3,enum=gosdn.networkelement.StreamMode" json:"stream_mode,omitempty"` + SampleInterval uint64 `protobuf:"varint,3,opt,name=sample_interval,json=sampleInterval,proto3" json:"sample_interval,omitempty"` // time in ns between samples in SAMPLE mode. + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Subscription) Reset() { @@ -2566,14 +2530,13 @@ func (x *Subscription) GetSampleInterval() uint64 { } type SubscribePathRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` + Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` + Sublist *SubscriptionList `protobuf:"bytes,4,opt,name=sublist,proto3" json:"sublist,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` - Pid string `protobuf:"bytes,3,opt,name=pid,proto3" json:"pid,omitempty"` - Sublist *SubscriptionList `protobuf:"bytes,4,opt,name=sublist,proto3" json:"sublist,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SubscribePathRequest) Reset() { @@ -2635,12 +2598,11 @@ func (x *SubscribePathRequest) GetSublist() *SubscriptionList { } type SubscribePathResponse 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. - MneNotification []*gnmi.Notification `protobuf:"bytes,2,rep,name=mne_notification,json=mneNotification,proto3" json:"mne_notification,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + MneNotification []*gnmi.Notification `protobuf:"bytes,2,rep,name=mne_notification,json=mneNotification,proto3" json:"mne_notification,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SubscribePathResponse) Reset() { @@ -2689,7 +2651,7 @@ func (x *SubscribePathResponse) GetMneNotification() []*gnmi.Notification { var File_gosdn_networkelement_networkelement_proto protoreflect.FileDescriptor -var file_gosdn_networkelement_networkelement_proto_rawDesc = []byte{ +var file_gosdn_networkelement_networkelement_proto_rawDesc = string([]byte{ 0x0a, 0x29, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x67, 0x6f, 0x73, @@ -3212,16 +3174,16 @@ var file_gosdn_networkelement_networkelement_proto_rawDesc = []byte{ 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_networkelement_networkelement_proto_rawDescOnce sync.Once - file_gosdn_networkelement_networkelement_proto_rawDescData = file_gosdn_networkelement_networkelement_proto_rawDesc + file_gosdn_networkelement_networkelement_proto_rawDescData []byte ) func file_gosdn_networkelement_networkelement_proto_rawDescGZIP() []byte { file_gosdn_networkelement_networkelement_proto_rawDescOnce.Do(func() { - file_gosdn_networkelement_networkelement_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_networkelement_networkelement_proto_rawDescData) + file_gosdn_networkelement_networkelement_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_networkelement_networkelement_proto_rawDesc), len(file_gosdn_networkelement_networkelement_proto_rawDesc))) }) return file_gosdn_networkelement_networkelement_proto_rawDescData } @@ -3367,7 +3329,7 @@ func file_gosdn_networkelement_networkelement_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_networkelement_networkelement_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_networkelement_networkelement_proto_rawDesc), len(file_gosdn_networkelement_networkelement_proto_rawDesc)), NumEnums: 5, NumMessages: 39, NumExtensions: 0, @@ -3379,7 +3341,6 @@ func file_gosdn_networkelement_networkelement_proto_init() { MessageInfos: file_gosdn_networkelement_networkelement_proto_msgTypes, }.Build() File_gosdn_networkelement_networkelement_proto = out.File - file_gosdn_networkelement_networkelement_proto_rawDesc = nil file_gosdn_networkelement_networkelement_proto_goTypes = nil file_gosdn_networkelement_networkelement_proto_depIdxs = nil } diff --git a/api/go/gosdn/networkelement/networkelement.pb.gw.go b/api/go/gosdn/networkelement/networkelement.pb.gw.go old mode 100644 new mode 100755 index 64219868860f12e1bb95dd99216649a21ec61704..409a3a5a49e9847619b07b02b5de6583db065547 --- a/api/go/gosdn/networkelement/networkelement.pb.gw.go +++ b/api/go/gosdn/networkelement/networkelement.pb.gw.go @@ -10,6 +10,7 @@ package networkelement import ( "context" + "errors" "io" "net/http" @@ -24,613 +25,488 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_NetworkElementService_Update_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateNetworkElementRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq UpdateNetworkElementRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Update(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_Update_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateNetworkElementRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq UpdateNetworkElementRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Update(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_NetworkElementService_GetAllFlattened_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_NetworkElementService_GetAllFlattened_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_NetworkElementService_GetAllFlattened_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllFlattenedRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetAllFlattenedRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetAllFlattened_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetAllFlattened(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_GetAllFlattened_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllFlattenedRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetAllFlattenedRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetAllFlattened_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetAllFlattened(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_NetworkElementService_Get_0 = &utilities.DoubleArray{Encoding: map[string]int{"mneid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_NetworkElementService_Get_0 = &utilities.DoubleArray{Encoding: map[string]int{"mneid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_NetworkElementService_Get_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["mneid"] + val, ok := pathParams["mneid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Mneid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_Get_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Get(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_Get_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["mneid"] + val, ok := pathParams["mneid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Mneid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_Get_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Get(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_NetworkElementService_ParseYang_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_NetworkElementService_ParseYang_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_NetworkElementService_ParseYang_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ParseYangRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ParseYangRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_ParseYang_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ParseYang(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_ParseYang_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ParseYangRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ParseYangRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_ParseYang_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ParseYang(ctx, &protoReq) return msg, metadata, err - } func request_NetworkElementService_AddList_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddListRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AddListRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.AddList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_AddList_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddListRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AddListRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.AddList(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_NetworkElementService_GetPath_0 = &utilities.DoubleArray{Encoding: map[string]int{"mneid": 0, "path": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} -) +var filter_NetworkElementService_GetPath_0 = &utilities.DoubleArray{Encoding: map[string]int{"mneid": 0, "path": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} func request_NetworkElementService_GetPath_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPathRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetPathRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["mneid"] + val, ok := pathParams["mneid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Mneid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } - val, ok = pathParams["path"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") } - protoReq.Path, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetPath_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetPath(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_GetPath_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPathRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetPathRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["mneid"] + val, ok := pathParams["mneid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Mneid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } - val, ok = pathParams["path"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") } - protoReq.Path, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetPath_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetPath(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_NetworkElementService_GetIntendedPath_0 = &utilities.DoubleArray{Encoding: map[string]int{"mneid": 0, "intended_path": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} -) +var filter_NetworkElementService_GetIntendedPath_0 = &utilities.DoubleArray{Encoding: map[string]int{"mneid": 0, "intended_path": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} func request_NetworkElementService_GetIntendedPath_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetIntendedPathRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetIntendedPathRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["mneid"] + val, ok := pathParams["mneid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Mneid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } - val, ok = pathParams["intended_path"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "intended_path") } - protoReq.IntendedPath, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "intended_path", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetIntendedPath_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetIntendedPath(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_GetIntendedPath_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetIntendedPathRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetIntendedPathRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["mneid"] + val, ok := pathParams["mneid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Mneid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } - val, ok = pathParams["intended_path"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "intended_path") } - protoReq.IntendedPath, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "intended_path", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetIntendedPath_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetIntendedPath(ctx, &protoReq) return msg, metadata, err - } func request_NetworkElementService_SetPathList_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetPathListRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SetPathListRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.SetPathList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_SetPathList_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetPathListRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SetPathListRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.SetPathList(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_NetworkElementService_Delete_0 = &utilities.DoubleArray{Encoding: map[string]int{"mneid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_NetworkElementService_Delete_0 = &utilities.DoubleArray{Encoding: map[string]int{"mneid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_NetworkElementService_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeleteRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["mneid"] + val, ok := pathParams["mneid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Mneid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_Delete_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Delete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeleteRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["mneid"] + val, ok := pathParams["mneid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Mneid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_Delete_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Delete(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_NetworkElementService_GetChangeList_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_NetworkElementService_GetChangeList_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_NetworkElementService_GetChangeList_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetChangeListRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetChangeListRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetChangeList_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetChangeList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_GetChangeList_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetChangeListRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetChangeListRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetChangeList_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetChangeList(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_NetworkElementService_GetChange_0 = &utilities.DoubleArray{Encoding: map[string]int{"cuid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_NetworkElementService_GetChange_0 = &utilities.DoubleArray{Encoding: map[string]int{"cuid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_NetworkElementService_GetChange_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetChangeRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetChangeRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["cuid"] + val, ok := pathParams["cuid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "cuid") } - protoReq.Cuid, err = runtime.StringSlice(val, ",") if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "cuid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetChange_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetChange(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_GetChange_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetChangeRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetChangeRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["cuid"] + val, ok := pathParams["cuid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "cuid") } - protoReq.Cuid, err = runtime.StringSlice(val, ",") if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "cuid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NetworkElementService_GetChange_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetChange(ctx, &protoReq) return msg, metadata, err - } func request_NetworkElementService_SetChangeList_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkElementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetChangeListRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SetChangeListRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.SetChangeList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NetworkElementService_SetChangeList_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkElementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetChangeListRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq SetChangeListRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.SetChangeList(ctx, &protoReq) return msg, metadata, err - } // RegisterNetworkElementServiceHandlerServer registers the http handlers for service NetworkElementService to "mux". @@ -639,16 +515,13 @@ func local_request_NetworkElementService_SetChangeList_0(ctx context.Context, ma // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNetworkElementServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NetworkElementServiceServer) error { - - mux.Handle("POST", pattern_NetworkElementService_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_NetworkElementService_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Update", runtime.WithHTTPPathPattern("/network-element/update")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Update", runtime.WithHTTPPathPattern("/network-element/update")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -660,20 +533,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_Update_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_GetAllFlattened_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_GetAllFlattened_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetAllFlattened", runtime.WithHTTPPathPattern("/mnes")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetAllFlattened", runtime.WithHTTPPathPattern("/mnes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -685,20 +553,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_GetAllFlattened_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Get", runtime.WithHTTPPathPattern("/mnes/{mneid}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Get", runtime.WithHTTPPathPattern("/mnes/{mneid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -710,20 +573,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_Get_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_ParseYang_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_ParseYang_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/ParseYang", runtime.WithHTTPPathPattern("/yang/parse")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/ParseYang", runtime.WithHTTPPathPattern("/yang/parse")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -735,20 +593,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_ParseYang_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_NetworkElementService_AddList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_NetworkElementService_AddList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/AddList", runtime.WithHTTPPathPattern("/mnes")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/AddList", runtime.WithHTTPPathPattern("/mnes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -760,20 +613,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_AddList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_GetPath_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_GetPath_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetPath", runtime.WithHTTPPathPattern("/mnes/{mneid}/paths/{path}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetPath", runtime.WithHTTPPathPattern("/mnes/{mneid}/paths/{path}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -785,20 +633,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_GetPath_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_GetIntendedPath_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_GetIntendedPath_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetIntendedPath", runtime.WithHTTPPathPattern("/mnes/{mneid}/intendedpaths/{intended_path}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetIntendedPath", runtime.WithHTTPPathPattern("/mnes/{mneid}/intendedpaths/{intended_path}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -810,20 +653,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_GetIntendedPath_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_NetworkElementService_SetPathList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_NetworkElementService_SetPathList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/SetPathList", runtime.WithHTTPPathPattern("/mnes/paths")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/SetPathList", runtime.WithHTTPPathPattern("/mnes/paths")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -835,20 +673,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_SetPathList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_NetworkElementService_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_NetworkElementService_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Delete", runtime.WithHTTPPathPattern("/mnes/{mneid}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Delete", runtime.WithHTTPPathPattern("/mnes/{mneid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -860,20 +693,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_GetChangeList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_GetChangeList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetChangeList", runtime.WithHTTPPathPattern("/mnes/changes")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetChangeList", runtime.WithHTTPPathPattern("/mnes/changes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -885,20 +713,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_GetChangeList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_GetChange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_GetChange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetChange", runtime.WithHTTPPathPattern("/mnes/changes/{cuid}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetChange", runtime.WithHTTPPathPattern("/mnes/changes/{cuid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -910,20 +733,15 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_GetChange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_NetworkElementService_SetChangeList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_NetworkElementService_SetChangeList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/SetChangeList", runtime.WithHTTPPathPattern("/mnes/changes")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/SetChangeList", runtime.WithHTTPPathPattern("/mnes/changes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -935,9 +753,7 @@ func RegisterNetworkElementServiceHandlerServer(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_SetChangeList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -964,7 +780,6 @@ func RegisterNetworkElementServiceHandlerFromEndpoint(ctx context.Context, mux * } }() }() - return RegisterNetworkElementServiceHandler(ctx, mux, conn) } @@ -980,14 +795,11 @@ func RegisterNetworkElementServiceHandler(ctx context.Context, mux *runtime.Serv // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "NetworkElementServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NetworkElementServiceClient) error { - - mux.Handle("POST", pattern_NetworkElementService_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_NetworkElementService_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Update", runtime.WithHTTPPathPattern("/network-element/update")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Update", runtime.WithHTTPPathPattern("/network-element/update")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -998,18 +810,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_Update_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_GetAllFlattened_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_GetAllFlattened_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetAllFlattened", runtime.WithHTTPPathPattern("/mnes")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetAllFlattened", runtime.WithHTTPPathPattern("/mnes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1020,18 +827,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_GetAllFlattened_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Get", runtime.WithHTTPPathPattern("/mnes/{mneid}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Get", runtime.WithHTTPPathPattern("/mnes/{mneid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1042,18 +844,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_Get_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_ParseYang_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_ParseYang_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/ParseYang", runtime.WithHTTPPathPattern("/yang/parse")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/ParseYang", runtime.WithHTTPPathPattern("/yang/parse")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1064,18 +861,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_ParseYang_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_NetworkElementService_AddList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_NetworkElementService_AddList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/AddList", runtime.WithHTTPPathPattern("/mnes")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/AddList", runtime.WithHTTPPathPattern("/mnes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1086,18 +878,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_AddList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_GetPath_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_GetPath_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetPath", runtime.WithHTTPPathPattern("/mnes/{mneid}/paths/{path}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetPath", runtime.WithHTTPPathPattern("/mnes/{mneid}/paths/{path}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1108,18 +895,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_GetPath_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_GetIntendedPath_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_GetIntendedPath_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetIntendedPath", runtime.WithHTTPPathPattern("/mnes/{mneid}/intendedpaths/{intended_path}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetIntendedPath", runtime.WithHTTPPathPattern("/mnes/{mneid}/intendedpaths/{intended_path}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1130,18 +912,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_GetIntendedPath_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_NetworkElementService_SetPathList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_NetworkElementService_SetPathList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/SetPathList", runtime.WithHTTPPathPattern("/mnes/paths")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/SetPathList", runtime.WithHTTPPathPattern("/mnes/paths")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1152,18 +929,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_SetPathList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_NetworkElementService_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_NetworkElementService_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Delete", runtime.WithHTTPPathPattern("/mnes/{mneid}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/Delete", runtime.WithHTTPPathPattern("/mnes/{mneid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1174,18 +946,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_GetChangeList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_GetChangeList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetChangeList", runtime.WithHTTPPathPattern("/mnes/changes")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetChangeList", runtime.WithHTTPPathPattern("/mnes/changes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1196,18 +963,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_GetChangeList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_NetworkElementService_GetChange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NetworkElementService_GetChange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetChange", runtime.WithHTTPPathPattern("/mnes/changes/{cuid}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/GetChange", runtime.WithHTTPPathPattern("/mnes/changes/{cuid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1218,18 +980,13 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_GetChange_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_NetworkElementService_SetChangeList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_NetworkElementService_SetChangeList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/SetChangeList", runtime.WithHTTPPathPattern("/mnes/changes")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.networkelement.NetworkElementService/SetChangeList", runtime.WithHTTPPathPattern("/mnes/changes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1240,62 +997,37 @@ func RegisterNetworkElementServiceHandlerClient(ctx context.Context, mux *runtim runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NetworkElementService_SetChangeList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( - pattern_NetworkElementService_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"network-element", "update"}, "")) - + pattern_NetworkElementService_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"network-element", "update"}, "")) pattern_NetworkElementService_GetAllFlattened_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"mnes"}, "")) - - pattern_NetworkElementService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"mnes", "mneid"}, "")) - - pattern_NetworkElementService_ParseYang_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"yang", "parse"}, "")) - - pattern_NetworkElementService_AddList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"mnes"}, "")) - - pattern_NetworkElementService_GetPath_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"mnes", "mneid", "paths", "path"}, "")) - + pattern_NetworkElementService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"mnes", "mneid"}, "")) + pattern_NetworkElementService_ParseYang_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"yang", "parse"}, "")) + pattern_NetworkElementService_AddList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"mnes"}, "")) + pattern_NetworkElementService_GetPath_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"mnes", "mneid", "paths", "path"}, "")) pattern_NetworkElementService_GetIntendedPath_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"mnes", "mneid", "intendedpaths", "intended_path"}, "")) - - pattern_NetworkElementService_SetPathList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"mnes", "paths"}, "")) - - pattern_NetworkElementService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"mnes", "mneid"}, "")) - - pattern_NetworkElementService_GetChangeList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"mnes", "changes"}, "")) - - pattern_NetworkElementService_GetChange_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"mnes", "changes", "cuid"}, "")) - - pattern_NetworkElementService_SetChangeList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"mnes", "changes"}, "")) + pattern_NetworkElementService_SetPathList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"mnes", "paths"}, "")) + pattern_NetworkElementService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"mnes", "mneid"}, "")) + pattern_NetworkElementService_GetChangeList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"mnes", "changes"}, "")) + pattern_NetworkElementService_GetChange_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"mnes", "changes", "cuid"}, "")) + pattern_NetworkElementService_SetChangeList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"mnes", "changes"}, "")) ) var ( - forward_NetworkElementService_Update_0 = runtime.ForwardResponseMessage - + forward_NetworkElementService_Update_0 = runtime.ForwardResponseMessage forward_NetworkElementService_GetAllFlattened_0 = runtime.ForwardResponseMessage - - forward_NetworkElementService_Get_0 = runtime.ForwardResponseMessage - - forward_NetworkElementService_ParseYang_0 = runtime.ForwardResponseMessage - - forward_NetworkElementService_AddList_0 = runtime.ForwardResponseMessage - - forward_NetworkElementService_GetPath_0 = runtime.ForwardResponseMessage - + forward_NetworkElementService_Get_0 = runtime.ForwardResponseMessage + forward_NetworkElementService_ParseYang_0 = runtime.ForwardResponseMessage + forward_NetworkElementService_AddList_0 = runtime.ForwardResponseMessage + forward_NetworkElementService_GetPath_0 = runtime.ForwardResponseMessage forward_NetworkElementService_GetIntendedPath_0 = runtime.ForwardResponseMessage - - forward_NetworkElementService_SetPathList_0 = runtime.ForwardResponseMessage - - forward_NetworkElementService_Delete_0 = runtime.ForwardResponseMessage - - forward_NetworkElementService_GetChangeList_0 = runtime.ForwardResponseMessage - - forward_NetworkElementService_GetChange_0 = runtime.ForwardResponseMessage - - forward_NetworkElementService_SetChangeList_0 = runtime.ForwardResponseMessage + forward_NetworkElementService_SetPathList_0 = runtime.ForwardResponseMessage + forward_NetworkElementService_Delete_0 = runtime.ForwardResponseMessage + forward_NetworkElementService_GetChangeList_0 = runtime.ForwardResponseMessage + forward_NetworkElementService_GetChange_0 = runtime.ForwardResponseMessage + forward_NetworkElementService_SetChangeList_0 = runtime.ForwardResponseMessage ) diff --git a/api/go/gosdn/networkelement/networkelement_grpc.pb.go b/api/go/gosdn/networkelement/networkelement_grpc.pb.go old mode 100644 new mode 100755 diff --git a/api/go/gosdn/plugin-internal/plugin-internal.pb.go b/api/go/gosdn/plugin-internal/plugin-internal.pb.go old mode 100644 new mode 100755 index 490d4f78c85ce34db7bbb89f9190ae3b1a1295df..6d52ec6b0126f9658e61e829e2777749855f61c6 --- a/api/go/gosdn/plugin-internal/plugin-internal.pb.go +++ b/api/go/gosdn/plugin-internal/plugin-internal.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/plugin-internal/plugin-internal.proto @@ -9,10 +9,12 @@ package plugin_internal import ( _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" plugin_registry "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/plugin-registry" + _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -23,11 +25,10 @@ const ( ) type GetAvailablePluginsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetAvailablePluginsRequest) Reset() { @@ -67,29 +68,28 @@ func (x *GetAvailablePluginsRequest) GetTimestamp() int64 { return 0 } -type GetAvailablePluginsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type GetPluginSchemaRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Plugins []*plugin_registry.Plugin `protobuf:"bytes,2,rep,name=plugins,proto3" json:"plugins,omitempty"` + sizeCache protoimpl.SizeCache } -func (x *GetAvailablePluginsResponse) Reset() { - *x = GetAvailablePluginsResponse{} +func (x *GetPluginSchemaRequest) Reset() { + *x = GetPluginSchemaRequest{} mi := &file_gosdn_plugin_internal_plugin_internal_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetAvailablePluginsResponse) String() string { +func (x *GetPluginSchemaRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetAvailablePluginsResponse) ProtoMessage() {} +func (*GetPluginSchemaRequest) ProtoMessage() {} -func (x *GetAvailablePluginsResponse) ProtoReflect() protoreflect.Message { +func (x *GetPluginSchemaRequest) ProtoReflect() protoreflect.Message { mi := &file_gosdn_plugin_internal_plugin_internal_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -101,48 +101,46 @@ func (x *GetAvailablePluginsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetAvailablePluginsResponse.ProtoReflect.Descriptor instead. -func (*GetAvailablePluginsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetPluginSchemaRequest.ProtoReflect.Descriptor instead. +func (*GetPluginSchemaRequest) Descriptor() ([]byte, []int) { return file_gosdn_plugin_internal_plugin_internal_proto_rawDescGZIP(), []int{1} } -func (x *GetAvailablePluginsResponse) GetTimestamp() int64 { +func (x *GetPluginSchemaRequest) GetTimestamp() int64 { if x != nil { return x.Timestamp } return 0 } -func (x *GetAvailablePluginsResponse) GetPlugins() []*plugin_registry.Plugin { +func (x *GetPluginSchemaRequest) GetPid() string { if x != nil { - return x.Plugins + return x.Pid } - return nil + return "" } -type GetPluginSchemaRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type PluginSchemaPayload struct { + state protoimpl.MessageState `protogen:"open.v1"` + Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } -func (x *GetPluginSchemaRequest) Reset() { - *x = GetPluginSchemaRequest{} +func (x *PluginSchemaPayload) Reset() { + *x = PluginSchemaPayload{} mi := &file_gosdn_plugin_internal_plugin_internal_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetPluginSchemaRequest) String() string { +func (x *PluginSchemaPayload) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetPluginSchemaRequest) ProtoMessage() {} +func (*PluginSchemaPayload) ProtoMessage() {} -func (x *GetPluginSchemaRequest) ProtoReflect() protoreflect.Message { +func (x *PluginSchemaPayload) ProtoReflect() protoreflect.Message { mi := &file_gosdn_plugin_internal_plugin_internal_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -154,47 +152,40 @@ func (x *GetPluginSchemaRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetPluginSchemaRequest.ProtoReflect.Descriptor instead. -func (*GetPluginSchemaRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use PluginSchemaPayload.ProtoReflect.Descriptor instead. +func (*PluginSchemaPayload) Descriptor() ([]byte, []int) { return file_gosdn_plugin_internal_plugin_internal_proto_rawDescGZIP(), []int{2} } -func (x *GetPluginSchemaRequest) GetTimestamp() int64 { - if x != nil { - return x.Timestamp - } - return 0 -} - -func (x *GetPluginSchemaRequest) GetPid() string { +func (x *PluginSchemaPayload) GetChunk() []byte { if x != nil { - return x.Pid + return x.Chunk } - return "" + return nil } -type PluginSchemaPayload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +type GetAvailablePluginsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Plugins []*plugin_registry.Plugin `protobuf:"bytes,2,rep,name=plugins,proto3" json:"plugins,omitempty"` unknownFields protoimpl.UnknownFields - - Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` + sizeCache protoimpl.SizeCache } -func (x *PluginSchemaPayload) Reset() { - *x = PluginSchemaPayload{} +func (x *GetAvailablePluginsResponse) Reset() { + *x = GetAvailablePluginsResponse{} mi := &file_gosdn_plugin_internal_plugin_internal_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *PluginSchemaPayload) String() string { +func (x *GetAvailablePluginsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PluginSchemaPayload) ProtoMessage() {} +func (*GetAvailablePluginsResponse) ProtoMessage() {} -func (x *PluginSchemaPayload) ProtoReflect() protoreflect.Message { +func (x *GetAvailablePluginsResponse) ProtoReflect() protoreflect.Message { mi := &file_gosdn_plugin_internal_plugin_internal_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -206,21 +197,28 @@ func (x *PluginSchemaPayload) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PluginSchemaPayload.ProtoReflect.Descriptor instead. -func (*PluginSchemaPayload) Descriptor() ([]byte, []int) { +// Deprecated: Use GetAvailablePluginsResponse.ProtoReflect.Descriptor instead. +func (*GetAvailablePluginsResponse) Descriptor() ([]byte, []int) { return file_gosdn_plugin_internal_plugin_internal_proto_rawDescGZIP(), []int{3} } -func (x *PluginSchemaPayload) GetChunk() []byte { +func (x *GetAvailablePluginsResponse) GetTimestamp() int64 { if x != nil { - return x.Chunk + return x.Timestamp + } + return 0 +} + +func (x *GetAvailablePluginsResponse) GetPlugins() []*plugin_registry.Plugin { + if x != nil { + return x.Plugins } return nil } var File_gosdn_plugin_internal_plugin_internal_proto protoreflect.FileDescriptor -var file_gosdn_plugin_internal_plugin_internal_proto_rawDesc = []byte{ +var file_gosdn_plugin_internal_plugin_internal_proto_rawDesc = string([]byte{ 0x0a, 0x2b, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x67, @@ -229,56 +227,66 @@ var file_gosdn_plugin_internal_plugin_internal_proto_rawDesc = []byte{ 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, - 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3a, - 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x73, 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, 0x22, 0x74, 0x0a, 0x1b, 0x47, 0x65, - 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x73, 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, 0x37, 0x0a, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, - 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, - 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, - 0x22, 0x50, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3a, 0x0a, 0x1a, + 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x73, 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, 0x18, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x03, 0x70, - 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x13, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x75, - 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x32, - 0xf2, 0x01, 0x0a, 0x15, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x69, 0x0a, 0x10, 0x41, 0x76, 0x61, - 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x31, 0x2e, - 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, - 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x22, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, - 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x2d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, - 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x50, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x30, 0x01, 0x42, 0x3b, 0x5a, 0x39, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, - 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, - 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, - 0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x50, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 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, 0x18, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, + 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x13, 0x50, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x74, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x41, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 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, 0x37, 0x0a, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x52, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x32, 0xf2, 0x02, + 0x0a, 0x15, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x69, 0x0a, 0x10, 0x41, 0x76, 0x61, 0x69, 0x6c, + 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x31, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, + 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x2d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x47, 0x65, + 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x30, 0x01, 0x12, 0x7e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x73, 0x64, + 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, + 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x10, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x73, 0x42, 0x3b, 0x5a, 0x39, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, + 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) var ( file_gosdn_plugin_internal_plugin_internal_proto_rawDescOnce sync.Once - file_gosdn_plugin_internal_plugin_internal_proto_rawDescData = file_gosdn_plugin_internal_plugin_internal_proto_rawDesc + file_gosdn_plugin_internal_plugin_internal_proto_rawDescData []byte ) func file_gosdn_plugin_internal_plugin_internal_proto_rawDescGZIP() []byte { file_gosdn_plugin_internal_plugin_internal_proto_rawDescOnce.Do(func() { - file_gosdn_plugin_internal_plugin_internal_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_plugin_internal_plugin_internal_proto_rawDescData) + file_gosdn_plugin_internal_plugin_internal_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_plugin_internal_plugin_internal_proto_rawDesc), len(file_gosdn_plugin_internal_plugin_internal_proto_rawDesc))) }) return file_gosdn_plugin_internal_plugin_internal_proto_rawDescData } @@ -286,20 +294,22 @@ func file_gosdn_plugin_internal_plugin_internal_proto_rawDescGZIP() []byte { var file_gosdn_plugin_internal_plugin_internal_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_gosdn_plugin_internal_plugin_internal_proto_goTypes = []any{ (*GetAvailablePluginsRequest)(nil), // 0: gosdn.plugin_internal.GetAvailablePluginsRequest - (*GetAvailablePluginsResponse)(nil), // 1: gosdn.plugin_internal.GetAvailablePluginsResponse - (*GetPluginSchemaRequest)(nil), // 2: gosdn.plugin_internal.GetPluginSchemaRequest - (*PluginSchemaPayload)(nil), // 3: gosdn.plugin_internal.PluginSchemaPayload + (*GetPluginSchemaRequest)(nil), // 1: gosdn.plugin_internal.GetPluginSchemaRequest + (*PluginSchemaPayload)(nil), // 2: gosdn.plugin_internal.PluginSchemaPayload + (*GetAvailablePluginsResponse)(nil), // 3: gosdn.plugin_internal.GetAvailablePluginsResponse (*plugin_registry.Plugin)(nil), // 4: gosdn.plugin_registry.Plugin (*plugin_registry.GetResponse)(nil), // 5: gosdn.plugin_registry.GetResponse } var file_gosdn_plugin_internal_plugin_internal_proto_depIdxs = []int32{ 4, // 0: gosdn.plugin_internal.GetAvailablePluginsResponse.plugins:type_name -> gosdn.plugin_registry.Plugin 0, // 1: gosdn.plugin_internal.PluginInternalService.AvailablePlugins:input_type -> gosdn.plugin_internal.GetAvailablePluginsRequest - 2, // 2: gosdn.plugin_internal.PluginInternalService.GetPluginSchema:input_type -> gosdn.plugin_internal.GetPluginSchemaRequest - 5, // 3: gosdn.plugin_internal.PluginInternalService.AvailablePlugins:output_type -> gosdn.plugin_registry.GetResponse - 3, // 4: gosdn.plugin_internal.PluginInternalService.GetPluginSchema:output_type -> gosdn.plugin_internal.PluginSchemaPayload - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type + 1, // 2: gosdn.plugin_internal.PluginInternalService.GetPluginSchema:input_type -> gosdn.plugin_internal.GetPluginSchemaRequest + 0, // 3: gosdn.plugin_internal.PluginInternalService.GetAvailablePlugins:input_type -> gosdn.plugin_internal.GetAvailablePluginsRequest + 5, // 4: gosdn.plugin_internal.PluginInternalService.AvailablePlugins:output_type -> gosdn.plugin_registry.GetResponse + 2, // 5: gosdn.plugin_internal.PluginInternalService.GetPluginSchema:output_type -> gosdn.plugin_internal.PluginSchemaPayload + 5, // 6: gosdn.plugin_internal.PluginInternalService.GetAvailablePlugins:output_type -> gosdn.plugin_registry.GetResponse + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] 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 @@ -314,7 +324,7 @@ func file_gosdn_plugin_internal_plugin_internal_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_plugin_internal_plugin_internal_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_plugin_internal_plugin_internal_proto_rawDesc), len(file_gosdn_plugin_internal_plugin_internal_proto_rawDesc)), NumEnums: 0, NumMessages: 4, NumExtensions: 0, @@ -325,7 +335,6 @@ func file_gosdn_plugin_internal_plugin_internal_proto_init() { MessageInfos: file_gosdn_plugin_internal_plugin_internal_proto_msgTypes, }.Build() File_gosdn_plugin_internal_plugin_internal_proto = out.File - file_gosdn_plugin_internal_plugin_internal_proto_rawDesc = nil file_gosdn_plugin_internal_plugin_internal_proto_goTypes = nil file_gosdn_plugin_internal_plugin_internal_proto_depIdxs = nil } diff --git a/api/go/gosdn/plugin-internal/plugin-internal.pb.gw.go b/api/go/gosdn/plugin-internal/plugin-internal.pb.gw.go new file mode 100644 index 0000000000000000000000000000000000000000..9fd179fdf723f49f88a0507a2644b04d2387d5dc --- /dev/null +++ b/api/go/gosdn/plugin-internal/plugin-internal.pb.gw.go @@ -0,0 +1,162 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: gosdn/plugin-internal/plugin-internal.proto + +/* +Package plugin_internal is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package plugin_internal + +import ( + "context" + "errors" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) + +var filter_PluginInternalService_GetAvailablePlugins_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + +func request_PluginInternalService_GetAvailablePlugins_0(ctx context.Context, marshaler runtime.Marshaler, client PluginInternalServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetAvailablePluginsRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PluginInternalService_GetAvailablePlugins_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.GetAvailablePlugins(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_PluginInternalService_GetAvailablePlugins_0(ctx context.Context, marshaler runtime.Marshaler, server PluginInternalServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetAvailablePluginsRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PluginInternalService_GetAvailablePlugins_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetAvailablePlugins(ctx, &protoReq) + return msg, metadata, err +} + +// RegisterPluginInternalServiceHandlerServer registers the http handlers for service PluginInternalService to "mux". +// UnaryRPC :call PluginInternalServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPluginInternalServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. +func RegisterPluginInternalServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PluginInternalServiceServer) error { + mux.Handle(http.MethodGet, pattern_PluginInternalService_GetAvailablePlugins_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.plugin_internal.PluginInternalService/GetAvailablePlugins", runtime.WithHTTPPathPattern("/plugins")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PluginInternalService_GetAvailablePlugins_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_PluginInternalService_GetAvailablePlugins_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + + return nil +} + +// RegisterPluginInternalServiceHandlerFromEndpoint is same as RegisterPluginInternalServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterPluginInternalServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.NewClient(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + return RegisterPluginInternalServiceHandler(ctx, mux, conn) +} + +// RegisterPluginInternalServiceHandler registers the http handlers for service PluginInternalService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterPluginInternalServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterPluginInternalServiceHandlerClient(ctx, mux, NewPluginInternalServiceClient(conn)) +} + +// RegisterPluginInternalServiceHandlerClient registers the http handlers for service PluginInternalService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PluginInternalServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PluginInternalServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "PluginInternalServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. +func RegisterPluginInternalServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PluginInternalServiceClient) error { + mux.Handle(http.MethodGet, pattern_PluginInternalService_GetAvailablePlugins_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.plugin_internal.PluginInternalService/GetAvailablePlugins", runtime.WithHTTPPathPattern("/plugins")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_PluginInternalService_GetAvailablePlugins_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_PluginInternalService_GetAvailablePlugins_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + return nil +} + +var ( + pattern_PluginInternalService_GetAvailablePlugins_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"plugins"}, "")) +) + +var ( + forward_PluginInternalService_GetAvailablePlugins_0 = runtime.ForwardResponseMessage +) diff --git a/api/go/gosdn/plugin-internal/plugin-internal_grpc.pb.go b/api/go/gosdn/plugin-internal/plugin-internal_grpc.pb.go old mode 100644 new mode 100755 index eaa452aa3746a888fadffccf2db1bc902fa42ad0..31b9539de4e7ef651500495fdea440a919ccb43c --- a/api/go/gosdn/plugin-internal/plugin-internal_grpc.pb.go +++ b/api/go/gosdn/plugin-internal/plugin-internal_grpc.pb.go @@ -20,8 +20,9 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - PluginInternalService_AvailablePlugins_FullMethodName = "/gosdn.plugin_internal.PluginInternalService/AvailablePlugins" - PluginInternalService_GetPluginSchema_FullMethodName = "/gosdn.plugin_internal.PluginInternalService/GetPluginSchema" + PluginInternalService_AvailablePlugins_FullMethodName = "/gosdn.plugin_internal.PluginInternalService/AvailablePlugins" + PluginInternalService_GetPluginSchema_FullMethodName = "/gosdn.plugin_internal.PluginInternalService/GetPluginSchema" + PluginInternalService_GetAvailablePlugins_FullMethodName = "/gosdn.plugin_internal.PluginInternalService/GetAvailablePlugins" ) // PluginInternalServiceClient is the client API for PluginInternalService service. @@ -30,6 +31,7 @@ const ( type PluginInternalServiceClient interface { AvailablePlugins(ctx context.Context, in *GetAvailablePluginsRequest, opts ...grpc.CallOption) (*plugin_registry.GetResponse, error) GetPluginSchema(ctx context.Context, in *GetPluginSchemaRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PluginSchemaPayload], error) + GetAvailablePlugins(ctx context.Context, in *GetAvailablePluginsRequest, opts ...grpc.CallOption) (*plugin_registry.GetResponse, error) } type pluginInternalServiceClient struct { @@ -69,12 +71,23 @@ func (c *pluginInternalServiceClient) GetPluginSchema(ctx context.Context, in *G // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type PluginInternalService_GetPluginSchemaClient = grpc.ServerStreamingClient[PluginSchemaPayload] +func (c *pluginInternalServiceClient) GetAvailablePlugins(ctx context.Context, in *GetAvailablePluginsRequest, opts ...grpc.CallOption) (*plugin_registry.GetResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(plugin_registry.GetResponse) + err := c.cc.Invoke(ctx, PluginInternalService_GetAvailablePlugins_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // PluginInternalServiceServer is the server API for PluginInternalService service. // All implementations must embed UnimplementedPluginInternalServiceServer // for forward compatibility. type PluginInternalServiceServer interface { AvailablePlugins(context.Context, *GetAvailablePluginsRequest) (*plugin_registry.GetResponse, error) GetPluginSchema(*GetPluginSchemaRequest, grpc.ServerStreamingServer[PluginSchemaPayload]) error + GetAvailablePlugins(context.Context, *GetAvailablePluginsRequest) (*plugin_registry.GetResponse, error) mustEmbedUnimplementedPluginInternalServiceServer() } @@ -91,6 +104,9 @@ func (UnimplementedPluginInternalServiceServer) AvailablePlugins(context.Context func (UnimplementedPluginInternalServiceServer) GetPluginSchema(*GetPluginSchemaRequest, grpc.ServerStreamingServer[PluginSchemaPayload]) error { return status.Errorf(codes.Unimplemented, "method GetPluginSchema not implemented") } +func (UnimplementedPluginInternalServiceServer) GetAvailablePlugins(context.Context, *GetAvailablePluginsRequest) (*plugin_registry.GetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAvailablePlugins not implemented") +} func (UnimplementedPluginInternalServiceServer) mustEmbedUnimplementedPluginInternalServiceServer() {} func (UnimplementedPluginInternalServiceServer) testEmbeddedByValue() {} @@ -141,6 +157,24 @@ func _PluginInternalService_GetPluginSchema_Handler(srv interface{}, stream grpc // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type PluginInternalService_GetPluginSchemaServer = grpc.ServerStreamingServer[PluginSchemaPayload] +func _PluginInternalService_GetAvailablePlugins_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAvailablePluginsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PluginInternalServiceServer).GetAvailablePlugins(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PluginInternalService_GetAvailablePlugins_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PluginInternalServiceServer).GetAvailablePlugins(ctx, req.(*GetAvailablePluginsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // PluginInternalService_ServiceDesc is the grpc.ServiceDesc for PluginInternalService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -152,6 +186,10 @@ var PluginInternalService_ServiceDesc = grpc.ServiceDesc{ MethodName: "AvailablePlugins", Handler: _PluginInternalService_AvailablePlugins_Handler, }, + { + MethodName: "GetAvailablePlugins", + Handler: _PluginInternalService_GetAvailablePlugins_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/api/go/gosdn/plugin-registry/plugin-registry.pb.go b/api/go/gosdn/plugin-registry/plugin-registry.pb.go old mode 100644 new mode 100755 index 7bb50e04f93410d2e07e82ca51f20fad30e29088..ed68537218fbe0112b7c14dec3f405d098a9b766 --- a/api/go/gosdn/plugin-registry/plugin-registry.pb.go +++ b/api/go/gosdn/plugin-registry/plugin-registry.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/plugin-registry/plugin-registry.proto @@ -8,11 +8,13 @@ package plugin_registry import ( _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" _ "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -23,12 +25,11 @@ const ( ) type GetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Query []*Query `protobuf:"bytes,2,rep,name=query,proto3" json:"query,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Query []*Query `protobuf:"bytes,2,rep,name=query,proto3" json:"query,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetRequest) Reset() { @@ -76,11 +77,10 @@ func (x *GetRequest) GetQuery() []*Query { } type GetAllRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + sizeCache protoimpl.SizeCache } func (x *GetAllRequest) Reset() { @@ -121,15 +121,14 @@ func (x *GetAllRequest) GetTimestamp() int64 { } type Query struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Identifier: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Identifier: // // *Query_Id // *Query_Name - Identifier isQuery_Identifier `protobuf_oneof:"identifier"` + Identifier isQuery_Identifier `protobuf_oneof:"identifier"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Query) Reset() { @@ -162,23 +161,27 @@ func (*Query) Descriptor() ([]byte, []int) { return file_gosdn_plugin_registry_plugin_registry_proto_rawDescGZIP(), []int{2} } -func (m *Query) GetIdentifier() isQuery_Identifier { - if m != nil { - return m.Identifier +func (x *Query) GetIdentifier() isQuery_Identifier { + if x != nil { + return x.Identifier } return nil } func (x *Query) GetId() string { - if x, ok := x.GetIdentifier().(*Query_Id); ok { - return x.Id + if x != nil { + if x, ok := x.Identifier.(*Query_Id); ok { + return x.Id + } } return "" } func (x *Query) GetName() string { - if x, ok := x.GetIdentifier().(*Query_Name); ok { - return x.Name + if x != nil { + if x, ok := x.Identifier.(*Query_Name); ok { + return x.Name + } } return "" } @@ -200,12 +203,11 @@ func (*Query_Id) isQuery_Identifier() {} func (*Query_Name) isQuery_Identifier() {} type GetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Plugins []*Plugin `protobuf:"bytes,2,rep,name=plugins,proto3" json:"plugins,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Plugins []*Plugin `protobuf:"bytes,2,rep,name=plugins,proto3" json:"plugins,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetResponse) Reset() { @@ -253,12 +255,11 @@ func (x *GetResponse) GetPlugins() []*Plugin { } type GetDownloadRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + 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"` 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"` + sizeCache protoimpl.SizeCache } func (x *GetDownloadRequest) Reset() { @@ -306,11 +307,10 @@ func (x *GetDownloadRequest) GetId() string { } type GetDownloadPayload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` unknownFields protoimpl.UnknownFields - - Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetDownloadPayload) Reset() { @@ -351,12 +351,11 @@ func (x *GetDownloadPayload) GetChunk() []byte { } type DeleteRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Id []string `protobuf:"bytes,2,rep,name=id,proto3" json:"id,omitempty"` 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,rep,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteRequest) Reset() { @@ -404,11 +403,10 @@ func (x *DeleteRequest) GetId() []string { } type DeleteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + sizeCache protoimpl.SizeCache } func (x *DeleteResponse) Reset() { @@ -449,12 +447,11 @@ func (x *DeleteResponse) GetTimestamp() int64 { } type Plugin struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Manifest *Manifest `protobuf:"bytes,2,opt,name=manifest,proto3" json:"manifest,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Manifest *Manifest `protobuf:"bytes,2,opt,name=manifest,proto3" json:"manifest,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Plugin) Reset() { @@ -502,14 +499,13 @@ func (x *Plugin) GetManifest() *Manifest { } type Manifest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Firmware string `protobuf:"bytes,2,opt,name=firmware,proto3" json:"firmware,omitempty"` + Author string `protobuf:"bytes,3,opt,name=author,proto3" json:"author,omitempty"` + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Firmware string `protobuf:"bytes,2,opt,name=firmware,proto3" json:"firmware,omitempty"` - Author string `protobuf:"bytes,3,opt,name=author,proto3" json:"author,omitempty"` - Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Manifest) Reset() { @@ -570,9 +566,105 @@ func (x *Manifest) GetVersion() string { return "" } +type GetAvailablePluginsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Plugins []*Plugin `protobuf:"bytes,2,rep,name=plugins,proto3" json:"plugins,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAvailablePluginsResponse) Reset() { + *x = GetAvailablePluginsResponse{} + mi := &file_gosdn_plugin_registry_plugin_registry_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAvailablePluginsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAvailablePluginsResponse) ProtoMessage() {} + +func (x *GetAvailablePluginsResponse) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_plugin_registry_plugin_registry_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAvailablePluginsResponse.ProtoReflect.Descriptor instead. +func (*GetAvailablePluginsResponse) Descriptor() ([]byte, []int) { + return file_gosdn_plugin_registry_plugin_registry_proto_rawDescGZIP(), []int{10} +} + +func (x *GetAvailablePluginsResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *GetAvailablePluginsResponse) GetPlugins() []*Plugin { + if x != nil { + return x.Plugins + } + return nil +} + +type GetAvailablePluginsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAvailablePluginsRequest) Reset() { + *x = GetAvailablePluginsRequest{} + mi := &file_gosdn_plugin_registry_plugin_registry_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAvailablePluginsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAvailablePluginsRequest) ProtoMessage() {} + +func (x *GetAvailablePluginsRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_plugin_registry_plugin_registry_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAvailablePluginsRequest.ProtoReflect.Descriptor instead. +func (*GetAvailablePluginsRequest) Descriptor() ([]byte, []int) { + return file_gosdn_plugin_registry_plugin_registry_proto_rawDescGZIP(), []int{11} +} + +func (x *GetAvailablePluginsRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + var File_gosdn_plugin_registry_plugin_registry_proto protoreflect.FileDescriptor -var file_gosdn_plugin_registry_plugin_registry_proto_rawDesc = []byte{ +var file_gosdn_plugin_registry_plugin_registry_proto_rawDesc = string([]byte{ 0x0a, 0x2b, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x67, @@ -581,55 +673,68 @@ var file_gosdn_plugin_registry_plugin_registry_proto_rawDesc = []byte{ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x66, 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, 0x3a, - 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x06, 0xba, 0x48, 0x03, - 0xc8, 0x01, 0x01, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x2d, 0x0a, 0x0d, 0x47, 0x65, - 0x74, 0x41, 0x6c, 0x6c, 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, 0x22, 0x4d, 0x0a, 0x05, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, - 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, - 0x01, 0x01, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x64, 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, 0x37, 0x0a, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x50, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x22, 0x4a, - 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, + 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x66, 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, 0x3a, 0x0a, 0x05, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x2d, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, + 0x6c, 0x6c, 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, 0x22, 0x4d, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x64, 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, 0x37, 0x0a, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x52, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x22, 0x4a, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 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, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2a, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, + 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x14, + 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, + 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x45, 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, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2e, 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, 0x22, 0x55, 0x0a, 0x06, 0x50, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, + 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x22, 0x6c, 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x22, 0x74, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 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, 0x37, 0x0a, + 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, + 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x07, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x22, 0x3a, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 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, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, - 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2a, 0x0a, 0x12, 0x47, 0x65, - 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x45, 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, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2e, 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, 0x22, 0x55, 0x0a, - 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, - 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x73, 0x64, - 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x79, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, - 0x66, 0x65, 0x73, 0x74, 0x22, 0x6c, 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x32, 0xf4, 0x02, 0x0a, 0x15, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x67, + 0x6d, 0x70, 0x32, 0xf4, 0x02, 0x0a, 0x15, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x52, @@ -657,50 +762,53 @@ var file_gosdn_plugin_registry_plugin_registry_proto_rawDesc = []byte{ 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_plugin_registry_plugin_registry_proto_rawDescOnce sync.Once - file_gosdn_plugin_registry_plugin_registry_proto_rawDescData = file_gosdn_plugin_registry_plugin_registry_proto_rawDesc + file_gosdn_plugin_registry_plugin_registry_proto_rawDescData []byte ) func file_gosdn_plugin_registry_plugin_registry_proto_rawDescGZIP() []byte { file_gosdn_plugin_registry_plugin_registry_proto_rawDescOnce.Do(func() { - file_gosdn_plugin_registry_plugin_registry_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_plugin_registry_plugin_registry_proto_rawDescData) + file_gosdn_plugin_registry_plugin_registry_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_plugin_registry_plugin_registry_proto_rawDesc), len(file_gosdn_plugin_registry_plugin_registry_proto_rawDesc))) }) return file_gosdn_plugin_registry_plugin_registry_proto_rawDescData } -var file_gosdn_plugin_registry_plugin_registry_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_gosdn_plugin_registry_plugin_registry_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_gosdn_plugin_registry_plugin_registry_proto_goTypes = []any{ - (*GetRequest)(nil), // 0: gosdn.plugin_registry.GetRequest - (*GetAllRequest)(nil), // 1: gosdn.plugin_registry.GetAllRequest - (*Query)(nil), // 2: gosdn.plugin_registry.Query - (*GetResponse)(nil), // 3: gosdn.plugin_registry.GetResponse - (*GetDownloadRequest)(nil), // 4: gosdn.plugin_registry.GetDownloadRequest - (*GetDownloadPayload)(nil), // 5: gosdn.plugin_registry.GetDownloadPayload - (*DeleteRequest)(nil), // 6: gosdn.plugin_registry.DeleteRequest - (*DeleteResponse)(nil), // 7: gosdn.plugin_registry.DeleteResponse - (*Plugin)(nil), // 8: gosdn.plugin_registry.Plugin - (*Manifest)(nil), // 9: gosdn.plugin_registry.Manifest + (*GetRequest)(nil), // 0: gosdn.plugin_registry.GetRequest + (*GetAllRequest)(nil), // 1: gosdn.plugin_registry.GetAllRequest + (*Query)(nil), // 2: gosdn.plugin_registry.Query + (*GetResponse)(nil), // 3: gosdn.plugin_registry.GetResponse + (*GetDownloadRequest)(nil), // 4: gosdn.plugin_registry.GetDownloadRequest + (*GetDownloadPayload)(nil), // 5: gosdn.plugin_registry.GetDownloadPayload + (*DeleteRequest)(nil), // 6: gosdn.plugin_registry.DeleteRequest + (*DeleteResponse)(nil), // 7: gosdn.plugin_registry.DeleteResponse + (*Plugin)(nil), // 8: gosdn.plugin_registry.Plugin + (*Manifest)(nil), // 9: gosdn.plugin_registry.Manifest + (*GetAvailablePluginsResponse)(nil), // 10: gosdn.plugin_registry.GetAvailablePluginsResponse + (*GetAvailablePluginsRequest)(nil), // 11: gosdn.plugin_registry.GetAvailablePluginsRequest } var file_gosdn_plugin_registry_plugin_registry_proto_depIdxs = []int32{ 2, // 0: gosdn.plugin_registry.GetRequest.query:type_name -> gosdn.plugin_registry.Query 8, // 1: gosdn.plugin_registry.GetResponse.plugins:type_name -> gosdn.plugin_registry.Plugin 9, // 2: gosdn.plugin_registry.Plugin.manifest:type_name -> gosdn.plugin_registry.Manifest - 0, // 3: gosdn.plugin_registry.PluginRegistryService.Get:input_type -> gosdn.plugin_registry.GetRequest - 1, // 4: gosdn.plugin_registry.PluginRegistryService.GetAll:input_type -> gosdn.plugin_registry.GetAllRequest - 4, // 5: gosdn.plugin_registry.PluginRegistryService.Download:input_type -> gosdn.plugin_registry.GetDownloadRequest - 6, // 6: gosdn.plugin_registry.PluginRegistryService.Delete:input_type -> gosdn.plugin_registry.DeleteRequest - 3, // 7: gosdn.plugin_registry.PluginRegistryService.Get:output_type -> gosdn.plugin_registry.GetResponse - 3, // 8: gosdn.plugin_registry.PluginRegistryService.GetAll:output_type -> gosdn.plugin_registry.GetResponse - 5, // 9: gosdn.plugin_registry.PluginRegistryService.Download:output_type -> gosdn.plugin_registry.GetDownloadPayload - 7, // 10: gosdn.plugin_registry.PluginRegistryService.Delete:output_type -> gosdn.plugin_registry.DeleteResponse - 7, // [7:11] is the sub-list for method output_type - 3, // [3:7] 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 + 8, // 3: gosdn.plugin_registry.GetAvailablePluginsResponse.plugins:type_name -> gosdn.plugin_registry.Plugin + 0, // 4: gosdn.plugin_registry.PluginRegistryService.Get:input_type -> gosdn.plugin_registry.GetRequest + 1, // 5: gosdn.plugin_registry.PluginRegistryService.GetAll:input_type -> gosdn.plugin_registry.GetAllRequest + 4, // 6: gosdn.plugin_registry.PluginRegistryService.Download:input_type -> gosdn.plugin_registry.GetDownloadRequest + 6, // 7: gosdn.plugin_registry.PluginRegistryService.Delete:input_type -> gosdn.plugin_registry.DeleteRequest + 3, // 8: gosdn.plugin_registry.PluginRegistryService.Get:output_type -> gosdn.plugin_registry.GetResponse + 3, // 9: gosdn.plugin_registry.PluginRegistryService.GetAll:output_type -> gosdn.plugin_registry.GetResponse + 5, // 10: gosdn.plugin_registry.PluginRegistryService.Download:output_type -> gosdn.plugin_registry.GetDownloadPayload + 7, // 11: gosdn.plugin_registry.PluginRegistryService.Delete:output_type -> gosdn.plugin_registry.DeleteResponse + 8, // [8:12] is the sub-list for method output_type + 4, // [4:8] 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_plugin_registry_plugin_registry_proto_init() } @@ -716,9 +824,9 @@ func file_gosdn_plugin_registry_plugin_registry_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_plugin_registry_plugin_registry_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_plugin_registry_plugin_registry_proto_rawDesc), len(file_gosdn_plugin_registry_plugin_registry_proto_rawDesc)), NumEnums: 0, - NumMessages: 10, + NumMessages: 12, NumExtensions: 0, NumServices: 1, }, @@ -727,7 +835,6 @@ func file_gosdn_plugin_registry_plugin_registry_proto_init() { MessageInfos: file_gosdn_plugin_registry_plugin_registry_proto_msgTypes, }.Build() File_gosdn_plugin_registry_plugin_registry_proto = out.File - file_gosdn_plugin_registry_plugin_registry_proto_rawDesc = nil file_gosdn_plugin_registry_plugin_registry_proto_goTypes = nil file_gosdn_plugin_registry_plugin_registry_proto_depIdxs = nil } diff --git a/api/go/gosdn/plugin-registry/plugin-registry.pb.gw.go b/api/go/gosdn/plugin-registry/plugin-registry.pb.gw.go new file mode 100644 index 0000000000000000000000000000000000000000..bd500348f4ed69ca673f7e0baa3375da080a7188 --- /dev/null +++ b/api/go/gosdn/plugin-registry/plugin-registry.pb.gw.go @@ -0,0 +1,162 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: gosdn/plugin-registry/plugin-registry.proto + +/* +Package plugin_registry is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package plugin_registry + +import ( + "context" + "errors" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) + +var filter_PluginRegistryService_GetAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + +func request_PluginRegistryService_GetAll_0(ctx context.Context, marshaler runtime.Marshaler, client PluginRegistryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetAllRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PluginRegistryService_GetAll_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.GetAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_PluginRegistryService_GetAll_0(ctx context.Context, marshaler runtime.Marshaler, server PluginRegistryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetAllRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PluginRegistryService_GetAll_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetAll(ctx, &protoReq) + return msg, metadata, err +} + +// RegisterPluginRegistryServiceHandlerServer registers the http handlers for service PluginRegistryService to "mux". +// UnaryRPC :call PluginRegistryServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPluginRegistryServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. +func RegisterPluginRegistryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PluginRegistryServiceServer) error { + mux.Handle(http.MethodGet, pattern_PluginRegistryService_GetAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.plugin_registry.PluginRegistryService/GetAll", runtime.WithHTTPPathPattern("/plugins/here")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PluginRegistryService_GetAll_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_PluginRegistryService_GetAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + + return nil +} + +// RegisterPluginRegistryServiceHandlerFromEndpoint is same as RegisterPluginRegistryServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterPluginRegistryServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.NewClient(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + return RegisterPluginRegistryServiceHandler(ctx, mux, conn) +} + +// RegisterPluginRegistryServiceHandler registers the http handlers for service PluginRegistryService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterPluginRegistryServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterPluginRegistryServiceHandlerClient(ctx, mux, NewPluginRegistryServiceClient(conn)) +} + +// RegisterPluginRegistryServiceHandlerClient registers the http handlers for service PluginRegistryService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PluginRegistryServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PluginRegistryServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "PluginRegistryServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. +func RegisterPluginRegistryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PluginRegistryServiceClient) error { + mux.Handle(http.MethodGet, pattern_PluginRegistryService_GetAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.plugin_registry.PluginRegistryService/GetAll", runtime.WithHTTPPathPattern("/plugins/here")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_PluginRegistryService_GetAll_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_PluginRegistryService_GetAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + return nil +} + +var ( + pattern_PluginRegistryService_GetAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"plugins", "here"}, "")) +) + +var ( + forward_PluginRegistryService_GetAll_0 = runtime.ForwardResponseMessage +) diff --git a/api/go/gosdn/plugin-registry/plugin-registry_grpc.pb.go b/api/go/gosdn/plugin-registry/plugin-registry_grpc.pb.go old mode 100644 new mode 100755 diff --git a/api/go/gosdn/plugin/plugin.pb.go b/api/go/gosdn/plugin/plugin.pb.go old mode 100644 new mode 100755 index 9193b62ace24201d367cb1c7f0d62dfb3b2a516e..27342526733a8ba07017b3c75ae81af91103d5d6 --- a/api/go/gosdn/plugin/plugin.pb.go +++ b/api/go/gosdn/plugin/plugin.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/plugin/plugin.proto @@ -9,11 +9,14 @@ package plugin import ( _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" networkelement "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/networkelement" + plugin_registry "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/plugin-registry" gnmi "github.com/openconfig/gnmi/proto/gnmi" + _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -24,13 +27,12 @@ const ( ) type UnmarshalRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Json []byte `protobuf:"bytes,1,opt,name=json,proto3" json:"json,omitempty"` + Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + Value *gnmi.TypedValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` unknownFields protoimpl.UnknownFields - - Json []byte `protobuf:"bytes,1,opt,name=json,proto3" json:"json,omitempty"` - Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - Value *gnmi.TypedValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UnmarshalRequest) Reset() { @@ -85,11 +87,10 @@ func (x *UnmarshalRequest) GetValue() *gnmi.TypedValue { } type UnmarshalResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` unknownFields protoimpl.UnknownFields - - Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UnmarshalResponse) Reset() { @@ -130,12 +131,11 @@ func (x *UnmarshalResponse) GetValid() bool { } type SetNodeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + Value *gnmi.TypedValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` unknownFields protoimpl.UnknownFields - - Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - Value *gnmi.TypedValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetNodeRequest) Reset() { @@ -183,11 +183,10 @@ func (x *SetNodeRequest) GetValue() *gnmi.TypedValue { } type SetNodeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` unknownFields protoimpl.UnknownFields - - Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetNodeResponse) Reset() { @@ -228,12 +227,11 @@ func (x *SetNodeResponse) GetValid() bool { } type GetNodeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - RequestForIntendedState bool `protobuf:"varint,3,opt,name=requestForIntendedState,proto3" json:"requestForIntendedState,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + RequestForIntendedState bool `protobuf:"varint,3,opt,name=requestForIntendedState,proto3" json:"requestForIntendedState,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetNodeRequest) Reset() { @@ -281,11 +279,10 @@ func (x *GetNodeRequest) GetRequestForIntendedState() bool { } type GetNodeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Nodes []*gnmi.Notification `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` unknownFields protoimpl.UnknownFields - - Nodes []*gnmi.Notification `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetNodeResponse) Reset() { @@ -326,11 +323,10 @@ func (x *GetNodeResponse) GetNodes() []*gnmi.Notification { } type DeleteNodeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` unknownFields protoimpl.UnknownFields - - Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteNodeRequest) Reset() { @@ -371,11 +367,10 @@ func (x *DeleteNodeRequest) GetPath() *gnmi.Path { } type DeleteNodeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` unknownFields protoimpl.UnknownFields - - Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteNodeResponse) Reset() { @@ -416,11 +411,10 @@ func (x *DeleteNodeResponse) GetValid() bool { } type ModelRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FilterReadOnly bool `protobuf:"varint,1,opt,name=filterReadOnly,proto3" json:"filterReadOnly,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + FilterReadOnly bool `protobuf:"varint,1,opt,name=filterReadOnly,proto3" json:"filterReadOnly,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ModelRequest) Reset() { @@ -461,11 +455,10 @@ func (x *ModelRequest) GetFilterReadOnly() bool { } type ModelResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Json []byte `protobuf:"bytes,1,opt,name=json,proto3" json:"json,omitempty"` // JSON-encoded text per RFC7951. unknownFields protoimpl.UnknownFields - - Json []byte `protobuf:"bytes,1,opt,name=json,proto3" json:"json,omitempty"` // JSON-encoded text per RFC7951. + sizeCache protoimpl.SizeCache } func (x *ModelResponse) Reset() { @@ -506,12 +499,11 @@ func (x *ModelResponse) GetJson() []byte { } type DiffRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Original []byte `protobuf:"bytes,1,opt,name=original,proto3" json:"original,omitempty"` // JSON-encoded text per RFC7951. + Modified []byte `protobuf:"bytes,2,opt,name=modified,proto3" json:"modified,omitempty"` // JSON-encoded text per RFC7951. unknownFields protoimpl.UnknownFields - - Original []byte `protobuf:"bytes,1,opt,name=original,proto3" json:"original,omitempty"` // JSON-encoded text per RFC7951. - Modified []byte `protobuf:"bytes,2,opt,name=modified,proto3" json:"modified,omitempty"` // JSON-encoded text per RFC7951. + sizeCache protoimpl.SizeCache } func (x *DiffRequest) Reset() { @@ -559,11 +551,10 @@ func (x *DiffRequest) GetModified() []byte { } type DiffResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Notification *gnmi.Notification `protobuf:"bytes,1,opt,name=notification,proto3" json:"notification,omitempty"` unknownFields protoimpl.UnknownFields - - Notification *gnmi.Notification `protobuf:"bytes,1,opt,name=notification,proto3" json:"notification,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DiffResponse) Reset() { @@ -604,13 +595,12 @@ func (x *DiffResponse) GetNotification() *gnmi.Notification { } type ValidateChangeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Operation networkelement.ApiOperation `protobuf:"varint,1,opt,name=operation,proto3,enum=gosdn.networkelement.ApiOperation" json:"operation,omitempty"` + Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + Value *gnmi.TypedValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` unknownFields protoimpl.UnknownFields - - Operation networkelement.ApiOperation `protobuf:"varint,1,opt,name=operation,proto3,enum=gosdn.networkelement.ApiOperation" json:"operation,omitempty"` - Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - Value *gnmi.TypedValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ValidateChangeRequest) Reset() { @@ -665,11 +655,10 @@ func (x *ValidateChangeRequest) GetValue() *gnmi.TypedValue { } type ValidateChangeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Model []byte `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"` // JSON-encoded text per RFC7951. unknownFields protoimpl.UnknownFields - - Model []byte `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"` // JSON-encoded text per RFC7951. + sizeCache protoimpl.SizeCache } func (x *ValidateChangeResponse) Reset() { @@ -710,11 +699,10 @@ func (x *ValidateChangeResponse) GetModel() []byte { } type PruneConfigFalseRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // JSON-encoded text per RFC7951. unknownFields protoimpl.UnknownFields - - Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // JSON-encoded text per RFC7951. + sizeCache protoimpl.SizeCache } func (x *PruneConfigFalseRequest) Reset() { @@ -755,11 +743,10 @@ func (x *PruneConfigFalseRequest) GetValue() []byte { } type PruneConfigFalseResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Model []byte `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"` // JSON-encoded text per RFC7951. unknownFields protoimpl.UnknownFields - - Model []byte `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"` // JSON-encoded text per RFC7951. + sizeCache protoimpl.SizeCache } func (x *PruneConfigFalseResponse) Reset() { @@ -800,9 +787,9 @@ func (x *PruneConfigFalseResponse) GetModel() []byte { } type SchemaTreeGzipRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SchemaTreeGzipRequest) Reset() { @@ -836,11 +823,10 @@ func (*SchemaTreeGzipRequest) Descriptor() ([]byte, []int) { } type Payload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` unknownFields protoimpl.UnknownFields - - Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Payload) Reset() { @@ -880,9 +866,53 @@ func (x *Payload) GetChunk() []byte { return nil } +type GetAvailablePluginsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAvailablePluginsRequest) Reset() { + *x = GetAvailablePluginsRequest{} + mi := &file_gosdn_plugin_plugin_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAvailablePluginsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAvailablePluginsRequest) ProtoMessage() {} + +func (x *GetAvailablePluginsRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_plugin_plugin_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAvailablePluginsRequest.ProtoReflect.Descriptor instead. +func (*GetAvailablePluginsRequest) Descriptor() ([]byte, []int) { + return file_gosdn_plugin_plugin_proto_rawDescGZIP(), []int{18} +} + +func (x *GetAvailablePluginsRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + var File_gosdn_plugin_plugin_proto protoreflect.FileDescriptor -var file_gosdn_plugin_plugin_proto_rawDesc = []byte{ +var file_gosdn_plugin_plugin_proto_rawDesc = string([]byte{ 0x0a, 0x19, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x1a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, @@ -890,188 +920,205 @@ var file_gosdn_plugin_plugin_proto_rawDesc = []byte{ 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, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x7e, 0x0a, 0x10, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x04, 0x70, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x2b, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7e, + 0x0a, 0x10, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x50, 0x61, 0x74, 0x68, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2e, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x29, + 0x0a, 0x11, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x22, 0x68, 0x0a, 0x0e, 0x53, 0x65, 0x74, + 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0x29, 0x0a, 0x11, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, + 0x6c, 0x75, 0x65, 0x22, 0x27, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x22, 0x7a, 0x0a, 0x0e, + 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, + 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, + 0x6e, 0x6d, 0x69, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x40, 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x46, 0x6f, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, + 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x3b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x6e, + 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 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, 0x05, + 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, + 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, + 0x50, 0x61, 0x74, 0x68, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x22, 0x2a, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x22, 0x68, - 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x26, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, - 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, - 0x01, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x54, - 0x79, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, - 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x27, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x4e, - 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x22, 0x7a, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x42, 0x06, 0xba, - 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x40, 0x0a, 0x17, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x6f, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x06, 0xba, 0x48, - 0x03, 0xc8, 0x01, 0x01, 0x52, 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x6f, 0x72, - 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x3b, 0x0a, - 0x0f, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x28, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 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, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x11, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x26, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, - 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, - 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x2a, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x22, 0x3e, 0x0a, 0x0c, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x61, - 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x06, 0xba, 0x48, 0x03, - 0xc8, 0x01, 0x01, 0x52, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x61, 0x64, 0x4f, - 0x6e, 0x6c, 0x79, 0x22, 0x23, 0x0a, 0x0d, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x22, 0x55, 0x0a, 0x0b, 0x44, 0x69, 0x66, 0x66, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, - 0x01, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x22, 0x0a, 0x08, 0x6d, - 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0xba, - 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, - 0x46, 0x0a, 0x0c, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x36, 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x4e, 0x6f, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb9, 0x01, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x48, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x70, 0x69, 0x4f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, - 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, - 0x2e, 0x50, 0x61, 0x74, 0x68, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0x2e, 0x0a, 0x16, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6d, 0x6f, - 0x64, 0x65, 0x6c, 0x22, 0x37, 0x0a, 0x17, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0xba, - 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x30, 0x0a, 0x18, - 0x50, 0x72, 0x75, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x61, 0x6c, 0x73, 0x65, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x22, 0x3e, + 0x0a, 0x0c, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, + 0x0a, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x23, + 0x0a, 0x0d, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x6a, + 0x73, 0x6f, 0x6e, 0x22, 0x55, 0x0a, 0x0b, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x22, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x6f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x22, 0x0a, 0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, 0x46, 0x0a, 0x0c, 0x44, 0x69, + 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0c, 0x6e, 0x6f, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0xb9, 0x01, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x09, + 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x22, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x65, + 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x70, 0x69, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x09, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x50, 0x61, 0x74, 0x68, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2e, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x2e, + 0x0a, 0x16, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x17, - 0x0a, 0x15, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x72, 0x65, 0x65, 0x47, 0x7a, 0x69, 0x70, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x1f, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x32, 0xc8, 0x05, 0x0a, 0x06, 0x50, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x12, 0x4c, 0x0a, 0x09, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, - 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, - 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1f, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, - 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x46, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x67, - 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x4e, - 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x73, - 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x64, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x07, 0x47, 0x65, 0x74, - 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x4f, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, - 0x1f, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x20, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x40, 0x0a, 0x05, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x1a, 0x2e, 0x67, 0x6f, - 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x04, 0x44, 0x69, 0x66, 0x66, 0x12, 0x19, 0x2e, 0x67, - 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x44, 0x69, 0x66, 0x66, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x72, 0x65, - 0x65, 0x47, 0x7a, 0x69, 0x70, 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x72, 0x65, 0x65, 0x47, - 0x7a, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x6f, 0x73, - 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x30, 0x01, 0x12, 0x5b, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x67, 0x6f, 0x73, - 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x61, 0x0a, 0x10, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, - 0x61, 0x6c, 0x73, 0x65, 0x12, 0x25, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, - 0x61, 0x6c, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, - 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x75, 0x6e, 0x65, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x37, + 0x0a, 0x17, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x61, 0x6c, + 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x30, 0x0a, 0x18, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x42, 0x32, 0x5a, 0x30, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, - 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, - 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, - 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} + 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x54, 0x72, 0x65, 0x65, 0x47, 0x7a, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x1f, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x14, 0x0a, + 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, 0x68, + 0x75, 0x6e, 0x6b, 0x22, 0x3a, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, + 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 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, 0x32, + 0xad, 0x06, 0x0a, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x4c, 0x0a, 0x09, 0x55, 0x6e, + 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x2e, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x46, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x73, 0x64, + 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x05, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x12, 0x1a, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, + 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x04, 0x44, + 0x69, 0x66, 0x66, 0x12, 0x19, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, + 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x44, 0x69, + 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0e, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x54, 0x72, 0x65, 0x65, 0x47, 0x7a, 0x69, 0x70, 0x12, 0x23, 0x2e, 0x67, + 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x54, 0x72, 0x65, 0x65, 0x47, 0x7a, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x30, 0x01, 0x12, 0x5b, 0x0a, 0x0e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x2e, 0x67, + 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x24, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x10, 0x50, 0x72, 0x75, 0x6e, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x12, 0x25, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x72, 0x75, 0x6e, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x61, 0x6c, + 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x13, 0x47, 0x65, + 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x73, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x6f, + 0x73, 0x64, 0x6e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0x32, 0x5a, 0x30, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, + 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) var ( file_gosdn_plugin_plugin_proto_rawDescOnce sync.Once - file_gosdn_plugin_plugin_proto_rawDescData = file_gosdn_plugin_plugin_proto_rawDesc + file_gosdn_plugin_plugin_proto_rawDescData []byte ) func file_gosdn_plugin_plugin_proto_rawDescGZIP() []byte { file_gosdn_plugin_plugin_proto_rawDescOnce.Do(func() { - file_gosdn_plugin_plugin_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_plugin_plugin_proto_rawDescData) + file_gosdn_plugin_plugin_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_plugin_plugin_proto_rawDesc), len(file_gosdn_plugin_plugin_proto_rawDesc))) }) return file_gosdn_plugin_plugin_proto_rawDescData } -var file_gosdn_plugin_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_gosdn_plugin_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_gosdn_plugin_plugin_proto_goTypes = []any{ - (*UnmarshalRequest)(nil), // 0: gosdn.plugin.UnmarshalRequest - (*UnmarshalResponse)(nil), // 1: gosdn.plugin.UnmarshalResponse - (*SetNodeRequest)(nil), // 2: gosdn.plugin.SetNodeRequest - (*SetNodeResponse)(nil), // 3: gosdn.plugin.SetNodeResponse - (*GetNodeRequest)(nil), // 4: gosdn.plugin.GetNodeRequest - (*GetNodeResponse)(nil), // 5: gosdn.plugin.GetNodeResponse - (*DeleteNodeRequest)(nil), // 6: gosdn.plugin.DeleteNodeRequest - (*DeleteNodeResponse)(nil), // 7: gosdn.plugin.DeleteNodeResponse - (*ModelRequest)(nil), // 8: gosdn.plugin.ModelRequest - (*ModelResponse)(nil), // 9: gosdn.plugin.ModelResponse - (*DiffRequest)(nil), // 10: gosdn.plugin.DiffRequest - (*DiffResponse)(nil), // 11: gosdn.plugin.DiffResponse - (*ValidateChangeRequest)(nil), // 12: gosdn.plugin.ValidateChangeRequest - (*ValidateChangeResponse)(nil), // 13: gosdn.plugin.ValidateChangeResponse - (*PruneConfigFalseRequest)(nil), // 14: gosdn.plugin.PruneConfigFalseRequest - (*PruneConfigFalseResponse)(nil), // 15: gosdn.plugin.PruneConfigFalseResponse - (*SchemaTreeGzipRequest)(nil), // 16: gosdn.plugin.SchemaTreeGzipRequest - (*Payload)(nil), // 17: gosdn.plugin.Payload - (*gnmi.Path)(nil), // 18: gnmi.Path - (*gnmi.TypedValue)(nil), // 19: gnmi.TypedValue - (*gnmi.Notification)(nil), // 20: gnmi.Notification - (networkelement.ApiOperation)(0), // 21: gosdn.networkelement.ApiOperation + (*UnmarshalRequest)(nil), // 0: gosdn.plugin.UnmarshalRequest + (*UnmarshalResponse)(nil), // 1: gosdn.plugin.UnmarshalResponse + (*SetNodeRequest)(nil), // 2: gosdn.plugin.SetNodeRequest + (*SetNodeResponse)(nil), // 3: gosdn.plugin.SetNodeResponse + (*GetNodeRequest)(nil), // 4: gosdn.plugin.GetNodeRequest + (*GetNodeResponse)(nil), // 5: gosdn.plugin.GetNodeResponse + (*DeleteNodeRequest)(nil), // 6: gosdn.plugin.DeleteNodeRequest + (*DeleteNodeResponse)(nil), // 7: gosdn.plugin.DeleteNodeResponse + (*ModelRequest)(nil), // 8: gosdn.plugin.ModelRequest + (*ModelResponse)(nil), // 9: gosdn.plugin.ModelResponse + (*DiffRequest)(nil), // 10: gosdn.plugin.DiffRequest + (*DiffResponse)(nil), // 11: gosdn.plugin.DiffResponse + (*ValidateChangeRequest)(nil), // 12: gosdn.plugin.ValidateChangeRequest + (*ValidateChangeResponse)(nil), // 13: gosdn.plugin.ValidateChangeResponse + (*PruneConfigFalseRequest)(nil), // 14: gosdn.plugin.PruneConfigFalseRequest + (*PruneConfigFalseResponse)(nil), // 15: gosdn.plugin.PruneConfigFalseResponse + (*SchemaTreeGzipRequest)(nil), // 16: gosdn.plugin.SchemaTreeGzipRequest + (*Payload)(nil), // 17: gosdn.plugin.Payload + (*GetAvailablePluginsRequest)(nil), // 18: gosdn.plugin.GetAvailablePluginsRequest + (*gnmi.Path)(nil), // 19: gnmi.Path + (*gnmi.TypedValue)(nil), // 20: gnmi.TypedValue + (*gnmi.Notification)(nil), // 21: gnmi.Notification + (networkelement.ApiOperation)(0), // 22: gosdn.networkelement.ApiOperation + (*plugin_registry.GetResponse)(nil), // 23: gosdn.plugin_registry.GetResponse } var file_gosdn_plugin_plugin_proto_depIdxs = []int32{ - 18, // 0: gosdn.plugin.UnmarshalRequest.path:type_name -> gnmi.Path - 19, // 1: gosdn.plugin.UnmarshalRequest.value:type_name -> gnmi.TypedValue - 18, // 2: gosdn.plugin.SetNodeRequest.path:type_name -> gnmi.Path - 19, // 3: gosdn.plugin.SetNodeRequest.value:type_name -> gnmi.TypedValue - 18, // 4: gosdn.plugin.GetNodeRequest.path:type_name -> gnmi.Path - 20, // 5: gosdn.plugin.GetNodeResponse.nodes:type_name -> gnmi.Notification - 18, // 6: gosdn.plugin.DeleteNodeRequest.path:type_name -> gnmi.Path - 20, // 7: gosdn.plugin.DiffResponse.notification:type_name -> gnmi.Notification - 21, // 8: gosdn.plugin.ValidateChangeRequest.operation:type_name -> gosdn.networkelement.ApiOperation - 18, // 9: gosdn.plugin.ValidateChangeRequest.path:type_name -> gnmi.Path - 19, // 10: gosdn.plugin.ValidateChangeRequest.value:type_name -> gnmi.TypedValue + 19, // 0: gosdn.plugin.UnmarshalRequest.path:type_name -> gnmi.Path + 20, // 1: gosdn.plugin.UnmarshalRequest.value:type_name -> gnmi.TypedValue + 19, // 2: gosdn.plugin.SetNodeRequest.path:type_name -> gnmi.Path + 20, // 3: gosdn.plugin.SetNodeRequest.value:type_name -> gnmi.TypedValue + 19, // 4: gosdn.plugin.GetNodeRequest.path:type_name -> gnmi.Path + 21, // 5: gosdn.plugin.GetNodeResponse.nodes:type_name -> gnmi.Notification + 19, // 6: gosdn.plugin.DeleteNodeRequest.path:type_name -> gnmi.Path + 21, // 7: gosdn.plugin.DiffResponse.notification:type_name -> gnmi.Notification + 22, // 8: gosdn.plugin.ValidateChangeRequest.operation:type_name -> gosdn.networkelement.ApiOperation + 19, // 9: gosdn.plugin.ValidateChangeRequest.path:type_name -> gnmi.Path + 20, // 10: gosdn.plugin.ValidateChangeRequest.value:type_name -> gnmi.TypedValue 0, // 11: gosdn.plugin.Plugin.Unmarshal:input_type -> gosdn.plugin.UnmarshalRequest 2, // 12: gosdn.plugin.Plugin.SetNode:input_type -> gosdn.plugin.SetNodeRequest 4, // 13: gosdn.plugin.Plugin.GetNode:input_type -> gosdn.plugin.GetNodeRequest @@ -1081,17 +1128,19 @@ var file_gosdn_plugin_plugin_proto_depIdxs = []int32{ 16, // 17: gosdn.plugin.Plugin.SchemaTreeGzip:input_type -> gosdn.plugin.SchemaTreeGzipRequest 12, // 18: gosdn.plugin.Plugin.ValidateChange:input_type -> gosdn.plugin.ValidateChangeRequest 14, // 19: gosdn.plugin.Plugin.PruneConfigFalse:input_type -> gosdn.plugin.PruneConfigFalseRequest - 1, // 20: gosdn.plugin.Plugin.Unmarshal:output_type -> gosdn.plugin.UnmarshalResponse - 3, // 21: gosdn.plugin.Plugin.SetNode:output_type -> gosdn.plugin.SetNodeResponse - 5, // 22: gosdn.plugin.Plugin.GetNode:output_type -> gosdn.plugin.GetNodeResponse - 7, // 23: gosdn.plugin.Plugin.DeleteNode:output_type -> gosdn.plugin.DeleteNodeResponse - 9, // 24: gosdn.plugin.Plugin.Model:output_type -> gosdn.plugin.ModelResponse - 11, // 25: gosdn.plugin.Plugin.Diff:output_type -> gosdn.plugin.DiffResponse - 17, // 26: gosdn.plugin.Plugin.SchemaTreeGzip:output_type -> gosdn.plugin.Payload - 13, // 27: gosdn.plugin.Plugin.ValidateChange:output_type -> gosdn.plugin.ValidateChangeResponse - 15, // 28: gosdn.plugin.Plugin.PruneConfigFalse:output_type -> gosdn.plugin.PruneConfigFalseResponse - 20, // [20:29] is the sub-list for method output_type - 11, // [11:20] is the sub-list for method input_type + 18, // 20: gosdn.plugin.Plugin.GetAvailablePlugins:input_type -> gosdn.plugin.GetAvailablePluginsRequest + 1, // 21: gosdn.plugin.Plugin.Unmarshal:output_type -> gosdn.plugin.UnmarshalResponse + 3, // 22: gosdn.plugin.Plugin.SetNode:output_type -> gosdn.plugin.SetNodeResponse + 5, // 23: gosdn.plugin.Plugin.GetNode:output_type -> gosdn.plugin.GetNodeResponse + 7, // 24: gosdn.plugin.Plugin.DeleteNode:output_type -> gosdn.plugin.DeleteNodeResponse + 9, // 25: gosdn.plugin.Plugin.Model:output_type -> gosdn.plugin.ModelResponse + 11, // 26: gosdn.plugin.Plugin.Diff:output_type -> gosdn.plugin.DiffResponse + 17, // 27: gosdn.plugin.Plugin.SchemaTreeGzip:output_type -> gosdn.plugin.Payload + 13, // 28: gosdn.plugin.Plugin.ValidateChange:output_type -> gosdn.plugin.ValidateChangeResponse + 15, // 29: gosdn.plugin.Plugin.PruneConfigFalse:output_type -> gosdn.plugin.PruneConfigFalseResponse + 23, // 30: gosdn.plugin.Plugin.GetAvailablePlugins:output_type -> gosdn.plugin_registry.GetResponse + 21, // [21:31] is the sub-list for method output_type + 11, // [11:21] is the sub-list for method input_type 11, // [11:11] is the sub-list for extension type_name 11, // [11:11] is the sub-list for extension extendee 0, // [0:11] is the sub-list for field type_name @@ -1106,9 +1155,9 @@ func file_gosdn_plugin_plugin_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_plugin_plugin_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_plugin_plugin_proto_rawDesc), len(file_gosdn_plugin_plugin_proto_rawDesc)), NumEnums: 0, - NumMessages: 18, + NumMessages: 19, NumExtensions: 0, NumServices: 1, }, @@ -1117,7 +1166,6 @@ func file_gosdn_plugin_plugin_proto_init() { MessageInfos: file_gosdn_plugin_plugin_proto_msgTypes, }.Build() File_gosdn_plugin_plugin_proto = out.File - file_gosdn_plugin_plugin_proto_rawDesc = nil file_gosdn_plugin_plugin_proto_goTypes = nil file_gosdn_plugin_plugin_proto_depIdxs = nil } diff --git a/api/go/gosdn/plugin/plugin.pb.gw.go b/api/go/gosdn/plugin/plugin.pb.gw.go new file mode 100644 index 0000000000000000000000000000000000000000..745f6caddb5b793e5366230c419b3146a0179dbc --- /dev/null +++ b/api/go/gosdn/plugin/plugin.pb.gw.go @@ -0,0 +1,162 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: gosdn/plugin/plugin.proto + +/* +Package plugin is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package plugin + +import ( + "context" + "errors" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) + +var filter_Plugin_GetAvailablePlugins_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + +func request_Plugin_GetAvailablePlugins_0(ctx context.Context, marshaler runtime.Marshaler, client PluginClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetAvailablePluginsRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Plugin_GetAvailablePlugins_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.GetAvailablePlugins(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_Plugin_GetAvailablePlugins_0(ctx context.Context, marshaler runtime.Marshaler, server PluginServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetAvailablePluginsRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Plugin_GetAvailablePlugins_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetAvailablePlugins(ctx, &protoReq) + return msg, metadata, err +} + +// RegisterPluginHandlerServer registers the http handlers for service Plugin to "mux". +// UnaryRPC :call PluginServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPluginHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. +func RegisterPluginHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PluginServer) error { + mux.Handle(http.MethodGet, pattern_Plugin_GetAvailablePlugins_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.plugin.Plugin/GetAvailablePlugins", runtime.WithHTTPPathPattern("/plugins/plugin")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Plugin_GetAvailablePlugins_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Plugin_GetAvailablePlugins_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + + return nil +} + +// RegisterPluginHandlerFromEndpoint is same as RegisterPluginHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterPluginHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.NewClient(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + return RegisterPluginHandler(ctx, mux, conn) +} + +// RegisterPluginHandler registers the http handlers for service Plugin to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterPluginHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterPluginHandlerClient(ctx, mux, NewPluginClient(conn)) +} + +// RegisterPluginHandlerClient registers the http handlers for service Plugin +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PluginClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PluginClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "PluginClient" to call the correct interceptors. This client ignores the HTTP middlewares. +func RegisterPluginHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PluginClient) error { + mux.Handle(http.MethodGet, pattern_Plugin_GetAvailablePlugins_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.plugin.Plugin/GetAvailablePlugins", runtime.WithHTTPPathPattern("/plugins/plugin")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Plugin_GetAvailablePlugins_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_Plugin_GetAvailablePlugins_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + return nil +} + +var ( + pattern_Plugin_GetAvailablePlugins_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"plugins", "plugin"}, "")) +) + +var ( + forward_Plugin_GetAvailablePlugins_0 = runtime.ForwardResponseMessage +) diff --git a/api/go/gosdn/plugin/plugin_grpc.pb.go b/api/go/gosdn/plugin/plugin_grpc.pb.go old mode 100644 new mode 100755 index e524b8c4bc2dad4a123d8fd5756c3424320a3427..ec194d82da166cef9fd0e4ffb0a7d404bf10a15d --- a/api/go/gosdn/plugin/plugin_grpc.pb.go +++ b/api/go/gosdn/plugin/plugin_grpc.pb.go @@ -7,6 +7,7 @@ package plugin import ( + plugin_registry "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/plugin-registry" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -19,15 +20,16 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - Plugin_Unmarshal_FullMethodName = "/gosdn.plugin.Plugin/Unmarshal" - Plugin_SetNode_FullMethodName = "/gosdn.plugin.Plugin/SetNode" - Plugin_GetNode_FullMethodName = "/gosdn.plugin.Plugin/GetNode" - Plugin_DeleteNode_FullMethodName = "/gosdn.plugin.Plugin/DeleteNode" - Plugin_Model_FullMethodName = "/gosdn.plugin.Plugin/Model" - Plugin_Diff_FullMethodName = "/gosdn.plugin.Plugin/Diff" - Plugin_SchemaTreeGzip_FullMethodName = "/gosdn.plugin.Plugin/SchemaTreeGzip" - Plugin_ValidateChange_FullMethodName = "/gosdn.plugin.Plugin/ValidateChange" - Plugin_PruneConfigFalse_FullMethodName = "/gosdn.plugin.Plugin/PruneConfigFalse" + Plugin_Unmarshal_FullMethodName = "/gosdn.plugin.Plugin/Unmarshal" + Plugin_SetNode_FullMethodName = "/gosdn.plugin.Plugin/SetNode" + Plugin_GetNode_FullMethodName = "/gosdn.plugin.Plugin/GetNode" + Plugin_DeleteNode_FullMethodName = "/gosdn.plugin.Plugin/DeleteNode" + Plugin_Model_FullMethodName = "/gosdn.plugin.Plugin/Model" + Plugin_Diff_FullMethodName = "/gosdn.plugin.Plugin/Diff" + Plugin_SchemaTreeGzip_FullMethodName = "/gosdn.plugin.Plugin/SchemaTreeGzip" + Plugin_ValidateChange_FullMethodName = "/gosdn.plugin.Plugin/ValidateChange" + Plugin_PruneConfigFalse_FullMethodName = "/gosdn.plugin.Plugin/PruneConfigFalse" + Plugin_GetAvailablePlugins_FullMethodName = "/gosdn.plugin.Plugin/GetAvailablePlugins" ) // PluginClient is the client API for Plugin service. @@ -43,6 +45,7 @@ type PluginClient interface { SchemaTreeGzip(ctx context.Context, in *SchemaTreeGzipRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Payload], error) ValidateChange(ctx context.Context, in *ValidateChangeRequest, opts ...grpc.CallOption) (*ValidateChangeResponse, error) PruneConfigFalse(ctx context.Context, in *PruneConfigFalseRequest, opts ...grpc.CallOption) (*PruneConfigFalseResponse, error) + GetAvailablePlugins(ctx context.Context, in *GetAvailablePluginsRequest, opts ...grpc.CallOption) (*plugin_registry.GetResponse, error) } type pluginClient struct { @@ -152,6 +155,16 @@ func (c *pluginClient) PruneConfigFalse(ctx context.Context, in *PruneConfigFals return out, nil } +func (c *pluginClient) GetAvailablePlugins(ctx context.Context, in *GetAvailablePluginsRequest, opts ...grpc.CallOption) (*plugin_registry.GetResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(plugin_registry.GetResponse) + err := c.cc.Invoke(ctx, Plugin_GetAvailablePlugins_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // PluginServer is the server API for Plugin service. // All implementations must embed UnimplementedPluginServer // for forward compatibility. @@ -165,6 +178,7 @@ type PluginServer interface { SchemaTreeGzip(*SchemaTreeGzipRequest, grpc.ServerStreamingServer[Payload]) error ValidateChange(context.Context, *ValidateChangeRequest) (*ValidateChangeResponse, error) PruneConfigFalse(context.Context, *PruneConfigFalseRequest) (*PruneConfigFalseResponse, error) + GetAvailablePlugins(context.Context, *GetAvailablePluginsRequest) (*plugin_registry.GetResponse, error) mustEmbedUnimplementedPluginServer() } @@ -202,6 +216,9 @@ func (UnimplementedPluginServer) ValidateChange(context.Context, *ValidateChange func (UnimplementedPluginServer) PruneConfigFalse(context.Context, *PruneConfigFalseRequest) (*PruneConfigFalseResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PruneConfigFalse not implemented") } +func (UnimplementedPluginServer) GetAvailablePlugins(context.Context, *GetAvailablePluginsRequest) (*plugin_registry.GetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAvailablePlugins not implemented") +} func (UnimplementedPluginServer) mustEmbedUnimplementedPluginServer() {} func (UnimplementedPluginServer) testEmbeddedByValue() {} @@ -378,6 +395,24 @@ func _Plugin_PruneConfigFalse_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Plugin_GetAvailablePlugins_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAvailablePluginsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PluginServer).GetAvailablePlugins(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Plugin_GetAvailablePlugins_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PluginServer).GetAvailablePlugins(ctx, req.(*GetAvailablePluginsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Plugin_ServiceDesc is the grpc.ServiceDesc for Plugin service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -417,6 +452,10 @@ var Plugin_ServiceDesc = grpc.ServiceDesc{ MethodName: "PruneConfigFalse", Handler: _Plugin_PruneConfigFalse_Handler, }, + { + MethodName: "GetAvailablePlugins", + Handler: _Plugin_GetAvailablePlugins_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/api/go/gosdn/pnd/pnd.pb.go b/api/go/gosdn/pnd/pnd.pb.go old mode 100644 new mode 100755 index 16f5b733deeeeb8eb78537bb099a6ffa2090a5b4..71b33fdd0938f6b0da016056817d5d4cf610e276 --- a/api/go/gosdn/pnd/pnd.pb.go +++ b/api/go/gosdn/pnd/pnd.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/pnd/pnd.proto @@ -17,6 +17,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -27,13 +28,12 @@ const ( ) type PrincipalNetworkDomain struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + 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"` 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"` + sizeCache protoimpl.SizeCache } func (x *PrincipalNetworkDomain) Reset() { @@ -88,12 +88,11 @@ func (x *PrincipalNetworkDomain) GetDescription() string { } type GetPndRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetPndRequest) Reset() { @@ -141,12 +140,11 @@ func (x *GetPndRequest) GetPid() string { } type GetPndResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + 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"` 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"` + sizeCache protoimpl.SizeCache } func (x *GetPndResponse) Reset() { @@ -194,11 +192,10 @@ func (x *GetPndResponse) GetPnd() *PrincipalNetworkDomain { } type GetPndListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + sizeCache protoimpl.SizeCache } func (x *GetPndListRequest) Reset() { @@ -239,12 +236,11 @@ func (x *GetPndListRequest) GetTimestamp() int64 { } type GetPndListResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pnd []*PrincipalNetworkDomain `protobuf:"bytes,2,rep,name=pnd,proto3" json:"pnd,omitempty"` 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,rep,name=pnd,proto3" json:"pnd,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetPndListResponse) Reset() { @@ -292,12 +288,11 @@ func (x *GetPndListResponse) GetPnd() []*PrincipalNetworkDomain { } type CreatePndListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pnd []*PndCreateProperties `protobuf:"bytes,2,rep,name=pnd,proto3" json:"pnd,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Pnd []*PndCreateProperties `protobuf:"bytes,2,rep,name=pnd,proto3" json:"pnd,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CreatePndListRequest) Reset() { @@ -345,12 +340,11 @@ func (x *CreatePndListRequest) GetPnd() []*PndCreateProperties { } type PndCreateProperties struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` 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"` + sizeCache protoimpl.SizeCache } func (x *PndCreateProperties) Reset() { @@ -398,11 +392,10 @@ func (x *PndCreateProperties) GetDescription() string { } type CreatePndListResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + sizeCache protoimpl.SizeCache } func (x *CreatePndListResponse) Reset() { @@ -443,12 +436,11 @@ func (x *CreatePndListResponse) GetTimestamp() int64 { } type DeletePndRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + Pid string `protobuf:"bytes,4,opt,name=pid,proto3" json:"pid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. - Pid string `protobuf:"bytes,4,opt,name=pid,proto3" json:"pid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeletePndRequest) Reset() { @@ -496,11 +488,10 @@ func (x *DeletePndRequest) GetPid() string { } type DeletePndResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. + sizeCache protoimpl.SizeCache } func (x *DeletePndResponse) Reset() { @@ -542,7 +533,7 @@ func (x *DeletePndResponse) GetTimestamp() int64 { var File_gosdn_pnd_pnd_proto protoreflect.FileDescriptor -var file_gosdn_pnd_pnd_proto_rawDesc = []byte{ +var file_gosdn_pnd_pnd_proto_rawDesc = string([]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, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, @@ -653,16 +644,16 @@ var file_gosdn_pnd_pnd_proto_rawDesc = []byte{ 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 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 + file_gosdn_pnd_pnd_proto_rawDescData []byte ) 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) + file_gosdn_pnd_pnd_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_pnd_pnd_proto_rawDesc), len(file_gosdn_pnd_pnd_proto_rawDesc))) }) return file_gosdn_pnd_pnd_proto_rawDescData } @@ -708,7 +699,7 @@ func file_gosdn_pnd_pnd_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_pnd_pnd_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_pnd_pnd_proto_rawDesc), len(file_gosdn_pnd_pnd_proto_rawDesc)), NumEnums: 0, NumMessages: 10, NumExtensions: 0, @@ -719,7 +710,6 @@ func file_gosdn_pnd_pnd_proto_init() { 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/api/go/gosdn/pnd/pnd.pb.gw.go b/api/go/gosdn/pnd/pnd.pb.gw.go old mode 100644 new mode 100755 index 6aace9934260aae883dfaaa34035d355f7a5d95c..7ea08d765b8a059ce77ecde55d9b8130e8de0c5d --- a/api/go/gosdn/pnd/pnd.pb.gw.go +++ b/api/go/gosdn/pnd/pnd.pb.gw.go @@ -10,6 +10,7 @@ package pnd import ( "context" + "errors" "io" "net/http" @@ -24,213 +25,170 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - var ( - filter_PndService_GetPnd_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join ) -func request_PndService_GetPnd_0(ctx context.Context, marshaler runtime.Marshaler, client PndServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPndRequest - var metadata runtime.ServerMetadata +var filter_PndService_GetPnd_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +func request_PndService_GetPnd_0(ctx context.Context, marshaler runtime.Marshaler, client PndServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - val string - ok bool - err error - _ = err + protoReq GetPndRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pid"] + val, ok := pathParams["pid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pid") } - protoReq.Pid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PndService_GetPnd_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetPnd(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PndService_GetPnd_0(ctx context.Context, marshaler runtime.Marshaler, server PndServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPndRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetPndRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pid"] + val, ok := pathParams["pid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pid") } - protoReq.Pid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PndService_GetPnd_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetPnd(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_PndService_GetPndList_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_PndService_GetPndList_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_PndService_GetPndList_0(ctx context.Context, marshaler runtime.Marshaler, client PndServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPndListRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetPndListRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PndService_GetPndList_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetPndList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PndService_GetPndList_0(ctx context.Context, marshaler runtime.Marshaler, server PndServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPndListRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetPndListRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PndService_GetPndList_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetPndList(ctx, &protoReq) return msg, metadata, err - } func request_PndService_CreatePndList_0(ctx context.Context, marshaler runtime.Marshaler, client PndServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePndListRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CreatePndListRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.CreatePndList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PndService_CreatePndList_0(ctx context.Context, marshaler runtime.Marshaler, server PndServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePndListRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CreatePndListRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CreatePndList(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_PndService_DeletePnd_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_PndService_DeletePnd_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_PndService_DeletePnd_0(ctx context.Context, marshaler runtime.Marshaler, client PndServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletePndRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeletePndRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pid"] + val, ok := pathParams["pid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pid") } - protoReq.Pid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PndService_DeletePnd_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.DeletePnd(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PndService_DeletePnd_0(ctx context.Context, marshaler runtime.Marshaler, server PndServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletePndRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeletePndRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pid"] + val, ok := pathParams["pid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pid") } - protoReq.Pid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PndService_DeletePnd_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.DeletePnd(ctx, &protoReq) return msg, metadata, err - } // RegisterPndServiceHandlerServer registers the http handlers for service PndService to "mux". @@ -239,16 +197,13 @@ func local_request_PndService_DeletePnd_0(ctx context.Context, marshaler runtime // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPndServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterPndServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PndServiceServer) error { - - mux.Handle("GET", pattern_PndService_GetPnd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PndService_GetPnd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/GetPnd", runtime.WithHTTPPathPattern("/pnd/{pid}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/GetPnd", runtime.WithHTTPPathPattern("/pnd/{pid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -260,20 +215,15 @@ func RegisterPndServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PndService_GetPnd_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_PndService_GetPndList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PndService_GetPndList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/GetPndList", runtime.WithHTTPPathPattern("/pnds")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/GetPndList", runtime.WithHTTPPathPattern("/pnds")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -285,20 +235,15 @@ func RegisterPndServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PndService_GetPndList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_PndService_CreatePndList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_PndService_CreatePndList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/CreatePndList", runtime.WithHTTPPathPattern("/pnds")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/CreatePndList", runtime.WithHTTPPathPattern("/pnds")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -310,20 +255,15 @@ func RegisterPndServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PndService_CreatePndList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_PndService_DeletePnd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_PndService_DeletePnd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/DeletePnd", runtime.WithHTTPPathPattern("/pnds/{pid}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.pnd.PndService/DeletePnd", runtime.WithHTTPPathPattern("/pnds/{pid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -335,9 +275,7 @@ func RegisterPndServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PndService_DeletePnd_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -364,7 +302,6 @@ func RegisterPndServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.Ser } }() }() - return RegisterPndServiceHandler(ctx, mux, conn) } @@ -380,14 +317,11 @@ func RegisterPndServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "PndServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterPndServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PndServiceClient) error { - - mux.Handle("GET", pattern_PndService_GetPnd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PndService_GetPnd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/GetPnd", runtime.WithHTTPPathPattern("/pnd/{pid}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/GetPnd", runtime.WithHTTPPathPattern("/pnd/{pid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -398,18 +332,13 @@ func RegisterPndServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PndService_GetPnd_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_PndService_GetPndList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PndService_GetPndList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/GetPndList", runtime.WithHTTPPathPattern("/pnds")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/GetPndList", runtime.WithHTTPPathPattern("/pnds")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -420,18 +349,13 @@ func RegisterPndServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PndService_GetPndList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_PndService_CreatePndList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_PndService_CreatePndList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/CreatePndList", runtime.WithHTTPPathPattern("/pnds")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/CreatePndList", runtime.WithHTTPPathPattern("/pnds")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -442,18 +366,13 @@ func RegisterPndServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PndService_CreatePndList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_PndService_DeletePnd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_PndService_DeletePnd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/DeletePnd", runtime.WithHTTPPathPattern("/pnds/{pid}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.pnd.PndService/DeletePnd", runtime.WithHTTPPathPattern("/pnds/{pid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -464,30 +383,21 @@ func RegisterPndServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PndService_DeletePnd_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( - pattern_PndService_GetPnd_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"pnd", "pid"}, "")) - - pattern_PndService_GetPndList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"pnds"}, "")) - + pattern_PndService_GetPnd_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"pnd", "pid"}, "")) + pattern_PndService_GetPndList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"pnds"}, "")) pattern_PndService_CreatePndList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"pnds"}, "")) - - pattern_PndService_DeletePnd_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"pnds", "pid"}, "")) + pattern_PndService_DeletePnd_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"pnds", "pid"}, "")) ) var ( - forward_PndService_GetPnd_0 = runtime.ForwardResponseMessage - - forward_PndService_GetPndList_0 = runtime.ForwardResponseMessage - + forward_PndService_GetPnd_0 = runtime.ForwardResponseMessage + forward_PndService_GetPndList_0 = runtime.ForwardResponseMessage forward_PndService_CreatePndList_0 = runtime.ForwardResponseMessage - - forward_PndService_DeletePnd_0 = runtime.ForwardResponseMessage + forward_PndService_DeletePnd_0 = runtime.ForwardResponseMessage ) diff --git a/api/go/gosdn/pnd/pnd_grpc.pb.go b/api/go/gosdn/pnd/pnd_grpc.pb.go old mode 100644 new mode 100755 diff --git a/api/go/gosdn/rbac/rbac.pb.go b/api/go/gosdn/rbac/rbac.pb.go old mode 100644 new mode 100755 index 0a98e9ecf9d11c0e3ee670b5bf06bba3aa16daaf..29e570c590d71fcdddf038d7c32bb70fc51d7feb --- a/api/go/gosdn/rbac/rbac.pb.go +++ b/api/go/gosdn/rbac/rbac.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/rbac/rbac.proto @@ -15,6 +15,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -26,13 +27,12 @@ const ( // Login type LoginRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + Pwd string `protobuf:"bytes,3,opt,name=pwd,proto3" json:"pwd,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` - Pwd string `protobuf:"bytes,3,opt,name=pwd,proto3" json:"pwd,omitempty"` + sizeCache protoimpl.SizeCache } func (x *LoginRequest) Reset() { @@ -87,12 +87,11 @@ func (x *LoginRequest) GetPwd() string { } type LoginResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + sizeCache protoimpl.SizeCache } func (x *LoginResponse) Reset() { @@ -141,12 +140,11 @@ func (x *LoginResponse) GetToken() string { // Logout type LogoutRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + sizeCache protoimpl.SizeCache } func (x *LogoutRequest) Reset() { @@ -194,11 +192,10 @@ func (x *LogoutRequest) GetUsername() string { } type LogoutResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *LogoutResponse) Reset() { @@ -240,7 +237,7 @@ func (x *LogoutResponse) GetTimestamp() int64 { var File_gosdn_rbac_rbac_proto protoreflect.FileDescriptor -var file_gosdn_rbac_rbac_proto_rawDesc = []byte{ +var file_gosdn_rbac_rbac_proto_rawDesc = string([]byte{ 0x0a, 0x15, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, @@ -287,16 +284,16 @@ var file_gosdn_rbac_rbac_proto_rawDesc = []byte{ 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_rbac_rbac_proto_rawDescOnce sync.Once - file_gosdn_rbac_rbac_proto_rawDescData = file_gosdn_rbac_rbac_proto_rawDesc + file_gosdn_rbac_rbac_proto_rawDescData []byte ) func file_gosdn_rbac_rbac_proto_rawDescGZIP() []byte { file_gosdn_rbac_rbac_proto_rawDescOnce.Do(func() { - file_gosdn_rbac_rbac_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_rbac_rbac_proto_rawDescData) + file_gosdn_rbac_rbac_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_rbac_rbac_proto_rawDesc), len(file_gosdn_rbac_rbac_proto_rawDesc))) }) return file_gosdn_rbac_rbac_proto_rawDescData } @@ -329,7 +326,7 @@ func file_gosdn_rbac_rbac_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_rbac_rbac_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_rbac_rbac_proto_rawDesc), len(file_gosdn_rbac_rbac_proto_rawDesc)), NumEnums: 0, NumMessages: 4, NumExtensions: 0, @@ -340,7 +337,6 @@ func file_gosdn_rbac_rbac_proto_init() { MessageInfos: file_gosdn_rbac_rbac_proto_msgTypes, }.Build() File_gosdn_rbac_rbac_proto = out.File - file_gosdn_rbac_rbac_proto_rawDesc = nil file_gosdn_rbac_rbac_proto_goTypes = nil file_gosdn_rbac_rbac_proto_depIdxs = nil } diff --git a/api/go/gosdn/rbac/rbac.pb.gw.go b/api/go/gosdn/rbac/rbac.pb.gw.go old mode 100644 new mode 100755 index 46167531eee76ea0c7ab625884059450dbab5fce..6a89867f048017c68a001f27a26b56a88bd04787 --- a/api/go/gosdn/rbac/rbac.pb.gw.go +++ b/api/go/gosdn/rbac/rbac.pb.gw.go @@ -10,6 +10,7 @@ package rbac import ( "context" + "errors" "io" "net/http" @@ -24,107 +25,88 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_AuthService_Login_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq LoginRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq LoginRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Login(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AuthService_Login_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq LoginRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq LoginRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Login(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_AuthService_Logout_0 = &utilities.DoubleArray{Encoding: map[string]int{"username": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_AuthService_Logout_0 = &utilities.DoubleArray{Encoding: map[string]int{"username": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_AuthService_Logout_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq LogoutRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq LogoutRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["username"] + val, ok := pathParams["username"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "username") } - protoReq.Username, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "username", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_Logout_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Logout(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AuthService_Logout_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq LogoutRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq LogoutRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["username"] + val, ok := pathParams["username"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "username") } - protoReq.Username, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "username", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_Logout_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Logout(ctx, &protoReq) return msg, metadata, err - } // RegisterAuthServiceHandlerServer registers the http handlers for service AuthService to "mux". @@ -133,16 +115,13 @@ func local_request_AuthService_Logout_0(ctx context.Context, marshaler runtime.M // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error { - - mux.Handle("POST", pattern_AuthService_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_AuthService_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.AuthService/Login", runtime.WithHTTPPathPattern("/login")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.AuthService/Login", runtime.WithHTTPPathPattern("/login")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -154,20 +133,15 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AuthService_Login_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_AuthService_Logout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_AuthService_Logout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.AuthService/Logout", runtime.WithHTTPPathPattern("/logout/{username}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.AuthService/Logout", runtime.WithHTTPPathPattern("/logout/{username}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -179,9 +153,7 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AuthService_Logout_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -208,7 +180,6 @@ func RegisterAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.Se } }() }() - return RegisterAuthServiceHandler(ctx, mux, conn) } @@ -224,14 +195,11 @@ func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AuthServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error { - - mux.Handle("POST", pattern_AuthService_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_AuthService_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.AuthService/Login", runtime.WithHTTPPathPattern("/login")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.AuthService/Login", runtime.WithHTTPPathPattern("/login")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -242,18 +210,13 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AuthService_Login_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_AuthService_Logout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_AuthService_Logout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.AuthService/Logout", runtime.WithHTTPPathPattern("/logout/{username}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.AuthService/Logout", runtime.WithHTTPPathPattern("/logout/{username}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -264,22 +227,17 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AuthService_Logout_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( - pattern_AuthService_Login_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"login"}, "")) - + pattern_AuthService_Login_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"login"}, "")) pattern_AuthService_Logout_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"logout", "username"}, "")) ) var ( - forward_AuthService_Login_0 = runtime.ForwardResponseMessage - + forward_AuthService_Login_0 = runtime.ForwardResponseMessage forward_AuthService_Logout_0 = runtime.ForwardResponseMessage ) diff --git a/api/go/gosdn/rbac/rbac_grpc.pb.go b/api/go/gosdn/rbac/rbac_grpc.pb.go old mode 100644 new mode 100755 diff --git a/api/go/gosdn/rbac/role.pb.go b/api/go/gosdn/rbac/role.pb.go old mode 100644 new mode 100755 index aacf290351003d487122d6357352395cfa735ea6..66c89c2f788f9fbcfd1b9dde7deec3ad70a002f5 --- a/api/go/gosdn/rbac/role.pb.go +++ b/api/go/gosdn/rbac/role.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/rbac/role.proto @@ -15,6 +15,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -25,14 +26,13 @@ const ( ) type Role struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + 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"` + Permissions []string `protobuf:"bytes,4,rep,name=permissions,proto3" json:"permissions,omitempty"` 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"` - Permissions []string `protobuf:"bytes,4,rep,name=permissions,proto3" json:"permissions,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Role) Reset() { @@ -95,12 +95,11 @@ func (x *Role) GetPermissions() []string { // CreateRoles type CreateRolesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Roles []*Role `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Roles []*Role `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CreateRolesRequest) Reset() { @@ -148,11 +147,10 @@ func (x *CreateRolesRequest) GetRoles() []*Role { } type CreateRolesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CreateRolesResponse) Reset() { @@ -194,13 +192,12 @@ func (x *CreateRolesResponse) GetTimestamp() int64 { // GetRole type GetRoleRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + RoleName string `protobuf:"bytes,2,opt,name=role_name,json=roleName,proto3" json:"role_name,omitempty"` + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - RoleName string `protobuf:"bytes,2,opt,name=role_name,json=roleName,proto3" json:"role_name,omitempty"` - Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetRoleRequest) Reset() { @@ -255,12 +252,11 @@ func (x *GetRoleRequest) GetId() string { } type GetRoleResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Role *Role `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Role *Role `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetRoleResponse) Reset() { @@ -309,11 +305,10 @@ func (x *GetRoleResponse) GetRole() *Role { // GetRoles type GetRolesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetRolesRequest) Reset() { @@ -354,12 +349,11 @@ func (x *GetRolesRequest) GetTimestamp() int64 { } type GetRolesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Roles []*Role `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Roles []*Role `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetRolesResponse) Reset() { @@ -408,12 +402,11 @@ func (x *GetRolesResponse) GetRoles() []*Role { // UpdateRoles type UpdateRolesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Roles []*Role `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Roles []*Role `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UpdateRolesRequest) Reset() { @@ -461,11 +454,10 @@ func (x *UpdateRolesRequest) GetRoles() []*Role { } type UpdateRolesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UpdateRolesResponse) Reset() { @@ -507,13 +499,12 @@ func (x *UpdateRolesResponse) GetTimestamp() int64 { // DeletePermissionsForRole type DeletePermissionsForRoleRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - RoleName string `protobuf:"bytes,2,opt,name=role_name,json=roleName,proto3" json:"role_name,omitempty"` - PermissionsToDelete []string `protobuf:"bytes,3,rep,name=permissions_to_delete,json=permissionsToDelete,proto3" json:"permissions_to_delete,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + RoleName string `protobuf:"bytes,2,opt,name=role_name,json=roleName,proto3" json:"role_name,omitempty"` + PermissionsToDelete []string `protobuf:"bytes,3,rep,name=permissions_to_delete,json=permissionsToDelete,proto3" json:"permissions_to_delete,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeletePermissionsForRoleRequest) Reset() { @@ -568,11 +559,10 @@ func (x *DeletePermissionsForRoleRequest) GetPermissionsToDelete() []string { } type DeletePermissionsForRoleResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeletePermissionsForRoleResponse) Reset() { @@ -614,12 +604,11 @@ func (x *DeletePermissionsForRoleResponse) GetTimestamp() int64 { // DeleteRoles type DeleteRolesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + RoleName []string `protobuf:"bytes,2,rep,name=role_name,json=roleName,proto3" json:"role_name,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - RoleName []string `protobuf:"bytes,2,rep,name=role_name,json=roleName,proto3" json:"role_name,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteRolesRequest) Reset() { @@ -667,11 +656,10 @@ func (x *DeleteRolesRequest) GetRoleName() []string { } type DeleteRolesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteRolesResponse) Reset() { @@ -713,7 +701,7 @@ func (x *DeleteRolesResponse) GetTimestamp() int64 { var File_gosdn_rbac_role_proto protoreflect.FileDescriptor -var file_gosdn_rbac_role_proto_rawDesc = []byte{ +var file_gosdn_rbac_role_proto_rawDesc = string([]byte{ 0x0a, 0x15, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, @@ -842,16 +830,16 @@ var file_gosdn_rbac_role_proto_rawDesc = []byte{ 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_rbac_role_proto_rawDescOnce sync.Once - file_gosdn_rbac_role_proto_rawDescData = file_gosdn_rbac_role_proto_rawDesc + file_gosdn_rbac_role_proto_rawDescData []byte ) func file_gosdn_rbac_role_proto_rawDescGZIP() []byte { file_gosdn_rbac_role_proto_rawDescOnce.Do(func() { - file_gosdn_rbac_role_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_rbac_role_proto_rawDescData) + file_gosdn_rbac_role_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_rbac_role_proto_rawDesc), len(file_gosdn_rbac_role_proto_rawDesc))) }) return file_gosdn_rbac_role_proto_rawDescData } @@ -906,7 +894,7 @@ func file_gosdn_rbac_role_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_rbac_role_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_rbac_role_proto_rawDesc), len(file_gosdn_rbac_role_proto_rawDesc)), NumEnums: 0, NumMessages: 13, NumExtensions: 0, @@ -917,7 +905,6 @@ func file_gosdn_rbac_role_proto_init() { MessageInfos: file_gosdn_rbac_role_proto_msgTypes, }.Build() File_gosdn_rbac_role_proto = out.File - file_gosdn_rbac_role_proto_rawDesc = nil file_gosdn_rbac_role_proto_goTypes = nil file_gosdn_rbac_role_proto_depIdxs = nil } diff --git a/api/go/gosdn/rbac/role.pb.gw.go b/api/go/gosdn/rbac/role.pb.gw.go old mode 100644 new mode 100755 index 454fe45f0561e8c731b87bf7b7184886f710cc3a..a30fb131d0f59e25d35c58fb4b23b9885fb110d5 --- a/api/go/gosdn/rbac/role.pb.gw.go +++ b/api/go/gosdn/rbac/role.pb.gw.go @@ -10,6 +10,7 @@ package rbac import ( "context" + "errors" "io" "net/http" @@ -24,207 +25,190 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_RoleService_CreateRoles_0(ctx context.Context, marshaler runtime.Marshaler, client RoleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRolesRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CreateRolesRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.CreateRoles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RoleService_CreateRoles_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRolesRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CreateRolesRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CreateRoles(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RoleService_GetRole_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_RoleService_GetRole_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_RoleService_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRoleRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetRoleRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_GetRole_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RoleService_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRoleRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetRoleRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_GetRole_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetRole(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RoleService_GetRoles_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_RoleService_GetRoles_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_RoleService_GetRoles_0(ctx context.Context, marshaler runtime.Marshaler, client RoleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRolesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetRolesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_GetRoles_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetRoles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RoleService_GetRoles_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRolesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetRolesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_GetRoles_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetRoles(ctx, &protoReq) return msg, metadata, err - } func request_RoleService_UpdateRoles_0(ctx context.Context, marshaler runtime.Marshaler, client RoleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateRolesRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq UpdateRolesRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.UpdateRoles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RoleService_UpdateRoles_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateRolesRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq UpdateRolesRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.UpdateRoles(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RoleService_DeletePermissionsForRole_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_RoleService_DeletePermissionsForRole_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_RoleService_DeletePermissionsForRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletePermissionsForRoleRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeletePermissionsForRoleRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_DeletePermissionsForRole_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.DeletePermissionsForRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RoleService_DeletePermissionsForRole_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletePermissionsForRoleRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeletePermissionsForRoleRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_DeletePermissionsForRole_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.DeletePermissionsForRole(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RoleService_DeleteRoles_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_RoleService_DeleteRoles_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_RoleService_DeleteRoles_0(ctx context.Context, marshaler runtime.Marshaler, client RoleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRolesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeleteRolesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_DeleteRoles_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.DeleteRoles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RoleService_DeleteRoles_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRolesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeleteRolesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoleService_DeleteRoles_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.DeleteRoles(ctx, &protoReq) return msg, metadata, err - } // RegisterRoleServiceHandlerServer registers the http handlers for service RoleService to "mux". @@ -233,16 +217,13 @@ func local_request_RoleService_DeleteRoles_0(ctx context.Context, marshaler runt // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRoleServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterRoleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RoleServiceServer) error { - - mux.Handle("POST", pattern_RoleService_CreateRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RoleService_CreateRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/CreateRoles", runtime.WithHTTPPathPattern("/roles/create")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/CreateRoles", runtime.WithHTTPPathPattern("/roles/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -254,20 +235,15 @@ func RegisterRoleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_CreateRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_RoleService_GetRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RoleService_GetRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/GetRole", runtime.WithHTTPPathPattern("/roles/get")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/GetRole", runtime.WithHTTPPathPattern("/roles/get")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -279,20 +255,15 @@ func RegisterRoleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_GetRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_RoleService_GetRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RoleService_GetRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/GetRoles", runtime.WithHTTPPathPattern("/roles")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/GetRoles", runtime.WithHTTPPathPattern("/roles")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -304,20 +275,15 @@ func RegisterRoleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_GetRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_RoleService_UpdateRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RoleService_UpdateRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/UpdateRoles", runtime.WithHTTPPathPattern("/roles/update")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/UpdateRoles", runtime.WithHTTPPathPattern("/roles/update")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -329,20 +295,15 @@ func RegisterRoleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_UpdateRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_RoleService_DeletePermissionsForRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_RoleService_DeletePermissionsForRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/DeletePermissionsForRole", runtime.WithHTTPPathPattern("/roles/delete/permissions")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/DeletePermissionsForRole", runtime.WithHTTPPathPattern("/roles/delete/permissions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -354,20 +315,15 @@ func RegisterRoleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_DeletePermissionsForRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_RoleService_DeleteRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_RoleService_DeleteRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/DeleteRoles", runtime.WithHTTPPathPattern("/roles/delete")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.RoleService/DeleteRoles", runtime.WithHTTPPathPattern("/roles/delete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -379,9 +335,7 @@ func RegisterRoleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_DeleteRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -408,7 +362,6 @@ func RegisterRoleServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.Se } }() }() - return RegisterRoleServiceHandler(ctx, mux, conn) } @@ -424,14 +377,11 @@ func RegisterRoleServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "RoleServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterRoleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RoleServiceClient) error { - - mux.Handle("POST", pattern_RoleService_CreateRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RoleService_CreateRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/CreateRoles", runtime.WithHTTPPathPattern("/roles/create")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/CreateRoles", runtime.WithHTTPPathPattern("/roles/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -442,18 +392,13 @@ func RegisterRoleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_CreateRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_RoleService_GetRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RoleService_GetRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/GetRole", runtime.WithHTTPPathPattern("/roles/get")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/GetRole", runtime.WithHTTPPathPattern("/roles/get")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -464,18 +409,13 @@ func RegisterRoleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_GetRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_RoleService_GetRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RoleService_GetRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/GetRoles", runtime.WithHTTPPathPattern("/roles")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/GetRoles", runtime.WithHTTPPathPattern("/roles")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -486,18 +426,13 @@ func RegisterRoleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_GetRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_RoleService_UpdateRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RoleService_UpdateRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/UpdateRoles", runtime.WithHTTPPathPattern("/roles/update")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/UpdateRoles", runtime.WithHTTPPathPattern("/roles/update")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -508,18 +443,13 @@ func RegisterRoleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_UpdateRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_RoleService_DeletePermissionsForRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_RoleService_DeletePermissionsForRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/DeletePermissionsForRole", runtime.WithHTTPPathPattern("/roles/delete/permissions")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/DeletePermissionsForRole", runtime.WithHTTPPathPattern("/roles/delete/permissions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -530,18 +460,13 @@ func RegisterRoleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_DeletePermissionsForRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_RoleService_DeleteRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_RoleService_DeleteRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/DeleteRoles", runtime.WithHTTPPathPattern("/roles/delete")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.RoleService/DeleteRoles", runtime.WithHTTPPathPattern("/roles/delete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -552,38 +477,25 @@ func RegisterRoleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoleService_DeleteRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( - pattern_RoleService_CreateRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"roles", "create"}, "")) - - pattern_RoleService_GetRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"roles", "get"}, "")) - - pattern_RoleService_GetRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"roles"}, "")) - - pattern_RoleService_UpdateRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"roles", "update"}, "")) - + pattern_RoleService_CreateRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"roles", "create"}, "")) + pattern_RoleService_GetRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"roles", "get"}, "")) + pattern_RoleService_GetRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"roles"}, "")) + pattern_RoleService_UpdateRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"roles", "update"}, "")) pattern_RoleService_DeletePermissionsForRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"roles", "delete", "permissions"}, "")) - - pattern_RoleService_DeleteRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"roles", "delete"}, "")) + pattern_RoleService_DeleteRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"roles", "delete"}, "")) ) var ( - forward_RoleService_CreateRoles_0 = runtime.ForwardResponseMessage - - forward_RoleService_GetRole_0 = runtime.ForwardResponseMessage - - forward_RoleService_GetRoles_0 = runtime.ForwardResponseMessage - - forward_RoleService_UpdateRoles_0 = runtime.ForwardResponseMessage - + forward_RoleService_CreateRoles_0 = runtime.ForwardResponseMessage + forward_RoleService_GetRole_0 = runtime.ForwardResponseMessage + forward_RoleService_GetRoles_0 = runtime.ForwardResponseMessage + forward_RoleService_UpdateRoles_0 = runtime.ForwardResponseMessage forward_RoleService_DeletePermissionsForRole_0 = runtime.ForwardResponseMessage - - forward_RoleService_DeleteRoles_0 = runtime.ForwardResponseMessage + forward_RoleService_DeleteRoles_0 = runtime.ForwardResponseMessage ) diff --git a/api/go/gosdn/rbac/role_grpc.pb.go b/api/go/gosdn/rbac/role_grpc.pb.go old mode 100644 new mode 100755 diff --git a/api/go/gosdn/rbac/user.pb.go b/api/go/gosdn/rbac/user.pb.go old mode 100644 new mode 100755 index 6c5c74f57c66e20cd6205862dcdeceb5caa0a174..6c413ce8c63e0b7898c44ea9347a02742cc96022 --- a/api/go/gosdn/rbac/user.pb.go +++ b/api/go/gosdn/rbac/user.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/rbac/user.proto @@ -16,6 +16,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -26,16 +27,15 @@ const ( ) type User struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Roles map[string]string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Key = pnd uuid, value= role name + Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` + Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` + Metadata *conflict.Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` 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"` - Roles map[string]string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Key = pnd uuid, value= role name - Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` - Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` - Metadata *conflict.Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` + sizeCache protoimpl.SizeCache } func (x *User) Reset() { @@ -111,16 +111,15 @@ func (x *User) GetMetadata() *conflict.Metadata { } type UpdateUser struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Roles map[string]string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Key = pnd uuid, value= role name + Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` + Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` + Metadata *conflict.Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` 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"` - Roles map[string]string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Key = pnd uuid, value= role name - Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` - Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` - Metadata *conflict.Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UpdateUser) Reset() { @@ -197,12 +196,11 @@ func (x *UpdateUser) GetMetadata() *conflict.Metadata { // CreateUsers type CreateUsersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + User []*User `protobuf:"bytes,2,rep,name=user,proto3" json:"user,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - User []*User `protobuf:"bytes,2,rep,name=user,proto3" json:"user,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CreateUsersRequest) Reset() { @@ -250,11 +248,10 @@ func (x *CreateUsersRequest) GetUser() []*User { } type CreateUsersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CreateUsersResponse) Reset() { @@ -296,13 +293,12 @@ func (x *CreateUsersResponse) GetTimestamp() int64 { // GetUser type GetUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // TODO(faseid): reconsider if this is necessary as required, but id is not? + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // TODO(faseid): reconsider if this is necessary as required, but id is not? - Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetUserRequest) Reset() { @@ -357,12 +353,11 @@ func (x *GetUserRequest) GetId() string { } type GetUserResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetUserResponse) Reset() { @@ -411,11 +406,10 @@ func (x *GetUserResponse) GetUser() *User { // GetUsers type GetUsersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetUsersRequest) Reset() { @@ -456,12 +450,11 @@ func (x *GetUsersRequest) GetTimestamp() int64 { } type GetUsersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + User []*User `protobuf:"bytes,2,rep,name=user,proto3" json:"user,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - User []*User `protobuf:"bytes,2,rep,name=user,proto3" json:"user,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetUsersResponse) Reset() { @@ -510,12 +503,11 @@ func (x *GetUsersResponse) GetUser() []*User { // UpdateUsers type UpdateUsersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + User []*UpdateUser `protobuf:"bytes,2,rep,name=user,proto3" json:"user,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - User []*UpdateUser `protobuf:"bytes,2,rep,name=user,proto3" json:"user,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UpdateUsersRequest) Reset() { @@ -563,11 +555,10 @@ func (x *UpdateUsersRequest) GetUser() []*UpdateUser { } type UpdateUsersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UpdateUsersResponse) Reset() { @@ -609,12 +600,11 @@ func (x *UpdateUsersResponse) GetTimestamp() int64 { // DeleteUsers type DeleteUsersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Username []string `protobuf:"bytes,2,rep,name=username,proto3" json:"username,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Username []string `protobuf:"bytes,2,rep,name=username,proto3" json:"username,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteUsersRequest) Reset() { @@ -662,11 +652,10 @@ func (x *DeleteUsersRequest) GetUsername() []string { } type DeleteUsersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteUsersResponse) Reset() { @@ -708,7 +697,7 @@ func (x *DeleteUsersResponse) GetTimestamp() int64 { var File_gosdn_rbac_user_proto protoreflect.FileDescriptor -var file_gosdn_rbac_user_proto_rawDesc = []byte{ +var file_gosdn_rbac_user_proto_rawDesc = string([]byte{ 0x0a, 0x15, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, @@ -841,16 +830,16 @@ var file_gosdn_rbac_user_proto_rawDesc = []byte{ 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_rbac_user_proto_rawDescOnce sync.Once - file_gosdn_rbac_user_proto_rawDescData = file_gosdn_rbac_user_proto_rawDesc + file_gosdn_rbac_user_proto_rawDescData []byte ) func file_gosdn_rbac_user_proto_rawDescGZIP() []byte { file_gosdn_rbac_user_proto_rawDescOnce.Do(func() { - file_gosdn_rbac_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_rbac_user_proto_rawDescData) + file_gosdn_rbac_user_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_rbac_user_proto_rawDesc), len(file_gosdn_rbac_user_proto_rawDesc))) }) return file_gosdn_rbac_user_proto_rawDescData } @@ -909,7 +898,7 @@ func file_gosdn_rbac_user_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_rbac_user_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_rbac_user_proto_rawDesc), len(file_gosdn_rbac_user_proto_rawDesc)), NumEnums: 0, NumMessages: 14, NumExtensions: 0, @@ -920,7 +909,6 @@ func file_gosdn_rbac_user_proto_init() { MessageInfos: file_gosdn_rbac_user_proto_msgTypes, }.Build() File_gosdn_rbac_user_proto = out.File - file_gosdn_rbac_user_proto_rawDesc = nil file_gosdn_rbac_user_proto_goTypes = nil file_gosdn_rbac_user_proto_depIdxs = nil } diff --git a/api/go/gosdn/rbac/user.pb.gw.go b/api/go/gosdn/rbac/user.pb.gw.go old mode 100644 new mode 100755 index 2103e85b5af84b6c36bb04fea2d03d752a5848ea..ebe07c3c0ae0161aa45525dd231d67c5efb01338 --- a/api/go/gosdn/rbac/user.pb.gw.go +++ b/api/go/gosdn/rbac/user.pb.gw.go @@ -10,6 +10,7 @@ package rbac import ( "context" + "errors" "io" "net/http" @@ -24,171 +25,158 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_UserService_CreateUsers_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateUsersRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CreateUsersRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.CreateUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_UserService_CreateUsers_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateUsersRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CreateUsersRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CreateUsers(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_UserService_GetUser_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_UserService_GetUser_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_UserService_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUserRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetUserRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUser_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_UserService_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUserRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetUserRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUser_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetUser(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_UserService_GetUsers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_UserService_GetUsers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_UserService_GetUsers_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUsersRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetUsersRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUsers_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_UserService_GetUsers_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUsersRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetUsersRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUsers_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetUsers(ctx, &protoReq) return msg, metadata, err - } func request_UserService_UpdateUsers_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateUsersRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq UpdateUsersRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.UpdateUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_UserService_UpdateUsers_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateUsersRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq UpdateUsersRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.UpdateUsers(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_UserService_DeleteUsers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_UserService_DeleteUsers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_UserService_DeleteUsers_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteUsersRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeleteUsersRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_DeleteUsers_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.DeleteUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_UserService_DeleteUsers_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteUsersRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeleteUsersRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_DeleteUsers_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.DeleteUsers(ctx, &protoReq) return msg, metadata, err - } // RegisterUserServiceHandlerServer registers the http handlers for service UserService to "mux". @@ -197,16 +185,13 @@ func local_request_UserService_DeleteUsers_0(ctx context.Context, marshaler runt // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUserServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error { - - mux.Handle("POST", pattern_UserService_CreateUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_UserService_CreateUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.UserService/CreateUsers", runtime.WithHTTPPathPattern("/users/create")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.UserService/CreateUsers", runtime.WithHTTPPathPattern("/users/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -218,20 +203,15 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_CreateUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_UserService_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_UserService_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.UserService/GetUser", runtime.WithHTTPPathPattern("/users/get")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.UserService/GetUser", runtime.WithHTTPPathPattern("/users/get")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -243,20 +223,15 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_UserService_GetUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_UserService_GetUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.UserService/GetUsers", runtime.WithHTTPPathPattern("/users")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.UserService/GetUsers", runtime.WithHTTPPathPattern("/users")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -268,20 +243,15 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_GetUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_UserService_UpdateUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_UserService_UpdateUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.UserService/UpdateUsers", runtime.WithHTTPPathPattern("/users/update")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.UserService/UpdateUsers", runtime.WithHTTPPathPattern("/users/update")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -293,20 +263,15 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_UpdateUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_UserService_DeleteUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_UserService_DeleteUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.UserService/DeleteUsers", runtime.WithHTTPPathPattern("/users/delete")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.rbac.UserService/DeleteUsers", runtime.WithHTTPPathPattern("/users/delete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -318,9 +283,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_DeleteUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -347,7 +310,6 @@ func RegisterUserServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.Se } }() }() - return RegisterUserServiceHandler(ctx, mux, conn) } @@ -363,14 +325,11 @@ func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "UserServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error { - - mux.Handle("POST", pattern_UserService_CreateUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_UserService_CreateUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.UserService/CreateUsers", runtime.WithHTTPPathPattern("/users/create")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.UserService/CreateUsers", runtime.WithHTTPPathPattern("/users/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -381,18 +340,13 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_CreateUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_UserService_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_UserService_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.UserService/GetUser", runtime.WithHTTPPathPattern("/users/get")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.UserService/GetUser", runtime.WithHTTPPathPattern("/users/get")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -403,18 +357,13 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_UserService_GetUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_UserService_GetUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.UserService/GetUsers", runtime.WithHTTPPathPattern("/users")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.UserService/GetUsers", runtime.WithHTTPPathPattern("/users")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -425,18 +374,13 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_GetUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_UserService_UpdateUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_UserService_UpdateUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.UserService/UpdateUsers", runtime.WithHTTPPathPattern("/users/update")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.UserService/UpdateUsers", runtime.WithHTTPPathPattern("/users/update")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -447,18 +391,13 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_UpdateUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_UserService_DeleteUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_UserService_DeleteUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.UserService/DeleteUsers", runtime.WithHTTPPathPattern("/users/delete")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.rbac.UserService/DeleteUsers", runtime.WithHTTPPathPattern("/users/delete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -469,34 +408,23 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_DeleteUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( pattern_UserService_CreateUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"users", "create"}, "")) - - pattern_UserService_GetUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"users", "get"}, "")) - - pattern_UserService_GetUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"users"}, "")) - + pattern_UserService_GetUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"users", "get"}, "")) + pattern_UserService_GetUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"users"}, "")) pattern_UserService_UpdateUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"users", "update"}, "")) - pattern_UserService_DeleteUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"users", "delete"}, "")) ) var ( forward_UserService_CreateUsers_0 = runtime.ForwardResponseMessage - - forward_UserService_GetUser_0 = runtime.ForwardResponseMessage - - forward_UserService_GetUsers_0 = runtime.ForwardResponseMessage - + forward_UserService_GetUser_0 = runtime.ForwardResponseMessage + forward_UserService_GetUsers_0 = runtime.ForwardResponseMessage forward_UserService_UpdateUsers_0 = runtime.ForwardResponseMessage - forward_UserService_DeleteUsers_0 = runtime.ForwardResponseMessage ) diff --git a/api/go/gosdn/rbac/user_grpc.pb.go b/api/go/gosdn/rbac/user_grpc.pb.go old mode 100644 new mode 100755 diff --git a/api/go/gosdn/southbound/southbound.pb.go b/api/go/gosdn/southbound/southbound.pb.go old mode 100644 new mode 100755 index bf475590f3955554ebb116283b3137a7e813fb8c..ea26197dcfdc2814025fee4c77220fc1ba856c20 --- a/api/go/gosdn/southbound/southbound.pb.go +++ b/api/go/gosdn/southbound/southbound.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/southbound/southbound.proto @@ -12,6 +12,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -76,13 +77,12 @@ func (Type) EnumDescriptor() ([]byte, []int) { } type GetSchemaRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` + Sid string `protobuf:"bytes,3,opt,name=sid,proto3" json:"sid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` - Sid string `protobuf:"bytes,3,opt,name=sid,proto3" json:"sid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetSchemaRequest) Reset() { @@ -137,11 +137,10 @@ func (x *GetSchemaRequest) GetSid() string { } type Payload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` unknownFields protoimpl.UnknownFields - - Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Payload) Reset() { @@ -182,12 +181,11 @@ func (x *Payload) GetChunk() []byte { } type SouthboundInterface struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + 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"` 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"` + sizeCache protoimpl.SizeCache } func (x *SouthboundInterface) Reset() { @@ -236,7 +234,7 @@ func (x *SouthboundInterface) GetType() Type { var File_gosdn_southbound_southbound_proto protoreflect.FileDescriptor -var file_gosdn_southbound_southbound_proto_rawDesc = []byte{ +var file_gosdn_southbound_southbound_proto_rawDesc = string([]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, @@ -271,16 +269,16 @@ var file_gosdn_southbound_southbound_proto_rawDesc = []byte{ 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 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 + file_gosdn_southbound_southbound_proto_rawDescData []byte ) 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) + file_gosdn_southbound_southbound_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_southbound_southbound_proto_rawDesc), len(file_gosdn_southbound_southbound_proto_rawDesc))) }) return file_gosdn_southbound_southbound_proto_rawDescData } @@ -313,7 +311,7 @@ func file_gosdn_southbound_southbound_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_southbound_southbound_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_southbound_southbound_proto_rawDesc), len(file_gosdn_southbound_southbound_proto_rawDesc)), NumEnums: 1, NumMessages: 3, NumExtensions: 0, @@ -325,7 +323,6 @@ func file_gosdn_southbound_southbound_proto_init() { 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/api/go/gosdn/southbound/southbound_grpc.pb.go b/api/go/gosdn/southbound/southbound_grpc.pb.go old mode 100644 new mode 100755 diff --git a/api/go/gosdn/subscriptionmanagement/subscriptionmanagement.pb.go b/api/go/gosdn/subscriptionmanagement/subscriptionmanagement.pb.go old mode 100644 new mode 100755 index 1691a7cf1951400532e2bae309faf24a18bd43af..6bfb0e28a24cd09f5e36a27b70c8e65d77f06fb4 --- a/api/go/gosdn/subscriptionmanagement/subscriptionmanagement.pb.go +++ b/api/go/gosdn/subscriptionmanagement/subscriptionmanagement.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/subscriptionmanagement/subscriptionmanagement.proto @@ -14,6 +14,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -24,16 +25,15 @@ const ( ) type Subscription struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Subid string `protobuf:"bytes,1,opt,name=subid,proto3" json:"subid,omitempty"` - Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` - Mneid string `protobuf:"bytes,3,opt,name=mneid,proto3" json:"mneid,omitempty"` - MneName string `protobuf:"bytes,4,opt,name=mne_name,json=mneName,proto3" json:"mne_name,omitempty"` - Paths []*Path `protobuf:"bytes,5,rep,name=paths,proto3" json:"paths,omitempty"` - SubscribeOptions *SubscribeOptions `protobuf:"bytes,6,opt,name=subscribe_options,json=subscribeOptions,proto3" json:"subscribe_options,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Subid string `protobuf:"bytes,1,opt,name=subid,proto3" json:"subid,omitempty"` + Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` + Mneid string `protobuf:"bytes,3,opt,name=mneid,proto3" json:"mneid,omitempty"` + MneName string `protobuf:"bytes,4,opt,name=mne_name,json=mneName,proto3" json:"mne_name,omitempty"` + Paths []*Path `protobuf:"bytes,5,rep,name=paths,proto3" json:"paths,omitempty"` + SubscribeOptions *SubscribeOptions `protobuf:"bytes,6,opt,name=subscribe_options,json=subscribeOptions,proto3" json:"subscribe_options,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Subscription) Reset() { @@ -109,11 +109,10 @@ func (x *Subscription) GetSubscribeOptions() *SubscribeOptions { } type Path struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Elem []string `protobuf:"bytes,1,rep,name=elem,proto3" json:"elem,omitempty"` unknownFields protoimpl.UnknownFields - - Elem []string `protobuf:"bytes,1,rep,name=elem,proto3" json:"elem,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Path) Reset() { @@ -154,13 +153,12 @@ func (x *Path) GetElem() []string { } type SubscribeOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GnmiMode string `protobuf:"bytes,1,opt,name=gnmi_mode,json=gnmiMode,proto3" json:"gnmi_mode,omitempty"` - GnmiStreamMode string `protobuf:"bytes,2,opt,name=gnmi_stream_mode,json=gnmiStreamMode,proto3" json:"gnmi_stream_mode,omitempty"` - SampleInterval uint64 `protobuf:"varint,3,opt,name=sample_interval,json=sampleInterval,proto3" json:"sample_interval,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + GnmiMode string `protobuf:"bytes,1,opt,name=gnmi_mode,json=gnmiMode,proto3" json:"gnmi_mode,omitempty"` + GnmiStreamMode string `protobuf:"bytes,2,opt,name=gnmi_stream_mode,json=gnmiStreamMode,proto3" json:"gnmi_stream_mode,omitempty"` + SampleInterval uint64 `protobuf:"varint,3,opt,name=sample_interval,json=sampleInterval,proto3" json:"sample_interval,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SubscribeOptions) Reset() { @@ -215,11 +213,10 @@ func (x *SubscribeOptions) GetSampleInterval() uint64 { } type GetAllRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetAllRequest) Reset() { @@ -260,12 +257,11 @@ func (x *GetAllRequest) GetTimestamp() int64 { } type GetAllResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Subscriptions []*Subscription `protobuf:"bytes,2,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Subscriptions []*Subscription `protobuf:"bytes,2,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetAllResponse) Reset() { @@ -313,12 +309,11 @@ func (x *GetAllResponse) GetSubscriptions() []*Subscription { } type GetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Subid string `protobuf:"bytes,2,opt,name=subid,proto3" json:"subid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Subid string `protobuf:"bytes,2,opt,name=subid,proto3" json:"subid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetRequest) Reset() { @@ -366,12 +361,11 @@ func (x *GetRequest) GetSubid() string { } type GetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Subscriptions *Subscription `protobuf:"bytes,2,opt,name=subscriptions,proto3" json:"subscriptions,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Subscriptions *Subscription `protobuf:"bytes,2,opt,name=subscriptions,proto3" json:"subscriptions,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetResponse) Reset() { @@ -419,12 +413,11 @@ func (x *GetResponse) GetSubscriptions() *Subscription { } type DeleteRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Subid string `protobuf:"bytes,2,opt,name=subid,proto3" json:"subid,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Subid string `protobuf:"bytes,2,opt,name=subid,proto3" json:"subid,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteRequest) Reset() { @@ -472,11 +465,10 @@ func (x *DeleteRequest) GetSubid() string { } type DeleteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteResponse) Reset() { @@ -517,13 +509,12 @@ func (x *DeleteResponse) GetTimestamp() int64 { } type AddRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` + Subscription *Subscription `protobuf:"bytes,3,opt,name=subscription,proto3" json:"subscription,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Mneid string `protobuf:"bytes,2,opt,name=mneid,proto3" json:"mneid,omitempty"` - Subscription *Subscription `protobuf:"bytes,3,opt,name=subscription,proto3" json:"subscription,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AddRequest) Reset() { @@ -578,11 +569,10 @@ func (x *AddRequest) GetSubscription() *Subscription { } type AddResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AddResponse) Reset() { @@ -623,11 +613,10 @@ func (x *AddResponse) GetTimestamp() int64 { } type ResetAllSubscriptionsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ResetAllSubscriptionsRequest) Reset() { @@ -668,11 +657,10 @@ func (x *ResetAllSubscriptionsRequest) GetTimestamp() int64 { } type ResetAllSubscriptionsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ResetAllSubscriptionsResponse) Reset() { @@ -714,7 +702,7 @@ func (x *ResetAllSubscriptionsResponse) GetTimestamp() int64 { var File_gosdn_subscriptionmanagement_subscriptionmanagement_proto protoreflect.FileDescriptor -var file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDesc = []byte{ +var file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDesc = string([]byte{ 0x0a, 0x39, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x61, 0x6e, 0x61, 0x67, @@ -855,16 +843,16 @@ var file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDesc = []b 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x73, 0x75, 0x62, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDescOnce sync.Once - file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDescData = file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDesc + file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDescData []byte ) func file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDescGZIP() []byte { file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDescOnce.Do(func() { - file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDescData) + file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDesc), len(file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDesc))) }) return file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDescData } @@ -917,7 +905,7 @@ func file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDesc), len(file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDesc)), NumEnums: 0, NumMessages: 13, NumExtensions: 0, @@ -928,7 +916,6 @@ func file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_init() { MessageInfos: file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_msgTypes, }.Build() File_gosdn_subscriptionmanagement_subscriptionmanagement_proto = out.File - file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_rawDesc = nil file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_goTypes = nil file_gosdn_subscriptionmanagement_subscriptionmanagement_proto_depIdxs = nil } diff --git a/api/go/gosdn/subscriptionmanagement/subscriptionmanagement.pb.gw.go b/api/go/gosdn/subscriptionmanagement/subscriptionmanagement.pb.gw.go old mode 100644 new mode 100755 index b7efc5dc07746d8a27ff0b9520939e6d8183f826..40aebfa6eef4249c891936f8ee3fcd7278707692 --- a/api/go/gosdn/subscriptionmanagement/subscriptionmanagement.pb.gw.go +++ b/api/go/gosdn/subscriptionmanagement/subscriptionmanagement.pb.gw.go @@ -10,6 +10,7 @@ package submanagement import ( "context" + "errors" "io" "net/http" @@ -24,283 +25,220 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - var ( - filter_SubscriptionManagementService_GetAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join ) -func request_SubscriptionManagementService_GetAll_0(ctx context.Context, marshaler runtime.Marshaler, client SubscriptionManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllRequest - var metadata runtime.ServerMetadata +var filter_SubscriptionManagementService_GetAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +func request_SubscriptionManagementService_GetAll_0(ctx context.Context, marshaler runtime.Marshaler, client SubscriptionManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetAllRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SubscriptionManagementService_GetAll_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_SubscriptionManagementService_GetAll_0(ctx context.Context, marshaler runtime.Marshaler, server SubscriptionManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAllRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetAllRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SubscriptionManagementService_GetAll_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetAll(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_SubscriptionManagementService_Get_0 = &utilities.DoubleArray{Encoding: map[string]int{"subid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_SubscriptionManagementService_Get_0 = &utilities.DoubleArray{Encoding: map[string]int{"subid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_SubscriptionManagementService_Get_0(ctx context.Context, marshaler runtime.Marshaler, client SubscriptionManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["subid"] + val, ok := pathParams["subid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "subid") } - protoReq.Subid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "subid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SubscriptionManagementService_Get_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Get(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_SubscriptionManagementService_Get_0(ctx context.Context, marshaler runtime.Marshaler, server SubscriptionManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["subid"] + val, ok := pathParams["subid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "subid") } - protoReq.Subid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "subid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SubscriptionManagementService_Get_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Get(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_SubscriptionManagementService_Delete_0 = &utilities.DoubleArray{Encoding: map[string]int{"subid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_SubscriptionManagementService_Delete_0 = &utilities.DoubleArray{Encoding: map[string]int{"subid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_SubscriptionManagementService_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client SubscriptionManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeleteRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["subid"] + val, ok := pathParams["subid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "subid") } - protoReq.Subid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "subid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SubscriptionManagementService_Delete_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Delete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_SubscriptionManagementService_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server SubscriptionManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeleteRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["subid"] + val, ok := pathParams["subid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "subid") } - protoReq.Subid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "subid", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SubscriptionManagementService_Delete_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Delete(ctx, &protoReq) return msg, metadata, err - } func request_SubscriptionManagementService_Add_0(ctx context.Context, marshaler runtime.Marshaler, client SubscriptionManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - var ( - val string - ok bool - err error - _ = err + protoReq AddRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["mneid"] + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + val, ok := pathParams["mneid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Mneid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } - msg, err := client.Add(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_SubscriptionManagementService_Add_0(ctx context.Context, marshaler runtime.Marshaler, server SubscriptionManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - var ( - val string - ok bool - err error - _ = err + protoReq AddRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["mneid"] + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + val, ok := pathParams["mneid"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "mneid") } - protoReq.Mneid, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "mneid", err) } - msg, err := server.Add(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_SubscriptionManagementService_ResetAllSubscriptions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_SubscriptionManagementService_ResetAllSubscriptions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_SubscriptionManagementService_ResetAllSubscriptions_0(ctx context.Context, marshaler runtime.Marshaler, client SubscriptionManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ResetAllSubscriptionsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ResetAllSubscriptionsRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SubscriptionManagementService_ResetAllSubscriptions_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ResetAllSubscriptions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_SubscriptionManagementService_ResetAllSubscriptions_0(ctx context.Context, marshaler runtime.Marshaler, server SubscriptionManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ResetAllSubscriptionsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ResetAllSubscriptionsRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SubscriptionManagementService_ResetAllSubscriptions_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ResetAllSubscriptions(ctx, &protoReq) return msg, metadata, err - } // RegisterSubscriptionManagementServiceHandlerServer registers the http handlers for service SubscriptionManagementService to "mux". @@ -309,16 +247,13 @@ func local_request_SubscriptionManagementService_ResetAllSubscriptions_0(ctx con // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSubscriptionManagementServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterSubscriptionManagementServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SubscriptionManagementServiceServer) error { - - mux.Handle("GET", pattern_SubscriptionManagementService_GetAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SubscriptionManagementService_GetAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/GetAll", runtime.WithHTTPPathPattern("/submanagement/subscriptions")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/GetAll", runtime.WithHTTPPathPattern("/submanagement/subscriptions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -330,20 +265,15 @@ func RegisterSubscriptionManagementServiceHandlerServer(ctx context.Context, mux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubscriptionManagementService_GetAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_SubscriptionManagementService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SubscriptionManagementService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Get", runtime.WithHTTPPathPattern("/submanagement/{subid}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Get", runtime.WithHTTPPathPattern("/submanagement/{subid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -355,20 +285,15 @@ func RegisterSubscriptionManagementServiceHandlerServer(ctx context.Context, mux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubscriptionManagementService_Get_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_SubscriptionManagementService_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_SubscriptionManagementService_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Delete", runtime.WithHTTPPathPattern("/submanagement/{subid}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Delete", runtime.WithHTTPPathPattern("/submanagement/{subid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -380,20 +305,15 @@ func RegisterSubscriptionManagementServiceHandlerServer(ctx context.Context, mux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubscriptionManagementService_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_SubscriptionManagementService_Add_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_SubscriptionManagementService_Add_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Add", runtime.WithHTTPPathPattern("/submanagement/{mneid}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Add", runtime.WithHTTPPathPattern("/submanagement/{mneid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -405,20 +325,15 @@ func RegisterSubscriptionManagementServiceHandlerServer(ctx context.Context, mux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubscriptionManagementService_Add_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_SubscriptionManagementService_ResetAllSubscriptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SubscriptionManagementService_ResetAllSubscriptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/ResetAllSubscriptions", runtime.WithHTTPPathPattern("/submanagement/reset")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/ResetAllSubscriptions", runtime.WithHTTPPathPattern("/submanagement/reset")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -430,9 +345,7 @@ func RegisterSubscriptionManagementServiceHandlerServer(ctx context.Context, mux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubscriptionManagementService_ResetAllSubscriptions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -459,7 +372,6 @@ func RegisterSubscriptionManagementServiceHandlerFromEndpoint(ctx context.Contex } }() }() - return RegisterSubscriptionManagementServiceHandler(ctx, mux, conn) } @@ -475,14 +387,11 @@ func RegisterSubscriptionManagementServiceHandler(ctx context.Context, mux *runt // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "SubscriptionManagementServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterSubscriptionManagementServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SubscriptionManagementServiceClient) error { - - mux.Handle("GET", pattern_SubscriptionManagementService_GetAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SubscriptionManagementService_GetAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/GetAll", runtime.WithHTTPPathPattern("/submanagement/subscriptions")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/GetAll", runtime.WithHTTPPathPattern("/submanagement/subscriptions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -493,18 +402,13 @@ func RegisterSubscriptionManagementServiceHandlerClient(ctx context.Context, mux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubscriptionManagementService_GetAll_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_SubscriptionManagementService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SubscriptionManagementService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Get", runtime.WithHTTPPathPattern("/submanagement/{subid}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Get", runtime.WithHTTPPathPattern("/submanagement/{subid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -515,18 +419,13 @@ func RegisterSubscriptionManagementServiceHandlerClient(ctx context.Context, mux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubscriptionManagementService_Get_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_SubscriptionManagementService_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_SubscriptionManagementService_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Delete", runtime.WithHTTPPathPattern("/submanagement/{subid}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Delete", runtime.WithHTTPPathPattern("/submanagement/{subid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -537,18 +436,13 @@ func RegisterSubscriptionManagementServiceHandlerClient(ctx context.Context, mux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubscriptionManagementService_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_SubscriptionManagementService_Add_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_SubscriptionManagementService_Add_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Add", runtime.WithHTTPPathPattern("/submanagement/{mneid}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/Add", runtime.WithHTTPPathPattern("/submanagement/{mneid}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -559,18 +453,13 @@ func RegisterSubscriptionManagementServiceHandlerClient(ctx context.Context, mux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubscriptionManagementService_Add_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_SubscriptionManagementService_ResetAllSubscriptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SubscriptionManagementService_ResetAllSubscriptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/ResetAllSubscriptions", runtime.WithHTTPPathPattern("/submanagement/reset")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.subscriptionmanagement.SubscriptionManagementService/ResetAllSubscriptions", runtime.WithHTTPPathPattern("/submanagement/reset")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -581,34 +470,23 @@ func RegisterSubscriptionManagementServiceHandlerClient(ctx context.Context, mux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubscriptionManagementService_ResetAllSubscriptions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( - pattern_SubscriptionManagementService_GetAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"submanagement", "subscriptions"}, "")) - - pattern_SubscriptionManagementService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"submanagement", "subid"}, "")) - - pattern_SubscriptionManagementService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"submanagement", "subid"}, "")) - - pattern_SubscriptionManagementService_Add_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"submanagement", "mneid"}, "")) - + pattern_SubscriptionManagementService_GetAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"submanagement", "subscriptions"}, "")) + pattern_SubscriptionManagementService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"submanagement", "subid"}, "")) + pattern_SubscriptionManagementService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"submanagement", "subid"}, "")) + pattern_SubscriptionManagementService_Add_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"submanagement", "mneid"}, "")) pattern_SubscriptionManagementService_ResetAllSubscriptions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"submanagement", "reset"}, "")) ) var ( - forward_SubscriptionManagementService_GetAll_0 = runtime.ForwardResponseMessage - - forward_SubscriptionManagementService_Get_0 = runtime.ForwardResponseMessage - - forward_SubscriptionManagementService_Delete_0 = runtime.ForwardResponseMessage - - forward_SubscriptionManagementService_Add_0 = runtime.ForwardResponseMessage - + forward_SubscriptionManagementService_GetAll_0 = runtime.ForwardResponseMessage + forward_SubscriptionManagementService_Get_0 = runtime.ForwardResponseMessage + forward_SubscriptionManagementService_Delete_0 = runtime.ForwardResponseMessage + forward_SubscriptionManagementService_Add_0 = runtime.ForwardResponseMessage forward_SubscriptionManagementService_ResetAllSubscriptions_0 = runtime.ForwardResponseMessage ) diff --git a/api/go/gosdn/subscriptionmanagement/subscriptionmanagement_grpc.pb.go b/api/go/gosdn/subscriptionmanagement/subscriptionmanagement_grpc.pb.go old mode 100644 new mode 100755 diff --git a/api/go/gosdn/topology/link.pb.go b/api/go/gosdn/topology/link.pb.go old mode 100644 new mode 100755 index 398feb9d9435afadb3a5f1a21b82a92272fc867e..d18acbd1b6898de7f232eb2d8e17c2686c0831b4 --- a/api/go/gosdn/topology/link.pb.go +++ b/api/go/gosdn/topology/link.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/topology/link.proto @@ -16,6 +16,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -26,17 +27,16 @@ const ( ) type Link struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + SourceNode *Node `protobuf:"bytes,3,opt,name=sourceNode,proto3" json:"sourceNode,omitempty"` + TargetNode *Node `protobuf:"bytes,4,opt,name=targetNode,proto3" json:"targetNode,omitempty"` + SourcePort *Port `protobuf:"bytes,5,opt,name=sourcePort,proto3" json:"sourcePort,omitempty"` + TargetPort *Port `protobuf:"bytes,6,opt,name=targetPort,proto3" json:"targetPort,omitempty"` + Metadata *conflict.Metadata `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata,omitempty"` 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"` - SourceNode *Node `protobuf:"bytes,3,opt,name=sourceNode,proto3" json:"sourceNode,omitempty"` - TargetNode *Node `protobuf:"bytes,4,opt,name=targetNode,proto3" json:"targetNode,omitempty"` - SourcePort *Port `protobuf:"bytes,5,opt,name=sourcePort,proto3" json:"sourcePort,omitempty"` - TargetPort *Port `protobuf:"bytes,6,opt,name=targetPort,proto3" json:"targetPort,omitempty"` - Metadata *conflict.Metadata `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Link) Reset() { @@ -120,7 +120,7 @@ func (x *Link) GetMetadata() *conflict.Metadata { var File_gosdn_topology_link_proto protoreflect.FileDescriptor -var file_gosdn_topology_link_proto_rawDesc = []byte{ +var file_gosdn_topology_link_proto_rawDesc = string([]byte{ 0x0a, 0x19, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2f, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, @@ -164,16 +164,16 @@ var file_gosdn_topology_link_proto_rawDesc = []byte{ 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_topology_link_proto_rawDescOnce sync.Once - file_gosdn_topology_link_proto_rawDescData = file_gosdn_topology_link_proto_rawDesc + file_gosdn_topology_link_proto_rawDescData []byte ) func file_gosdn_topology_link_proto_rawDescGZIP() []byte { file_gosdn_topology_link_proto_rawDescOnce.Do(func() { - file_gosdn_topology_link_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_topology_link_proto_rawDescData) + file_gosdn_topology_link_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_topology_link_proto_rawDesc), len(file_gosdn_topology_link_proto_rawDesc))) }) return file_gosdn_topology_link_proto_rawDescData } @@ -209,7 +209,7 @@ func file_gosdn_topology_link_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_topology_link_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_topology_link_proto_rawDesc), len(file_gosdn_topology_link_proto_rawDesc)), NumEnums: 0, NumMessages: 1, NumExtensions: 0, @@ -220,7 +220,6 @@ func file_gosdn_topology_link_proto_init() { MessageInfos: file_gosdn_topology_link_proto_msgTypes, }.Build() File_gosdn_topology_link_proto = out.File - file_gosdn_topology_link_proto_rawDesc = nil file_gosdn_topology_link_proto_goTypes = nil file_gosdn_topology_link_proto_depIdxs = nil } diff --git a/api/go/gosdn/topology/node.pb.go b/api/go/gosdn/topology/node.pb.go old mode 100644 new mode 100755 index b65392c17c9b9dc82b871dcdc7d7818f7b40e965..d9c0e5af144917901a95cb18fae8c9f30080a1af --- a/api/go/gosdn/topology/node.pb.go +++ b/api/go/gosdn/topology/node.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/topology/node.proto @@ -16,6 +16,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -26,13 +27,12 @@ const ( ) type Node struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Metadata *conflict.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` 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"` - Metadata *conflict.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Node) Reset() { @@ -88,7 +88,7 @@ func (x *Node) GetMetadata() *conflict.Metadata { var File_gosdn_topology_node_proto protoreflect.FileDescriptor -var file_gosdn_topology_node_proto_rawDesc = []byte{ +var file_gosdn_topology_node_proto_rawDesc = string([]byte{ 0x0a, 0x19, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, @@ -113,16 +113,16 @@ var file_gosdn_topology_node_proto_rawDesc = []byte{ 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_topology_node_proto_rawDescOnce sync.Once - file_gosdn_topology_node_proto_rawDescData = file_gosdn_topology_node_proto_rawDesc + file_gosdn_topology_node_proto_rawDescData []byte ) func file_gosdn_topology_node_proto_rawDescGZIP() []byte { file_gosdn_topology_node_proto_rawDescOnce.Do(func() { - file_gosdn_topology_node_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_topology_node_proto_rawDescData) + file_gosdn_topology_node_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_topology_node_proto_rawDesc), len(file_gosdn_topology_node_proto_rawDesc))) }) return file_gosdn_topology_node_proto_rawDescData } @@ -150,7 +150,7 @@ func file_gosdn_topology_node_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_topology_node_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_topology_node_proto_rawDesc), len(file_gosdn_topology_node_proto_rawDesc)), NumEnums: 0, NumMessages: 1, NumExtensions: 0, @@ -161,7 +161,6 @@ func file_gosdn_topology_node_proto_init() { MessageInfos: file_gosdn_topology_node_proto_msgTypes, }.Build() File_gosdn_topology_node_proto = out.File - file_gosdn_topology_node_proto_rawDesc = nil file_gosdn_topology_node_proto_goTypes = nil file_gosdn_topology_node_proto_depIdxs = nil } diff --git a/api/go/gosdn/topology/port.pb.go b/api/go/gosdn/topology/port.pb.go old mode 100644 new mode 100755 index de83b8af4238e0be3681a46aa67087d98b1d173f..3834525729e16fdd2be533fbce9eed32c1af9075 --- a/api/go/gosdn/topology/port.pb.go +++ b/api/go/gosdn/topology/port.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/topology/port.proto @@ -16,6 +16,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -26,12 +27,11 @@ const ( ) type Configuration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` + PrefixLength int64 `protobuf:"varint,2,opt,name=prefixLength,proto3" json:"prefixLength,omitempty"` unknownFields protoimpl.UnknownFields - - Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` - PrefixLength int64 `protobuf:"varint,2,opt,name=prefixLength,proto3" json:"prefixLength,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Configuration) Reset() { @@ -79,14 +79,13 @@ func (x *Configuration) GetPrefixLength() int64 { } type Port struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Configuration *Configuration `protobuf:"bytes,3,opt,name=configuration,proto3" json:"configuration,omitempty"` + Metadata *conflict.Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` 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"` - Configuration *Configuration `protobuf:"bytes,3,opt,name=configuration,proto3" json:"configuration,omitempty"` - Metadata *conflict.Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Port) Reset() { @@ -149,7 +148,7 @@ func (x *Port) GetMetadata() *conflict.Metadata { var File_gosdn_topology_port_proto protoreflect.FileDescriptor -var file_gosdn_topology_port_proto_rawDesc = []byte{ +var file_gosdn_topology_port_proto_rawDesc = string([]byte{ 0x0a, 0x19, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, @@ -185,16 +184,16 @@ var file_gosdn_topology_port_proto_rawDesc = []byte{ 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_topology_port_proto_rawDescOnce sync.Once - file_gosdn_topology_port_proto_rawDescData = file_gosdn_topology_port_proto_rawDesc + file_gosdn_topology_port_proto_rawDescData []byte ) func file_gosdn_topology_port_proto_rawDescGZIP() []byte { file_gosdn_topology_port_proto_rawDescOnce.Do(func() { - file_gosdn_topology_port_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_topology_port_proto_rawDescData) + file_gosdn_topology_port_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_topology_port_proto_rawDesc), len(file_gosdn_topology_port_proto_rawDesc))) }) return file_gosdn_topology_port_proto_rawDescData } @@ -224,7 +223,7 @@ func file_gosdn_topology_port_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_topology_port_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_topology_port_proto_rawDesc), len(file_gosdn_topology_port_proto_rawDesc)), NumEnums: 0, NumMessages: 2, NumExtensions: 0, @@ -235,7 +234,6 @@ func file_gosdn_topology_port_proto_init() { MessageInfos: file_gosdn_topology_port_proto_msgTypes, }.Build() File_gosdn_topology_port_proto = out.File - file_gosdn_topology_port_proto_rawDesc = nil file_gosdn_topology_port_proto_goTypes = nil file_gosdn_topology_port_proto_depIdxs = nil } diff --git a/api/go/gosdn/topology/route.pb.go b/api/go/gosdn/topology/route.pb.go old mode 100644 new mode 100755 index 9627c2df6fdc4187247d3290048fc740b25e24a1..f4472000e79d0d3ea76c7465f6f39dbfd0946a0f --- a/api/go/gosdn/topology/route.pb.go +++ b/api/go/gosdn/topology/route.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/topology/route.proto @@ -16,6 +16,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -26,15 +27,14 @@ const ( ) type Route struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + TargetIPRange string `protobuf:"bytes,2,opt,name=targetIPRange,proto3" json:"targetIPRange,omitempty"` + NextHopIP string `protobuf:"bytes,3,opt,name=nextHopIP,proto3" json:"nextHopIP,omitempty"` + PortID string `protobuf:"bytes,4,opt,name=portID,proto3" json:"portID,omitempty"` + Metric string `protobuf:"bytes,5,opt,name=metric,proto3" json:"metric,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - TargetIPRange string `protobuf:"bytes,2,opt,name=targetIPRange,proto3" json:"targetIPRange,omitempty"` - NextHopIP string `protobuf:"bytes,3,opt,name=nextHopIP,proto3" json:"nextHopIP,omitempty"` - PortID string `protobuf:"bytes,4,opt,name=portID,proto3" json:"portID,omitempty"` - Metric string `protobuf:"bytes,5,opt,name=metric,proto3" json:"metric,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Route) Reset() { @@ -103,14 +103,13 @@ func (x *Route) GetMetric() string { } type RoutingTable struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + NodeID string `protobuf:"bytes,2,opt,name=nodeID,proto3" json:"nodeID,omitempty"` + Routes []*Route `protobuf:"bytes,3,rep,name=routes,proto3" json:"routes,omitempty"` + Metadata *conflict.Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - NodeID string `protobuf:"bytes,2,opt,name=nodeID,proto3" json:"nodeID,omitempty"` - Routes []*Route `protobuf:"bytes,3,rep,name=routes,proto3" json:"routes,omitempty"` - Metadata *conflict.Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + sizeCache protoimpl.SizeCache } func (x *RoutingTable) Reset() { @@ -173,7 +172,7 @@ func (x *RoutingTable) GetMetadata() *conflict.Metadata { var File_gosdn_topology_route_proto protoreflect.FileDescriptor -var file_gosdn_topology_route_proto_rawDesc = []byte{ +var file_gosdn_topology_route_proto_rawDesc = string([]byte{ 0x0a, 0x1a, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x1a, 0x1c, 0x67, 0x6f, @@ -213,16 +212,16 @@ var file_gosdn_topology_route_proto_rawDesc = []byte{ 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_topology_route_proto_rawDescOnce sync.Once - file_gosdn_topology_route_proto_rawDescData = file_gosdn_topology_route_proto_rawDesc + file_gosdn_topology_route_proto_rawDescData []byte ) func file_gosdn_topology_route_proto_rawDescGZIP() []byte { file_gosdn_topology_route_proto_rawDescOnce.Do(func() { - file_gosdn_topology_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_topology_route_proto_rawDescData) + file_gosdn_topology_route_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_topology_route_proto_rawDesc), len(file_gosdn_topology_route_proto_rawDesc))) }) return file_gosdn_topology_route_proto_rawDescData } @@ -252,7 +251,7 @@ func file_gosdn_topology_route_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_topology_route_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_topology_route_proto_rawDesc), len(file_gosdn_topology_route_proto_rawDesc)), NumEnums: 0, NumMessages: 2, NumExtensions: 0, @@ -263,7 +262,6 @@ func file_gosdn_topology_route_proto_init() { MessageInfos: file_gosdn_topology_route_proto_msgTypes, }.Build() File_gosdn_topology_route_proto = out.File - file_gosdn_topology_route_proto_rawDesc = nil file_gosdn_topology_route_proto_goTypes = nil file_gosdn_topology_route_proto_depIdxs = nil } diff --git a/api/go/gosdn/topology/routingTable.pb.go b/api/go/gosdn/topology/routingTable.pb.go old mode 100644 new mode 100755 index 1b9638cb3470fdffd020197419fe0a4f293557f9..d7b791f349a84ae3418f59de78bb5be625253aba --- a/api/go/gosdn/topology/routingTable.pb.go +++ b/api/go/gosdn/topology/routingTable.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/topology/routingTable.proto @@ -16,6 +16,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -26,12 +27,11 @@ const ( ) type AddRoutingTableRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + RoutingTable *RoutingTable `protobuf:"bytes,2,opt,name=routingTable,proto3" json:"routingTable,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - RoutingTable *RoutingTable `protobuf:"bytes,2,opt,name=routingTable,proto3" json:"routingTable,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AddRoutingTableRequest) Reset() { @@ -79,11 +79,10 @@ func (x *AddRoutingTableRequest) GetRoutingTable() *RoutingTable { } type AddRoutingTableResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AddRoutingTableResponse) Reset() { @@ -124,11 +123,10 @@ func (x *AddRoutingTableResponse) GetTimestamp() int64 { } type GetRoutesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetRoutesRequest) Reset() { @@ -169,12 +167,11 @@ func (x *GetRoutesRequest) GetTimestamp() int64 { } type GetRoutesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + RoutingTables []*RoutingTable `protobuf:"bytes,2,rep,name=routingTables,proto3" json:"routingTables,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - RoutingTables []*RoutingTable `protobuf:"bytes,2,rep,name=routingTables,proto3" json:"routingTables,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetRoutesResponse) Reset() { @@ -222,12 +219,11 @@ func (x *GetRoutesResponse) GetRoutingTables() []*RoutingTable { } type DeleteRoutesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteRoutesRequest) Reset() { @@ -275,11 +271,10 @@ func (x *DeleteRoutesRequest) GetId() string { } type DeleteRoutesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteRoutesResponse) Reset() { @@ -321,7 +316,7 @@ func (x *DeleteRoutesResponse) GetTimestamp() int64 { var File_gosdn_topology_routingTable_proto protoreflect.FileDescriptor -var file_gosdn_topology_routingTable_proto_rawDesc = []byte{ +var file_gosdn_topology_routingTable_proto_rawDesc = string([]byte{ 0x0a, 0x21, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, @@ -397,16 +392,16 @@ var file_gosdn_topology_routingTable_proto_rawDesc = []byte{ 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_topology_routingTable_proto_rawDescOnce sync.Once - file_gosdn_topology_routingTable_proto_rawDescData = file_gosdn_topology_routingTable_proto_rawDesc + file_gosdn_topology_routingTable_proto_rawDescData []byte ) func file_gosdn_topology_routingTable_proto_rawDescGZIP() []byte { file_gosdn_topology_routingTable_proto_rawDescOnce.Do(func() { - file_gosdn_topology_routingTable_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_topology_routingTable_proto_rawDescData) + file_gosdn_topology_routingTable_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_topology_routingTable_proto_rawDesc), len(file_gosdn_topology_routingTable_proto_rawDesc))) }) return file_gosdn_topology_routingTable_proto_rawDescData } @@ -448,7 +443,7 @@ func file_gosdn_topology_routingTable_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_topology_routingTable_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_topology_routingTable_proto_rawDesc), len(file_gosdn_topology_routingTable_proto_rawDesc)), NumEnums: 0, NumMessages: 6, NumExtensions: 0, @@ -459,7 +454,6 @@ func file_gosdn_topology_routingTable_proto_init() { MessageInfos: file_gosdn_topology_routingTable_proto_msgTypes, }.Build() File_gosdn_topology_routingTable_proto = out.File - file_gosdn_topology_routingTable_proto_rawDesc = nil file_gosdn_topology_routingTable_proto_goTypes = nil file_gosdn_topology_routingTable_proto_depIdxs = nil } diff --git a/api/go/gosdn/topology/routingTable.pb.gw.go b/api/go/gosdn/topology/routingTable.pb.gw.go old mode 100644 new mode 100755 index 2b736a2f523e3d725b33cfcb905e6d58a920503d..4bcd1b743003bcc67b1b224e9052e369e05f1154 --- a/api/go/gosdn/topology/routingTable.pb.gw.go +++ b/api/go/gosdn/topology/routingTable.pb.gw.go @@ -10,6 +10,7 @@ package topology import ( "context" + "errors" "io" "net/http" @@ -24,109 +25,102 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_RoutingTableService_AddRoutingTable_0(ctx context.Context, marshaler runtime.Marshaler, client RoutingTableServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddRoutingTableRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AddRoutingTableRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.AddRoutingTable(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RoutingTableService_AddRoutingTable_0(ctx context.Context, marshaler runtime.Marshaler, server RoutingTableServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddRoutingTableRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AddRoutingTableRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.AddRoutingTable(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RoutingTableService_GetRoutes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_RoutingTableService_GetRoutes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_RoutingTableService_GetRoutes_0(ctx context.Context, marshaler runtime.Marshaler, client RoutingTableServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRoutesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetRoutesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoutingTableService_GetRoutes_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetRoutes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RoutingTableService_GetRoutes_0(ctx context.Context, marshaler runtime.Marshaler, server RoutingTableServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRoutesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetRoutesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoutingTableService_GetRoutes_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetRoutes(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RoutingTableService_DeleteRoute_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_RoutingTableService_DeleteRoute_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_RoutingTableService_DeleteRoute_0(ctx context.Context, marshaler runtime.Marshaler, client RoutingTableServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRoutesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeleteRoutesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoutingTableService_DeleteRoute_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.DeleteRoute(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RoutingTableService_DeleteRoute_0(ctx context.Context, marshaler runtime.Marshaler, server RoutingTableServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRoutesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeleteRoutesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RoutingTableService_DeleteRoute_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.DeleteRoute(ctx, &protoReq) return msg, metadata, err - } // RegisterRoutingTableServiceHandlerServer registers the http handlers for service RoutingTableService to "mux". @@ -135,16 +129,13 @@ func local_request_RoutingTableService_DeleteRoute_0(ctx context.Context, marsha // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRoutingTableServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterRoutingTableServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RoutingTableServiceServer) error { - - mux.Handle("POST", pattern_RoutingTableService_AddRoutingTable_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RoutingTableService_AddRoutingTable_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/AddRoutingTable", runtime.WithHTTPPathPattern("/routing/create")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/AddRoutingTable", runtime.WithHTTPPathPattern("/routing/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -156,20 +147,15 @@ func RegisterRoutingTableServiceHandlerServer(ctx context.Context, mux *runtime. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoutingTableService_AddRoutingTable_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_RoutingTableService_GetRoutes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RoutingTableService_GetRoutes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/GetRoutes", runtime.WithHTTPPathPattern("/routing")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/GetRoutes", runtime.WithHTTPPathPattern("/routing")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -181,20 +167,15 @@ func RegisterRoutingTableServiceHandlerServer(ctx context.Context, mux *runtime. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoutingTableService_GetRoutes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_RoutingTableService_DeleteRoute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_RoutingTableService_DeleteRoute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/DeleteRoute", runtime.WithHTTPPathPattern("/routing/delete")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/DeleteRoute", runtime.WithHTTPPathPattern("/routing/delete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -206,9 +187,7 @@ func RegisterRoutingTableServiceHandlerServer(ctx context.Context, mux *runtime. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoutingTableService_DeleteRoute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -235,7 +214,6 @@ func RegisterRoutingTableServiceHandlerFromEndpoint(ctx context.Context, mux *ru } }() }() - return RegisterRoutingTableServiceHandler(ctx, mux, conn) } @@ -251,14 +229,11 @@ func RegisterRoutingTableServiceHandler(ctx context.Context, mux *runtime.ServeM // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "RoutingTableServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterRoutingTableServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RoutingTableServiceClient) error { - - mux.Handle("POST", pattern_RoutingTableService_AddRoutingTable_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RoutingTableService_AddRoutingTable_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/AddRoutingTable", runtime.WithHTTPPathPattern("/routing/create")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/AddRoutingTable", runtime.WithHTTPPathPattern("/routing/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -269,18 +244,13 @@ func RegisterRoutingTableServiceHandlerClient(ctx context.Context, mux *runtime. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoutingTableService_AddRoutingTable_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_RoutingTableService_GetRoutes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RoutingTableService_GetRoutes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/GetRoutes", runtime.WithHTTPPathPattern("/routing")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/GetRoutes", runtime.WithHTTPPathPattern("/routing")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -291,18 +261,13 @@ func RegisterRoutingTableServiceHandlerClient(ctx context.Context, mux *runtime. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoutingTableService_GetRoutes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_RoutingTableService_DeleteRoute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_RoutingTableService_DeleteRoute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/DeleteRoute", runtime.WithHTTPPathPattern("/routing/delete")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.RoutingTableService/DeleteRoute", runtime.WithHTTPPathPattern("/routing/delete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -313,26 +278,19 @@ func RegisterRoutingTableServiceHandlerClient(ctx context.Context, mux *runtime. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_RoutingTableService_DeleteRoute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( pattern_RoutingTableService_AddRoutingTable_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"routing", "create"}, "")) - - pattern_RoutingTableService_GetRoutes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"routing"}, "")) - - pattern_RoutingTableService_DeleteRoute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"routing", "delete"}, "")) + pattern_RoutingTableService_GetRoutes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"routing"}, "")) + pattern_RoutingTableService_DeleteRoute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"routing", "delete"}, "")) ) var ( forward_RoutingTableService_AddRoutingTable_0 = runtime.ForwardResponseMessage - - forward_RoutingTableService_GetRoutes_0 = runtime.ForwardResponseMessage - - forward_RoutingTableService_DeleteRoute_0 = runtime.ForwardResponseMessage + forward_RoutingTableService_GetRoutes_0 = runtime.ForwardResponseMessage + forward_RoutingTableService_DeleteRoute_0 = runtime.ForwardResponseMessage ) diff --git a/api/go/gosdn/topology/routingTable_grpc.pb.go b/api/go/gosdn/topology/routingTable_grpc.pb.go old mode 100644 new mode 100755 diff --git a/api/go/gosdn/topology/topology.pb.go b/api/go/gosdn/topology/topology.pb.go old mode 100644 new mode 100755 index 6d85ea4add02f62f424d03354ffb74e7c7403d01..073a288f80b13a78e268694e66278a579844fe8a --- a/api/go/gosdn/topology/topology.pb.go +++ b/api/go/gosdn/topology/topology.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/topology/topology.proto @@ -15,6 +15,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -25,11 +26,10 @@ const ( ) type Topology struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Links []*Link `protobuf:"bytes,1,rep,name=links,proto3" json:"links,omitempty"` unknownFields protoimpl.UnknownFields - - Links []*Link `protobuf:"bytes,1,rep,name=links,proto3" json:"links,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Topology) Reset() { @@ -70,12 +70,11 @@ func (x *Topology) GetLinks() []*Link { } type AddLinkRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Link *Link `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Link *Link `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AddLinkRequest) Reset() { @@ -123,11 +122,10 @@ func (x *AddLinkRequest) GetLink() *Link { } type AddLinkResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AddLinkResponse) Reset() { @@ -168,11 +166,10 @@ func (x *AddLinkResponse) GetTimestamp() int64 { } type GetTopologyRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetTopologyRequest) Reset() { @@ -213,12 +210,11 @@ func (x *GetTopologyRequest) GetTimestamp() int64 { } type GetTopologyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Toplogy *Topology `protobuf:"bytes,2,opt,name=toplogy,proto3" json:"toplogy,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Toplogy *Topology `protobuf:"bytes,2,opt,name=toplogy,proto3" json:"toplogy,omitempty"` + sizeCache protoimpl.SizeCache } func (x *GetTopologyResponse) Reset() { @@ -266,12 +262,11 @@ func (x *GetTopologyResponse) GetToplogy() *Topology { } type UpdateLinkRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Link *Link `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Link *Link `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UpdateLinkRequest) Reset() { @@ -319,11 +314,10 @@ func (x *UpdateLinkRequest) GetLink() *Link { } type UpdateLinkResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UpdateLinkResponse) Reset() { @@ -364,12 +358,11 @@ func (x *UpdateLinkResponse) GetTimestamp() int64 { } type DeleteLinkRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteLinkRequest) Reset() { @@ -417,11 +410,10 @@ func (x *DeleteLinkRequest) GetId() string { } type DeleteLinkResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteLinkResponse) Reset() { @@ -463,7 +455,7 @@ func (x *DeleteLinkResponse) GetTimestamp() int64 { var File_gosdn_topology_topology_proto protoreflect.FileDescriptor -var file_gosdn_topology_topology_proto_rawDesc = []byte{ +var file_gosdn_topology_topology_proto_rawDesc = string([]byte{ 0x0a, 0x1d, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x1a, @@ -552,16 +544,16 @@ var file_gosdn_topology_topology_proto_rawDesc = []byte{ 0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_gosdn_topology_topology_proto_rawDescOnce sync.Once - file_gosdn_topology_topology_proto_rawDescData = file_gosdn_topology_topology_proto_rawDesc + file_gosdn_topology_topology_proto_rawDescData []byte ) func file_gosdn_topology_topology_proto_rawDescGZIP() []byte { file_gosdn_topology_topology_proto_rawDescOnce.Do(func() { - file_gosdn_topology_topology_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_topology_topology_proto_rawDescData) + file_gosdn_topology_topology_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_topology_topology_proto_rawDesc), len(file_gosdn_topology_topology_proto_rawDesc))) }) return file_gosdn_topology_topology_proto_rawDescData } @@ -610,7 +602,7 @@ func file_gosdn_topology_topology_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_topology_topology_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_topology_topology_proto_rawDesc), len(file_gosdn_topology_topology_proto_rawDesc)), NumEnums: 0, NumMessages: 9, NumExtensions: 0, @@ -621,7 +613,6 @@ func file_gosdn_topology_topology_proto_init() { MessageInfos: file_gosdn_topology_topology_proto_msgTypes, }.Build() File_gosdn_topology_topology_proto = out.File - file_gosdn_topology_topology_proto_rawDesc = nil file_gosdn_topology_topology_proto_goTypes = nil file_gosdn_topology_topology_proto_depIdxs = nil } diff --git a/api/go/gosdn/topology/topology.pb.gw.go b/api/go/gosdn/topology/topology.pb.gw.go old mode 100644 new mode 100755 index 93edbd2fd86ddd2bb2deb3acbfbbc3d7911569bc..d4587d5046951bfc72b52e80b8b0635402ab8535 --- a/api/go/gosdn/topology/topology.pb.gw.go +++ b/api/go/gosdn/topology/topology.pb.gw.go @@ -10,6 +10,7 @@ package topology import ( "context" + "errors" "io" "net/http" @@ -24,135 +25,126 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_TopologyService_AddLink_0(ctx context.Context, marshaler runtime.Marshaler, client TopologyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddLinkRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AddLinkRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.AddLink(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_TopologyService_AddLink_0(ctx context.Context, marshaler runtime.Marshaler, server TopologyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddLinkRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq AddLinkRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.AddLink(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_TopologyService_GetTopology_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_TopologyService_GetTopology_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_TopologyService_GetTopology_0(ctx context.Context, marshaler runtime.Marshaler, client TopologyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTopologyRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetTopologyRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TopologyService_GetTopology_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetTopology(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_TopologyService_GetTopology_0(ctx context.Context, marshaler runtime.Marshaler, server TopologyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTopologyRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetTopologyRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TopologyService_GetTopology_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetTopology(ctx, &protoReq) return msg, metadata, err - } func request_TopologyService_UpdateLink_0(ctx context.Context, marshaler runtime.Marshaler, client TopologyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateLinkRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq UpdateLinkRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.UpdateLink(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_TopologyService_UpdateLink_0(ctx context.Context, marshaler runtime.Marshaler, server TopologyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateLinkRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq UpdateLinkRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.UpdateLink(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_TopologyService_DeleteLink_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_TopologyService_DeleteLink_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_TopologyService_DeleteLink_0(ctx context.Context, marshaler runtime.Marshaler, client TopologyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteLinkRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeleteLinkRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TopologyService_DeleteLink_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.DeleteLink(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_TopologyService_DeleteLink_0(ctx context.Context, marshaler runtime.Marshaler, server TopologyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteLinkRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeleteLinkRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TopologyService_DeleteLink_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.DeleteLink(ctx, &protoReq) return msg, metadata, err - } // RegisterTopologyServiceHandlerServer registers the http handlers for service TopologyService to "mux". @@ -161,16 +153,13 @@ func local_request_TopologyService_DeleteLink_0(ctx context.Context, marshaler r // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTopologyServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterTopologyServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TopologyServiceServer) error { - - mux.Handle("POST", pattern_TopologyService_AddLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_TopologyService_AddLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.TopologyService/AddLink", runtime.WithHTTPPathPattern("/topology/create")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.TopologyService/AddLink", runtime.WithHTTPPathPattern("/topology/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -182,20 +171,15 @@ func RegisterTopologyServiceHandlerServer(ctx context.Context, mux *runtime.Serv runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TopologyService_AddLink_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_TopologyService_GetTopology_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_TopologyService_GetTopology_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.TopologyService/GetTopology", runtime.WithHTTPPathPattern("/topology")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.TopologyService/GetTopology", runtime.WithHTTPPathPattern("/topology")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -207,20 +191,15 @@ func RegisterTopologyServiceHandlerServer(ctx context.Context, mux *runtime.Serv runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TopologyService_GetTopology_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_TopologyService_UpdateLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_TopologyService_UpdateLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.TopologyService/UpdateLink", runtime.WithHTTPPathPattern("/topology/update")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.TopologyService/UpdateLink", runtime.WithHTTPPathPattern("/topology/update")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -232,20 +211,15 @@ func RegisterTopologyServiceHandlerServer(ctx context.Context, mux *runtime.Serv runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TopologyService_UpdateLink_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_TopologyService_DeleteLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_TopologyService_DeleteLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.TopologyService/DeleteLink", runtime.WithHTTPPathPattern("/topology/delete")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gosdn.topology.TopologyService/DeleteLink", runtime.WithHTTPPathPattern("/topology/delete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -257,9 +231,7 @@ func RegisterTopologyServiceHandlerServer(ctx context.Context, mux *runtime.Serv runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TopologyService_DeleteLink_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -286,7 +258,6 @@ func RegisterTopologyServiceHandlerFromEndpoint(ctx context.Context, mux *runtim } }() }() - return RegisterTopologyServiceHandler(ctx, mux, conn) } @@ -302,14 +273,11 @@ func RegisterTopologyServiceHandler(ctx context.Context, mux *runtime.ServeMux, // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "TopologyServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterTopologyServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TopologyServiceClient) error { - - mux.Handle("POST", pattern_TopologyService_AddLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_TopologyService_AddLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.TopologyService/AddLink", runtime.WithHTTPPathPattern("/topology/create")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.TopologyService/AddLink", runtime.WithHTTPPathPattern("/topology/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -320,18 +288,13 @@ func RegisterTopologyServiceHandlerClient(ctx context.Context, mux *runtime.Serv runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TopologyService_AddLink_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_TopologyService_GetTopology_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_TopologyService_GetTopology_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.TopologyService/GetTopology", runtime.WithHTTPPathPattern("/topology")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.TopologyService/GetTopology", runtime.WithHTTPPathPattern("/topology")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -342,18 +305,13 @@ func RegisterTopologyServiceHandlerClient(ctx context.Context, mux *runtime.Serv runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TopologyService_GetTopology_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_TopologyService_UpdateLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_TopologyService_UpdateLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.TopologyService/UpdateLink", runtime.WithHTTPPathPattern("/topology/update")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.TopologyService/UpdateLink", runtime.WithHTTPPathPattern("/topology/update")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -364,18 +322,13 @@ func RegisterTopologyServiceHandlerClient(ctx context.Context, mux *runtime.Serv runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TopologyService_UpdateLink_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_TopologyService_DeleteLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_TopologyService_DeleteLink_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.TopologyService/DeleteLink", runtime.WithHTTPPathPattern("/topology/delete")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/gosdn.topology.TopologyService/DeleteLink", runtime.WithHTTPPathPattern("/topology/delete")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -386,30 +339,21 @@ func RegisterTopologyServiceHandlerClient(ctx context.Context, mux *runtime.Serv runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TopologyService_DeleteLink_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( - pattern_TopologyService_AddLink_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"topology", "create"}, "")) - + pattern_TopologyService_AddLink_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"topology", "create"}, "")) pattern_TopologyService_GetTopology_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"topology"}, "")) - - pattern_TopologyService_UpdateLink_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"topology", "update"}, "")) - - pattern_TopologyService_DeleteLink_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"topology", "delete"}, "")) + pattern_TopologyService_UpdateLink_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"topology", "update"}, "")) + pattern_TopologyService_DeleteLink_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"topology", "delete"}, "")) ) var ( - forward_TopologyService_AddLink_0 = runtime.ForwardResponseMessage - + forward_TopologyService_AddLink_0 = runtime.ForwardResponseMessage forward_TopologyService_GetTopology_0 = runtime.ForwardResponseMessage - - forward_TopologyService_UpdateLink_0 = runtime.ForwardResponseMessage - - forward_TopologyService_DeleteLink_0 = runtime.ForwardResponseMessage + forward_TopologyService_UpdateLink_0 = runtime.ForwardResponseMessage + forward_TopologyService_DeleteLink_0 = runtime.ForwardResponseMessage ) diff --git a/api/go/gosdn/topology/topology_grpc.pb.go b/api/go/gosdn/topology/topology_grpc.pb.go old mode 100644 new mode 100755 diff --git a/api/go/gosdn/transport/transport.pb.go b/api/go/gosdn/transport/transport.pb.go old mode 100644 new mode 100755 index 24ebcfbe09b7eb100bad29430501e336bb707bb2..22768e44c662bd29f5bb747370864bb485389e5f --- a/api/go/gosdn/transport/transport.pb.go +++ b/api/go/gosdn/transport/transport.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.4 // protoc (unknown) // source: gosdn/transport/transport.proto @@ -14,6 +14,7 @@ import ( _ "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -24,20 +25,19 @@ const ( ) 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: + state protoimpl.MessageState `protogen:"open.v1"` + 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 valid to be assigned to TransportOption: // // *TransportOption_GnmiTransportOption // *TransportOption_RestconfTransportOption TransportOption isTransportOption_TransportOption `protobuf_oneof:"transport_option"` Type southbound.Type `protobuf:"varint,7,opt,name=type,proto3,enum=gosdn.southbound.Type" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TransportOption) Reset() { @@ -98,23 +98,27 @@ func (x *TransportOption) GetTls() bool { return false } -func (m *TransportOption) GetTransportOption() isTransportOption_TransportOption { - if m != nil { - return m.TransportOption +func (x *TransportOption) GetTransportOption() isTransportOption_TransportOption { + if x != nil { + return x.TransportOption } return nil } func (x *TransportOption) GetGnmiTransportOption() *GnmiTransportOption { - if x, ok := x.GetTransportOption().(*TransportOption_GnmiTransportOption); ok { - return x.GnmiTransportOption + if x != nil { + if x, ok := x.TransportOption.(*TransportOption_GnmiTransportOption); ok { + return x.GnmiTransportOption + } } return nil } func (x *TransportOption) GetRestconfTransportOption() *RestconfTransportOption { - if x, ok := x.GetTransportOption().(*TransportOption_RestconfTransportOption); ok { - return x.RestconfTransportOption + if x != nil { + if x, ok := x.TransportOption.(*TransportOption_RestconfTransportOption); ok { + return x.RestconfTransportOption + } } return nil } @@ -143,14 +147,13 @@ 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=grpc_dial_options,json=grpcDialOptions,proto3" json:"grpc_dial_options,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"` + state protoimpl.MessageState `protogen:"open.v1"` + Compression string `protobuf:"bytes,1,opt,name=compression,proto3" json:"compression,omitempty"` + GrpcDialOptions map[string]string `protobuf:"bytes,2,rep,name=grpc_dial_options,json=grpcDialOptions,proto3" json:"grpc_dial_options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + 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"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GnmiTransportOption) Reset() { @@ -212,9 +215,9 @@ func (x *GnmiTransportOption) GetEncoding() gnmi.Encoding { } type RestconfTransportOption struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RestconfTransportOption) Reset() { @@ -249,7 +252,7 @@ func (*RestconfTransportOption) Descriptor() ([]byte, []int) { var File_gosdn_transport_transport_proto protoreflect.FileDescriptor -var file_gosdn_transport_transport_proto_rawDesc = []byte{ +var file_gosdn_transport_transport_proto_rawDesc = string([]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, @@ -309,16 +312,16 @@ var file_gosdn_transport_transport_proto_rawDesc = []byte{ 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 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 + file_gosdn_transport_transport_proto_rawDescData []byte ) 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) + file_gosdn_transport_transport_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gosdn_transport_transport_proto_rawDesc), len(file_gosdn_transport_transport_proto_rawDesc))) }) return file_gosdn_transport_transport_proto_rawDescData } @@ -358,7 +361,7 @@ func file_gosdn_transport_transport_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_gosdn_transport_transport_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_gosdn_transport_transport_proto_rawDesc), len(file_gosdn_transport_transport_proto_rawDesc)), NumEnums: 0, NumMessages: 4, NumExtensions: 0, @@ -369,7 +372,6 @@ func file_gosdn_transport_transport_proto_init() { 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/api/openapiv2/gosdn_northbound.swagger.json b/api/openapiv2/gosdn_northbound.swagger.json old mode 100644 new mode 100755 index faefcc2b96bda7930228529cdd30906868d51621..a000de65c354fb96bb867d8c2867925b103d319a --- a/api/openapiv2/gosdn_northbound.swagger.json +++ b/api/openapiv2/gosdn_northbound.swagger.json @@ -709,6 +709,37 @@ ] } }, + "/plugins": { + "get": { + "operationId": "PluginInternalService_GetAvailablePlugins", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/gosdnplugin_registryGetResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "timestamp", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + } + ], + "tags": [ + "PluginInternalService" + ] + } + }, "/pnd/{pid}": { "get": { "summary": "Allows to request a specific Principal Network Domain.", diff --git a/api/proto/buf.lock b/api/proto/buf.lock old mode 100644 new mode 100755 diff --git a/api/proto/buf.yaml b/api/proto/buf.yaml old mode 100644 new mode 100755 diff --git a/api/proto/gosdn/app/app.proto b/api/proto/gosdn/app/app.proto old mode 100644 new mode 100755 diff --git a/api/proto/gosdn/configurationmanagement/configurationmanagement.proto b/api/proto/gosdn/configurationmanagement/configurationmanagement.proto old mode 100644 new mode 100755 diff --git a/api/proto/gosdn/conflict/conflict.proto b/api/proto/gosdn/conflict/conflict.proto old mode 100644 new mode 100755 diff --git a/api/proto/gosdn/csbi/csbi.proto b/api/proto/gosdn/csbi/csbi.proto old mode 100644 new mode 100755 diff --git a/api/proto/gosdn/networkelement/networkelement.proto b/api/proto/gosdn/networkelement/networkelement.proto old mode 100644 new mode 100755 index b2a14817b101e44e9f4ee0ea4e94dccd4a659d53..e893c00f264c1f673f4d47283ff0ea0b27c89ac6 --- a/api/proto/gosdn/networkelement/networkelement.proto +++ b/api/proto/gosdn/networkelement/networkelement.proto @@ -407,4 +407,4 @@ message SubscribePathRequest { message SubscribePathResponse { int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. repeated gnmi.Notification mne_notification = 2; -} +} \ No newline at end of file diff --git a/api/proto/gosdn/plugin-internal/plugin-internal.proto b/api/proto/gosdn/plugin-internal/plugin-internal.proto old mode 100644 new mode 100755 index 85b72157234827aaa58c56c2d979bc572bc051f4..70ad2e22fc69b93035e186520f7a04218bad6483 --- a/api/proto/gosdn/plugin-internal/plugin-internal.proto +++ b/api/proto/gosdn/plugin-internal/plugin-internal.proto @@ -4,21 +4,21 @@ package gosdn.plugin_internal; import "buf/validate/validate.proto"; import "gosdn/plugin-registry/plugin-registry.proto"; +import "google/api/annotations.proto"; + option go_package = "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/plugin-internal"; service PluginInternalService { rpc AvailablePlugins(GetAvailablePluginsRequest) returns (gosdn.plugin_registry.GetResponse); rpc GetPluginSchema(GetPluginSchemaRequest) returns (stream PluginSchemaPayload); + rpc GetAvailablePlugins(GetAvailablePluginsRequest) returns (gosdn.plugin_registry.GetResponse) { + option (google.api.http) = {get: "/plugins"}; } - -message GetAvailablePluginsRequest { - int64 timestamp = 1; } -message GetAvailablePluginsResponse { +message GetAvailablePluginsRequest { int64 timestamp = 1; - repeated gosdn.plugin_registry.Plugin plugins = 2; } message GetPluginSchemaRequest { @@ -29,3 +29,8 @@ message GetPluginSchemaRequest { message PluginSchemaPayload { bytes chunk = 1; } + +message GetAvailablePluginsResponse { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + repeated gosdn.plugin_registry.Plugin plugins = 2; +} \ No newline at end of file diff --git a/api/proto/gosdn/plugin-registry/plugin-registry.proto b/api/proto/gosdn/plugin-registry/plugin-registry.proto old mode 100644 new mode 100755 index ee4040c58be9f9972f8a58f7878bbe05fc867074..1210ab99c50858be92448026e0b17bc1c1c4d566 --- a/api/proto/gosdn/plugin-registry/plugin-registry.proto +++ b/api/proto/gosdn/plugin-registry/plugin-registry.proto @@ -4,6 +4,8 @@ package gosdn.plugin_registry; import "google/protobuf/timestamp.proto"; import "buf/validate/validate.proto"; +import "google/api/annotations.proto"; + option go_package = "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/plugin-registry"; @@ -64,3 +66,12 @@ message Manifest { string author = 3; string version = 4; } + +message GetAvailablePluginsResponse { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + repeated gosdn.plugin_registry.Plugin plugins = 2; +} + +message GetAvailablePluginsRequest { + int64 timestamp = 1; +} \ No newline at end of file diff --git a/api/proto/gosdn/plugin/plugin.proto b/api/proto/gosdn/plugin/plugin.proto old mode 100644 new mode 100755 index 80b6bec342f0e4702a212b70e99306174a582d8f..6d7ca844709641343758d05f2259f4b23bb268a1 --- a/api/proto/gosdn/plugin/plugin.proto +++ b/api/proto/gosdn/plugin/plugin.proto @@ -4,8 +4,11 @@ package gosdn.plugin; import "github.com/openconfig/gnmi/proto/gnmi/gnmi.proto"; import "buf/validate/validate.proto"; +import "google/api/annotations.proto"; + import "gosdn/networkelement/networkelement.proto"; +import "gosdn/plugin-registry/plugin-registry.proto"; option go_package = "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/plugin"; @@ -20,6 +23,7 @@ service Plugin { rpc SchemaTreeGzip(SchemaTreeGzipRequest) returns (stream Payload); rpc ValidateChange(ValidateChangeRequest) returns (ValidateChangeResponse); rpc PruneConfigFalse(PruneConfigFalseRequest) returns (PruneConfigFalseResponse); + rpc GetAvailablePlugins(GetAvailablePluginsRequest) returns (gosdn.plugin_registry.GetResponse); } message UnmarshalRequest { @@ -99,3 +103,7 @@ message SchemaTreeGzipRequest { message Payload { bytes chunk = 1; } + +message GetAvailablePluginsRequest { + int64 timestamp = 1; + } \ No newline at end of file diff --git a/api/proto/gosdn/pnd/pnd.proto b/api/proto/gosdn/pnd/pnd.proto old mode 100644 new mode 100755 diff --git a/api/proto/gosdn/rbac/rbac.proto b/api/proto/gosdn/rbac/rbac.proto old mode 100644 new mode 100755 diff --git a/api/proto/gosdn/rbac/role.proto b/api/proto/gosdn/rbac/role.proto old mode 100644 new mode 100755 diff --git a/api/proto/gosdn/rbac/user.proto b/api/proto/gosdn/rbac/user.proto old mode 100644 new mode 100755 diff --git a/api/proto/gosdn/southbound/southbound.proto b/api/proto/gosdn/southbound/southbound.proto old mode 100644 new mode 100755 diff --git a/api/proto/gosdn/subscriptionmanagement/subscriptionmanagement.proto b/api/proto/gosdn/subscriptionmanagement/subscriptionmanagement.proto old mode 100644 new mode 100755 diff --git a/api/proto/gosdn/topology/link.proto b/api/proto/gosdn/topology/link.proto old mode 100644 new mode 100755 diff --git a/api/proto/gosdn/topology/node.proto b/api/proto/gosdn/topology/node.proto old mode 100644 new mode 100755 diff --git a/api/proto/gosdn/topology/port.proto b/api/proto/gosdn/topology/port.proto old mode 100644 new mode 100755 diff --git a/api/proto/gosdn/topology/route.proto b/api/proto/gosdn/topology/route.proto old mode 100644 new mode 100755 diff --git a/api/proto/gosdn/topology/routingTable.proto b/api/proto/gosdn/topology/routingTable.proto old mode 100644 new mode 100755 diff --git a/api/proto/gosdn/topology/topology.proto b/api/proto/gosdn/topology/topology.proto old mode 100644 new mode 100755 diff --git a/api/proto/gosdn/transport/transport.proto b/api/proto/gosdn/transport/transport.proto old mode 100644 new mode 100755 diff --git a/api/third_party/validator/validator.proto b/api/third_party/validator/validator.proto old mode 100644 new mode 100755 diff --git a/application-framework/event/event.go b/application-framework/event/event.go old mode 100644 new mode 100755 diff --git a/application-framework/event/eventService.go b/application-framework/event/eventService.go old mode 100644 new mode 100755 diff --git a/application-framework/event/event_test.go b/application-framework/event/event_test.go old mode 100644 new mode 100755 diff --git a/application-framework/event/topics.go b/application-framework/event/topics.go old mode 100644 new mode 100755 diff --git a/application-framework/event/type.go b/application-framework/event/type.go old mode 100644 new mode 100755 diff --git a/application-framework/models/model-handling.go b/application-framework/models/model-handling.go old mode 100644 new mode 100755 diff --git a/application-framework/models/model-handling_test.go b/application-framework/models/model-handling_test.go old mode 100644 new mode 100755 diff --git a/application-framework/registration/registration.go b/application-framework/registration/registration.go old mode 100644 new mode 100755 diff --git a/applications/arista-routing-engine/app.go b/applications/arista-routing-engine/app.go old mode 100644 new mode 100755 diff --git a/applications/arista-routing-engine/arista-routing-engine.Dockerfile b/applications/arista-routing-engine/arista-routing-engine.Dockerfile old mode 100644 new mode 100755 diff --git a/applications/arista-routing-engine/arista-routing-engine.Dockerfile.dockerignore b/applications/arista-routing-engine/arista-routing-engine.Dockerfile.dockerignore old mode 100644 new mode 100755 diff --git a/applications/arista-routing-engine/main.go b/applications/arista-routing-engine/main.go old mode 100644 new mode 100755 diff --git a/applications/arista-routing-engine/network-element.go b/applications/arista-routing-engine/network-element.go old mode 100644 new mode 100755 diff --git a/applications/arista-routing-engine/routing.go b/applications/arista-routing-engine/routing.go old mode 100644 new mode 100755 diff --git a/applications/basic-interface-monitoring/app.go b/applications/basic-interface-monitoring/app.go old mode 100644 new mode 100755 diff --git a/applications/basic-interface-monitoring/http.go b/applications/basic-interface-monitoring/http.go old mode 100644 new mode 100755 diff --git a/applications/basic-interface-monitoring/main.go b/applications/basic-interface-monitoring/main.go old mode 100644 new mode 100755 diff --git a/applications/basic-interface-monitoring/network-element.go b/applications/basic-interface-monitoring/network-element.go old mode 100644 new mode 100755 diff --git a/applications/basic-interface-monitoring/webpage/index.html b/applications/basic-interface-monitoring/webpage/index.html old mode 100644 new mode 100755 diff --git a/applications/hostname-checker/app.go b/applications/hostname-checker/app.go old mode 100644 new mode 100755 diff --git a/applications/hostname-checker/device.go b/applications/hostname-checker/device.go old mode 100644 new mode 100755 diff --git a/applications/hostname-checker/main.go b/applications/hostname-checker/main.go old mode 100644 new mode 100755 diff --git a/applications/inventory-manager/README.md b/applications/inventory-manager/README.md old mode 100644 new mode 100755 diff --git a/applications/inventory-manager/config/config.go b/applications/inventory-manager/config/config.go old mode 100644 new mode 100755 diff --git a/applications/inventory-manager/example.yml b/applications/inventory-manager/example.yml old mode 100644 new mode 100755 diff --git a/applications/inventory-manager/inventory-manager.Dockerfile b/applications/inventory-manager/inventory-manager.Dockerfile old mode 100644 new mode 100755 diff --git a/applications/inventory-manager/inventory-manager.Dockerfile.dockerignore b/applications/inventory-manager/inventory-manager.Dockerfile.dockerignore old mode 100644 new mode 100755 diff --git a/applications/inventory-manager/inventoryManager/inventoryManager.go b/applications/inventory-manager/inventoryManager/inventoryManager.go old mode 100644 new mode 100755 diff --git a/applications/inventory-manager/inventoryManager/util.go b/applications/inventory-manager/inventoryManager/util.go old mode 100644 new mode 100755 diff --git a/applications/inventory-manager/main.go b/applications/inventory-manager/main.go old mode 100644 new mode 100755 diff --git a/applications/venv-manager/Readme.md b/applications/venv-manager/Readme.md old mode 100644 new mode 100755 diff --git a/applications/venv-manager/containerlab/containerlab.go b/applications/venv-manager/containerlab/containerlab.go old mode 100644 new mode 100755 diff --git a/applications/venv-manager/links/link.go b/applications/venv-manager/links/link.go old mode 100644 new mode 100755 diff --git a/applications/venv-manager/main.go b/applications/venv-manager/main.go old mode 100644 new mode 100755 diff --git a/applications/venv-manager/node/node.go b/applications/venv-manager/node/node.go old mode 100644 new mode 100755 diff --git a/applications/venv-manager/port/port.go b/applications/venv-manager/port/port.go old mode 100644 new mode 100755 diff --git a/applications/venv-manager/topology/topology.go b/applications/venv-manager/topology/topology.go old mode 100644 new mode 100755 diff --git a/applications/venv-manager/venv-manager.Dockerfile b/applications/venv-manager/venv-manager.Dockerfile old mode 100644 new mode 100755 diff --git a/applications/venv-manager/venv-manager.Dockerfile.dockerignore b/applications/venv-manager/venv-manager.Dockerfile.dockerignore old mode 100644 new mode 100755 diff --git a/applications/venv-manager/venv-manager/venv-manager.go b/applications/venv-manager/venv-manager/venv-manager.go old mode 100644 new mode 100755 diff --git a/applications/venv-manager/yang-parser/yang-parser.go b/applications/venv-manager/yang-parser/yang-parser.go old mode 100644 new mode 100755 diff --git a/applications/ws-events/app.go b/applications/ws-events/app.go old mode 100644 new mode 100755 diff --git a/applications/ws-events/main.go b/applications/ws-events/main.go old mode 100644 new mode 100755 diff --git a/applications/ws-events/ws-events.Dockerfile b/applications/ws-events/ws-events.Dockerfile old mode 100644 new mode 100755 diff --git a/applications/ws-events/ws-events.Dockerfile.dockerignore b/applications/ws-events/ws-events.Dockerfile.dockerignore old mode 100644 new mode 100755 diff --git a/applications/ws-events/ws.go b/applications/ws-events/ws.go old mode 100644 new mode 100755 diff --git a/cli/LICENSE b/cli/LICENSE old mode 100644 new mode 100755 diff --git a/cli/README.md b/cli/README.md old mode 100644 new mode 100755 diff --git a/cli/adapter/PndAdapter.go b/cli/adapter/PndAdapter.go old mode 100644 new mode 100755 diff --git a/cli/adapter/PndAdapter_test.go b/cli/adapter/PndAdapter_test.go old mode 100644 new mode 100755 diff --git a/cli/build/ci/.security-and-compliance-ci.yml b/cli/build/ci/.security-and-compliance-ci.yml old mode 100644 new mode 100755 diff --git a/cli/build/ci/.test.yml b/cli/build/ci/.test.yml old mode 100644 new mode 100755 diff --git a/cli/cli.Dockerfile b/cli/cli.Dockerfile old mode 100644 new mode 100755 diff --git a/cli/cli.Dockerfile.dockerignore b/cli/cli.Dockerfile.dockerignore old mode 100644 new mode 100755 diff --git a/cli/cmd/change.go b/cli/cmd/change.go old mode 100644 new mode 100755 diff --git a/cli/cmd/changeCommit.go b/cli/cmd/changeCommit.go old mode 100644 new mode 100755 diff --git a/cli/cmd/changeConfirm.go b/cli/cmd/changeConfirm.go old mode 100644 new mode 100755 diff --git a/cli/cmd/changeGet.go b/cli/cmd/changeGet.go old mode 100644 new mode 100755 diff --git a/cli/cmd/changeList.go b/cli/cmd/changeList.go old mode 100644 new mode 100755 diff --git a/cli/cmd/config/.gosdnc.toml b/cli/cmd/config/.gosdnc.toml old mode 100644 new mode 100755 diff --git a/cli/cmd/list.go b/cli/cmd/list.go old mode 100644 new mode 100755 diff --git a/cli/cmd/login.go b/cli/cmd/login.go old mode 100644 new mode 100755 diff --git a/cli/cmd/logout.go b/cli/cmd/logout.go old mode 100644 new mode 100755 diff --git a/cli/cmd/networkElement.go b/cli/cmd/networkElement.go old mode 100644 new mode 100755 diff --git a/cli/cmd/networkElementCreate.go b/cli/cmd/networkElementCreate.go old mode 100644 new mode 100755 diff --git a/cli/cmd/networkElementList.go b/cli/cmd/networkElementList.go old mode 100644 new mode 100755 diff --git a/cli/cmd/networkElementPath.go b/cli/cmd/networkElementPath.go old mode 100644 new mode 100755 diff --git a/cli/cmd/networkElementPathDelete.go b/cli/cmd/networkElementPathDelete.go old mode 100644 new mode 100755 diff --git a/cli/cmd/networkElementPathGet.go b/cli/cmd/networkElementPathGet.go old mode 100644 new mode 100755 diff --git a/cli/cmd/networkElementPathGetIntended.go b/cli/cmd/networkElementPathGetIntended.go old mode 100644 new mode 100755 diff --git a/cli/cmd/networkElementPathSet.go b/cli/cmd/networkElementPathSet.go old mode 100644 new mode 100755 diff --git a/cli/cmd/networkElementRemove.go b/cli/cmd/networkElementRemove.go old mode 100644 new mode 100755 diff --git a/cli/cmd/networkElementShow.go b/cli/cmd/networkElementShow.go old mode 100644 new mode 100755 diff --git a/cli/cmd/networkElementSubscribe.go b/cli/cmd/networkElementSubscribe.go old mode 100644 new mode 100755 diff --git a/cli/cmd/plugin.go b/cli/cmd/plugin.go old mode 100644 new mode 100755 diff --git a/cli/cmd/pluginList.go b/cli/cmd/pluginList.go old mode 100644 new mode 100755 diff --git a/cli/cmd/pnd.go b/cli/cmd/pnd.go old mode 100644 new mode 100755 diff --git a/cli/cmd/pndCreate.go b/cli/cmd/pndCreate.go old mode 100644 new mode 100755 diff --git a/cli/cmd/pndGet.go b/cli/cmd/pndGet.go old mode 100644 new mode 100755 diff --git a/cli/cmd/pndList.go b/cli/cmd/pndList.go old mode 100644 new mode 100755 diff --git a/cli/cmd/pndRemove.go b/cli/cmd/pndRemove.go old mode 100644 new mode 100755 diff --git a/cli/cmd/pndUse.go b/cli/cmd/pndUse.go old mode 100644 new mode 100755 diff --git a/cli/cmd/prompt.go b/cli/cmd/prompt.go old mode 100644 new mode 100755 diff --git a/cli/cmd/role.go b/cli/cmd/role.go old mode 100644 new mode 100755 diff --git a/cli/cmd/roleCreate.go b/cli/cmd/roleCreate.go old mode 100644 new mode 100755 diff --git a/cli/cmd/roleGetAll.go b/cli/cmd/roleGetAll.go old mode 100644 new mode 100755 diff --git a/cli/cmd/root.go b/cli/cmd/root.go old mode 100644 new mode 100755 diff --git a/cli/cmd/subManagement.go b/cli/cmd/subManagement.go old mode 100644 new mode 100755 diff --git a/cli/cmd/subManagementGetAll.go b/cli/cmd/subManagementGetAll.go old mode 100644 new mode 100755 diff --git a/cli/cmd/subManagementResetAll.go b/cli/cmd/subManagementResetAll.go old mode 100644 new mode 100755 diff --git a/cli/cmd/user.go b/cli/cmd/user.go old mode 100644 new mode 100755 diff --git a/cli/cmd/userCreate.go b/cli/cmd/userCreate.go old mode 100644 new mode 100755 diff --git a/cli/cmd/userDelete.go b/cli/cmd/userDelete.go old mode 100644 new mode 100755 diff --git a/cli/cmd/userGet.go b/cli/cmd/userGet.go old mode 100644 new mode 100755 diff --git a/cli/cmd/userGetAll.go b/cli/cmd/userGetAll.go old mode 100644 new mode 100755 diff --git a/cli/cmd/userUpdate.go b/cli/cmd/userUpdate.go old mode 100644 new mode 100755 diff --git a/cli/cmd/utils.go b/cli/cmd/utils.go old mode 100644 new mode 100755 diff --git a/cli/cmd/utils_test.go b/cli/cmd/utils_test.go old mode 100644 new mode 100755 diff --git a/cli/completer/utils.go b/cli/completer/utils.go old mode 100644 new mode 100755 diff --git a/cli/completer/yangSchemaCompleter.go b/cli/completer/yangSchemaCompleter.go old mode 100644 new mode 100755 diff --git a/cli/config/.cobra.yaml b/cli/config/.cobra.yaml old mode 100644 new mode 100755 diff --git a/cli/config/gosdnc.toml.example b/cli/config/gosdnc.toml.example old mode 100644 new mode 100755 diff --git a/cli/main.go b/cli/main.go old mode 100644 new mode 100755 diff --git a/cli/test/containerlab/integrationtest.clab.tmpl.yml b/cli/test/containerlab/integrationtest.clab.tmpl.yml old mode 100644 new mode 100755 diff --git a/cli/test/containerlab/integrationtest_branch.clab.tmpl.yml b/cli/test/containerlab/integrationtest_branch.clab.tmpl.yml old mode 100644 new mode 100755 diff --git a/config.js b/config.js old mode 100644 new mode 100755 diff --git a/controller/ARCHITECTURE.md b/controller/ARCHITECTURE.md old mode 100644 new mode 100755 diff --git a/controller/CONTRIBUTING.md b/controller/CONTRIBUTING.md old mode 100644 new mode 100755 diff --git a/controller/Dockerfile.debug b/controller/Dockerfile.debug old mode 100644 new mode 100755 diff --git a/controller/Makefile b/controller/Makefile old mode 100644 new mode 100755 diff --git a/controller/README.md b/controller/README.md old mode 100644 new mode 100755 diff --git a/controller/api/apiUtil_test.go b/controller/api/apiUtil_test.go old mode 100644 new mode 100755 diff --git a/controller/api/api_test.go b/controller/api/api_test.go old mode 100644 new mode 100755 diff --git a/controller/api/api_test.toml b/controller/api/api_test.toml old mode 100644 new mode 100755 diff --git a/controller/api/app.go b/controller/api/app.go old mode 100644 new mode 100755 diff --git a/controller/api/auth.go b/controller/api/auth.go old mode 100644 new mode 100755 diff --git a/controller/api/auth_test.go b/controller/api/auth_test.go old mode 100644 new mode 100755 diff --git a/controller/api/change.go b/controller/api/change.go old mode 100644 new mode 100755 diff --git a/controller/api/configurationManagement.go b/controller/api/configurationManagement.go old mode 100644 new mode 100755 diff --git a/controller/api/grpc.go b/controller/api/grpc.go old mode 100644 new mode 100755 diff --git a/controller/api/initialise_test.go b/controller/api/initialise_test.go old mode 100644 new mode 100755 diff --git a/controller/api/managedNetworkElement.go b/controller/api/managedNetworkElement.go old mode 100644 new mode 100755 diff --git a/controller/api/plugin.go b/controller/api/plugin.go old mode 100644 new mode 100755 diff --git a/controller/api/pnd.go b/controller/api/pnd.go old mode 100644 new mode 100755 diff --git a/controller/api/role.go b/controller/api/role.go old mode 100644 new mode 100755 diff --git a/controller/api/role_test.go b/controller/api/role_test.go old mode 100644 new mode 100755 diff --git a/controller/api/subManagement.go b/controller/api/subManagement.go old mode 100644 new mode 100755 diff --git a/controller/api/user.go b/controller/api/user.go old mode 100644 new mode 100755 diff --git a/controller/api/user_test.go b/controller/api/user_test.go old mode 100644 new mode 100755 diff --git a/controller/app/DatabaseStore.go b/controller/app/DatabaseStore.go old mode 100644 new mode 100755 diff --git a/controller/app/Service.go b/controller/app/Service.go old mode 100644 new mode 100755 diff --git a/controller/app/app.go b/controller/app/app.go old mode 100644 new mode 100755 diff --git a/controller/app/store.go b/controller/app/store.go old mode 100644 new mode 100755 diff --git a/controller/app/utils.go b/controller/app/utils.go old mode 100644 new mode 100755 diff --git a/controller/cmd/gosdn/main.go b/controller/cmd/gosdn/main.go old mode 100644 new mode 100755 diff --git a/controller/cmd/root.go b/controller/cmd/root.go old mode 100644 new mode 100755 diff --git a/controller/cmd/version.go b/controller/cmd/version.go old mode 100644 new mode 100755 diff --git a/controller/config/config.go b/controller/config/config.go old mode 100644 new mode 100755 diff --git a/controller/config/config_test.go b/controller/config/config_test.go old mode 100644 new mode 100755 diff --git a/controller/config/environment.go b/controller/config/environment.go old mode 100644 new mode 100755 diff --git a/controller/config/gnmiSubscriptionConfig.go b/controller/config/gnmiSubscriptionConfig.go old mode 100644 new mode 100755 diff --git a/controller/configs/.gitkeep b/controller/configs/.gitkeep old mode 100644 new mode 100755 diff --git a/controller/configs/basic-docker-compose.toml b/controller/configs/basic-docker-compose.toml old mode 100644 new mode 100755 diff --git a/controller/configs/containerlab-gosdn.toml.example b/controller/configs/containerlab-gosdn.toml.example old mode 100644 new mode 100755 diff --git a/controller/configs/development-gosdn.toml.example b/controller/configs/development-gosdn.toml.example old mode 100644 new mode 100755 diff --git a/controller/configs/gNMISubscriptions.txt.example b/controller/configs/gNMISubscriptions.txt.example old mode 100644 new mode 100755 diff --git a/controller/configs/integration-test-gosdn.toml b/controller/configs/integration-test-gosdn.toml old mode 100644 new mode 100755 diff --git a/controller/conflict/versioning.go b/controller/conflict/versioning.go old mode 100644 new mode 100755 diff --git a/controller/controller.Dockerfile b/controller/controller.Dockerfile old mode 100644 new mode 100755 diff --git a/controller/controller.Dockerfile.dockerignore b/controller/controller.Dockerfile.dockerignore old mode 100644 new mode 100755 diff --git a/controller/controller.go b/controller/controller.go old mode 100644 new mode 100755 index 32adf35867c562c55a819f9ecb6d9b37123613e8..3b339bd5204cbe9fffefbd571619d0dd4ac19820 --- a/controller/controller.go +++ b/controller/controller.go @@ -349,6 +349,7 @@ func ensureAdminRoleExists() error { "/gosdn.networkelement.NetworkElementService/ParseYang", "/gosdn.plugin_internal.PluginInternalService/AvailablePlugins", "/gosdn.plugin_internal.PluginInternalService/GetPluginSchema", + "/gosdn.plugin_internal.PluginInternalService/GetAvailablePlugins", "/gosdn.app.AppService/Register", "/gosdn.app.AppService/Deregister", "/gosdn.configurationmanagement.ConfigurationManagementService/ExportSDNConfig", diff --git a/controller/controller_test.go b/controller/controller_test.go old mode 100644 new mode 100755 diff --git a/controller/customerrs/errors.go b/controller/customerrs/errors.go old mode 100644 new mode 100755 diff --git a/controller/event/event.go b/controller/event/event.go old mode 100644 new mode 100755 diff --git a/controller/event/event_test.go b/controller/event/event_test.go old mode 100644 new mode 100755 diff --git a/controller/eventService/Service.go b/controller/eventService/Service.go old mode 100644 new mode 100755 diff --git a/controller/eventService/utils.go b/controller/eventService/utils.go old mode 100644 new mode 100755 diff --git a/controller/http.go b/controller/http.go old mode 100644 new mode 100755 index 394b7a0b06099a59cc2947a83e0e29fa0be7c1f6..684b8f83f39ccb0deb201799e5ac555c377b9380 --- a/controller/http.go +++ b/controller/http.go @@ -16,6 +16,7 @@ import ( "google.golang.org/grpc/status" mnegw "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/networkelement" + plg "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/plugin-internal" pgw "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/pnd" agw "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/rbac" tgw "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/topology" @@ -85,6 +86,11 @@ func setupHttpServer() error { return err } + err = plg.RegisterPluginInternalServiceHandlerFromEndpoint(ctx, mux, *grpcServerEndpoint, opts) + if err != nil { + return err + } + // Set the HTTP server of core to the new server c.httpServer = &http.Server{Addr: ":8080", Handler: mux, diff --git a/controller/http_test.go b/controller/http_test.go old mode 100644 new mode 100755 diff --git a/controller/initialise_test.go b/controller/initialise_test.go old mode 100644 new mode 100755 diff --git a/controller/interfaces/change/change.go b/controller/interfaces/change/change.go old mode 100644 new mode 100755 diff --git a/controller/interfaces/event/service.go b/controller/interfaces/event/service.go old mode 100644 new mode 100755 diff --git a/controller/interfaces/networkdomain/pnd.go b/controller/interfaces/networkdomain/pnd.go old mode 100644 new mode 100755 diff --git a/controller/interfaces/networkdomain/pndService.go b/controller/interfaces/networkdomain/pndService.go old mode 100644 new mode 100755 diff --git a/controller/interfaces/networkdomain/pndStore.go b/controller/interfaces/networkdomain/pndStore.go old mode 100644 new mode 100755 diff --git a/controller/interfaces/networkelement/networkElement.go b/controller/interfaces/networkelement/networkElement.go old mode 100644 new mode 100755 diff --git a/controller/interfaces/networkelement/networkElementService.go b/controller/interfaces/networkelement/networkElementService.go old mode 100644 new mode 100755 diff --git a/controller/interfaces/networkelement/networkElementStore.go b/controller/interfaces/networkelement/networkElementStore.go old mode 100644 new mode 100755 diff --git a/controller/interfaces/plugin/plugin.go b/controller/interfaces/plugin/plugin.go old mode 100644 new mode 100755 diff --git a/controller/interfaces/plugin/pluginService.go b/controller/interfaces/plugin/pluginService.go old mode 100644 new mode 100755 diff --git a/controller/interfaces/plugin/pluginStore.go b/controller/interfaces/plugin/pluginStore.go old mode 100644 new mode 100755 diff --git a/controller/interfaces/rbac/rbacService.go b/controller/interfaces/rbac/rbacService.go old mode 100644 new mode 100755 diff --git a/controller/interfaces/rbac/role.go b/controller/interfaces/rbac/role.go old mode 100644 new mode 100755 diff --git a/controller/interfaces/rbac/roleStore.go b/controller/interfaces/rbac/roleStore.go old mode 100644 new mode 100755 diff --git a/controller/interfaces/rbac/user.go b/controller/interfaces/rbac/user.go old mode 100644 new mode 100755 diff --git a/controller/interfaces/rbac/userStore.go b/controller/interfaces/rbac/userStore.go old mode 100644 new mode 100755 diff --git a/controller/interfaces/store/store.go b/controller/interfaces/store/store.go old mode 100644 new mode 100755 diff --git a/controller/interfaces/transport/transport.go b/controller/interfaces/transport/transport.go old mode 100644 new mode 100755 diff --git a/controller/metrics/prometheus.go b/controller/metrics/prometheus.go old mode 100644 new mode 100755 diff --git a/controller/mocks/Change.go b/controller/mocks/Change.go old mode 100644 new mode 100755 diff --git a/controller/mocks/Csbi.go b/controller/mocks/Csbi.go old mode 100644 new mode 100755 diff --git a/controller/mocks/Device.go b/controller/mocks/Device.go old mode 100644 new mode 100755 diff --git a/controller/mocks/GNMIClient.go b/controller/mocks/GNMIClient.go old mode 100644 new mode 100755 diff --git a/controller/mocks/GNMIServer.go b/controller/mocks/GNMIServer.go old mode 100644 new mode 100755 diff --git a/controller/mocks/GNMI_SubscribeClient.go b/controller/mocks/GNMI_SubscribeClient.go old mode 100644 new mode 100755 diff --git a/controller/mocks/GNMI_SubscribeServer.go b/controller/mocks/GNMI_SubscribeServer.go old mode 100644 new mode 100755 diff --git a/controller/mocks/GenericGoStructClient.go b/controller/mocks/GenericGoStructClient.go old mode 100644 new mode 100755 diff --git a/controller/mocks/HandleSubscribeResponse.go b/controller/mocks/HandleSubscribeResponse.go old mode 100644 new mode 100755 diff --git a/controller/mocks/NetworkDomain.go b/controller/mocks/NetworkDomain.go old mode 100644 new mode 100755 diff --git a/controller/mocks/NetworkElement.go b/controller/mocks/NetworkElement.go old mode 100644 new mode 100755 diff --git a/controller/mocks/Plugin.go b/controller/mocks/Plugin.go old mode 100644 new mode 100755 diff --git a/controller/mocks/PluginRegistryServiceClient.go b/controller/mocks/PluginRegistryServiceClient.go old mode 100644 new mode 100755 diff --git a/controller/mocks/Plugin_additions.go b/controller/mocks/Plugin_additions.go old mode 100644 new mode 100755 diff --git a/controller/mocks/PndService.go b/controller/mocks/PndService.go old mode 100644 new mode 100755 diff --git a/controller/mocks/PndStore.go b/controller/mocks/PndStore.go old mode 100644 new mode 100755 diff --git a/controller/mocks/Pnd_Additions.go b/controller/mocks/Pnd_Additions.go old mode 100644 new mode 100755 diff --git a/controller/mocks/Role.go b/controller/mocks/Role.go old mode 100644 new mode 100755 diff --git a/controller/mocks/RoleService.go b/controller/mocks/RoleService.go old mode 100644 new mode 100755 diff --git a/controller/mocks/RoleStore.go b/controller/mocks/RoleStore.go old mode 100644 new mode 100755 diff --git a/controller/mocks/Service.go b/controller/mocks/Service.go old mode 100644 new mode 100755 diff --git a/controller/mocks/Storable.go b/controller/mocks/Storable.go old mode 100644 new mode 100755 diff --git a/controller/mocks/Store.go b/controller/mocks/Store.go old mode 100644 new mode 100755 diff --git a/controller/mocks/Transport.go b/controller/mocks/Transport.go old mode 100644 new mode 100755 diff --git a/controller/mocks/UnsafeGNMIServer.go b/controller/mocks/UnsafeGNMIServer.go old mode 100644 new mode 100755 diff --git a/controller/mocks/User.go b/controller/mocks/User.go old mode 100644 new mode 100755 diff --git a/controller/mocks/UserService.go b/controller/mocks/UserService.go old mode 100644 new mode 100755 diff --git a/controller/mocks/UserStore.go b/controller/mocks/UserStore.go old mode 100644 new mode 100755 diff --git a/controller/mocks/isSubscribeRequest_Request.go b/controller/mocks/isSubscribeRequest_Request.go old mode 100644 new mode 100755 diff --git a/controller/mocks/isSubscribeResponse_Response.go b/controller/mocks/isSubscribeResponse_Response.go old mode 100644 new mode 100755 diff --git a/controller/mocks/isTypedValue_Value.go b/controller/mocks/isTypedValue_Value.go old mode 100644 new mode 100755 diff --git a/controller/northbound/client/app.go b/controller/northbound/client/app.go old mode 100644 new mode 100755 diff --git a/controller/northbound/client/configurationManagement.go b/controller/northbound/client/configurationManagement.go old mode 100644 new mode 100755 diff --git a/controller/northbound/client/networkElement.go b/controller/northbound/client/networkElement.go old mode 100644 new mode 100755 diff --git a/controller/northbound/client/plugin.go b/controller/northbound/client/plugin.go old mode 100644 new mode 100755 diff --git a/controller/northbound/client/pnd.go b/controller/northbound/client/pnd.go old mode 100644 new mode 100755 diff --git a/controller/northbound/client/rbac.go b/controller/northbound/client/rbac.go old mode 100644 new mode 100755 diff --git a/controller/northbound/client/sbi.go b/controller/northbound/client/sbi.go old mode 100644 new mode 100755 diff --git a/controller/northbound/client/submanagement.go b/controller/northbound/client/submanagement.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/app.go b/controller/northbound/server/app.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/auth.go b/controller/northbound/server/auth.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/auth_interceptor.go b/controller/northbound/server/auth_interceptor.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/auth_interceptor_test.go b/controller/northbound/server/auth_interceptor_test.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/auth_test.go b/controller/northbound/server/auth_test.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/configurationmanagement.go b/controller/northbound/server/configurationmanagement.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/csbi.go b/controller/northbound/server/csbi.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/metrics.go b/controller/northbound/server/metrics.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/nbi.go b/controller/northbound/server/nbi.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/networkElement.go b/controller/northbound/server/networkElement.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/networkElement_test.go b/controller/northbound/server/networkElement_test.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/plugin.go b/controller/northbound/server/plugin.go old mode 100644 new mode 100755 index 3338520da281bf8817f39f7134ac4c6c141b6368..25f4b3cff9a262d3420ad5766b8da8c5b9cf025e --- a/controller/northbound/server/plugin.go +++ b/controller/northbound/server/plugin.go @@ -55,6 +55,21 @@ func (pis *PluginInternalServer) AvailablePlugins(ctx context.Context, request * return pis.pluginRegistryClient.GetAll(ctx, getAllRequest) } +func (pis *PluginInternalServer) GetAvailablePlugins(ctx context.Context, request *pipb.GetAvailablePluginsRequest) (*rpb.GetResponse, error) { + ctx, cancel := context.WithTimeout(ctx, time.Minute*1) + defer cancel() + + if err := pis.protoValidator.Validate(request); err != nil { + return nil, status.Errorf(codes.Aborted, "%v", err) + } + + getAllRequest := &rpb.GetAllRequest{ + Timestamp: time.Now().UnixNano(), + } + + return pis.pluginRegistryClient.GetAll(ctx, getAllRequest) +} + func (pis *PluginInternalServer) GetPluginSchema(request *pipb.GetPluginSchemaRequest, stream pipb.PluginInternalService_GetPluginSchemaServer) error { labels := prometheus.Labels{"service": "plugin", "rpc": "get plugin schema"} start := metrics.StartHook(labels, grpcRequestsTotal) diff --git a/controller/northbound/server/pnd.go b/controller/northbound/server/pnd.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/pnd_test.go b/controller/northbound/server/pnd_test.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/role.go b/controller/northbound/server/role.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/role_test.go b/controller/northbound/server/role_test.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/route.go b/controller/northbound/server/route.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/submanagement.go b/controller/northbound/server/submanagement.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/test_util_test.go b/controller/northbound/server/test_util_test.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/topology.go b/controller/northbound/server/topology.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/topology_test.go b/controller/northbound/server/topology_test.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/user.go b/controller/northbound/server/user.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/user_test.go b/controller/northbound/server/user_test.go old mode 100644 new mode 100755 diff --git a/controller/northbound/server/utils_test.go b/controller/northbound/server/utils_test.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/change.go b/controller/nucleus/change.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/change_test.go b/controller/nucleus/change_test.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/clientConfig.go b/controller/nucleus/clientConfig.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/database/mongo-connection.go b/controller/nucleus/database/mongo-connection.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/databaseNetworkElementStore.go b/controller/nucleus/databaseNetworkElementStore.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/databasePluginStore.go b/controller/nucleus/databasePluginStore.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/databasePndStore.go b/controller/nucleus/databasePndStore.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/genericService.go b/controller/nucleus/genericService.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/gnmi_transport.go b/controller/nucleus/gnmi_transport.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/gnmi_transport_test.go b/controller/nucleus/gnmi_transport_test.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/initialise_test.go b/controller/nucleus/initialise_test.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/memoryNetworkElementStore.go b/controller/nucleus/memoryNetworkElementStore.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/memoryPluginStore.go b/controller/nucleus/memoryPluginStore.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/memoryPndStore.go b/controller/nucleus/memoryPndStore.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/networkElement.go b/controller/nucleus/networkElement.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/networkElementFilesystemStore.go b/controller/nucleus/networkElementFilesystemStore.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/networkElementFilesystemStore_test.go b/controller/nucleus/networkElementFilesystemStore_test.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/networkElementService.go b/controller/nucleus/networkElementService.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/networkElementServiceMock.go b/controller/nucleus/networkElementServiceMock.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/networkElementService_test.go b/controller/nucleus/networkElementService_test.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/networkElementStore.go b/controller/nucleus/networkElementStore.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/networkElementWatcher.go b/controller/nucleus/networkElementWatcher.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/networkElement_test.go b/controller/nucleus/networkElement_test.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/plugin.go b/controller/nucleus/plugin.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/pluginFilesystemStore.go b/controller/nucleus/pluginFilesystemStore.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/pluginFilesystemStore_test.go b/controller/nucleus/pluginFilesystemStore_test.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/pluginService.go b/controller/nucleus/pluginService.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/pluginServiceMock.go b/controller/nucleus/pluginServiceMock.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/pluginStore.go b/controller/nucleus/pluginStore.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/plugin_test.go b/controller/nucleus/plugin_test.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/pndFilesystemStore.go b/controller/nucleus/pndFilesystemStore.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/pndFilesystemStore_test.go b/controller/nucleus/pndFilesystemStore_test.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/pndService.go b/controller/nucleus/pndService.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/pndStore.go b/controller/nucleus/pndStore.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/principalNetworkDomain.go b/controller/nucleus/principalNetworkDomain.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/principalNetworkDomain_test.go b/controller/nucleus/principalNetworkDomain_test.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/restconf_transport.go b/controller/nucleus/restconf_transport.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/restconf_transport_test.go b/controller/nucleus/restconf_transport_test.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/subscriptionQueueHandler.go b/controller/nucleus/subscriptionQueueHandler.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/transport.go b/controller/nucleus/transport.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/transport_test.go b/controller/nucleus/transport_test.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/types/types.go b/controller/nucleus/types/types.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/util/gnmi/convert.go b/controller/nucleus/util/gnmi/convert.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/util/gnmi/notification.go b/controller/nucleus/util/gnmi/notification.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/util/path/translate.go b/controller/nucleus/util/path/translate.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/util/path/traverse.go b/controller/nucleus/util/path/traverse.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/util/path/traverse_test.go b/controller/nucleus/util/path/traverse_test.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/util/plugin.go b/controller/nucleus/util/plugin.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/util/proto/message.go b/controller/nucleus/util/proto/message.go old mode 100644 new mode 100755 diff --git a/controller/nucleus/util/proto/message_test.go b/controller/nucleus/util/proto/message_test.go old mode 100644 new mode 100755 diff --git a/controller/plugin/shared/client.go b/controller/plugin/shared/client.go old mode 100644 new mode 100755 diff --git a/controller/plugin/shared/interface.go b/controller/plugin/shared/interface.go old mode 100644 new mode 100755 diff --git a/controller/plugin/shared/server.go b/controller/plugin/shared/server.go old mode 100644 new mode 100755 diff --git a/controller/plugin/shared/util.go b/controller/plugin/shared/util.go old mode 100644 new mode 100755 diff --git a/controller/rbac/databaseRoleStore.go b/controller/rbac/databaseRoleStore.go old mode 100644 new mode 100755 diff --git a/controller/rbac/databaseUserStore.go b/controller/rbac/databaseUserStore.go old mode 100644 new mode 100755 diff --git a/controller/rbac/jwtManager.go b/controller/rbac/jwtManager.go old mode 100644 new mode 100755 diff --git a/controller/rbac/jwtManager_test.go b/controller/rbac/jwtManager_test.go old mode 100644 new mode 100755 diff --git a/controller/rbac/memoryRoleStore.go b/controller/rbac/memoryRoleStore.go old mode 100644 new mode 100755 diff --git a/controller/rbac/memoryUserStore.go b/controller/rbac/memoryUserStore.go old mode 100644 new mode 100755 diff --git a/controller/rbac/rbacService.go b/controller/rbac/rbacService.go old mode 100644 new mode 100755 diff --git a/controller/rbac/rbacTestUtil_test.go b/controller/rbac/rbacTestUtil_test.go old mode 100644 new mode 100755 diff --git a/controller/rbac/role.go b/controller/rbac/role.go old mode 100644 new mode 100755 diff --git a/controller/rbac/roleFileSystemStore.go b/controller/rbac/roleFileSystemStore.go old mode 100644 new mode 100755 diff --git a/controller/rbac/roleFileSystemStore_test.go b/controller/rbac/roleFileSystemStore_test.go old mode 100644 new mode 100755 diff --git a/controller/rbac/roleStore.go b/controller/rbac/roleStore.go old mode 100644 new mode 100755 diff --git a/controller/rbac/user.go b/controller/rbac/user.go old mode 100644 new mode 100755 diff --git a/controller/rbac/userFileSystemStore.go b/controller/rbac/userFileSystemStore.go old mode 100644 new mode 100755 diff --git a/controller/rbac/userFileSystemStore_test.go b/controller/rbac/userFileSystemStore_test.go old mode 100644 new mode 100755 diff --git a/controller/rbac/userStore.go b/controller/rbac/userStore.go old mode 100644 new mode 100755 diff --git a/controller/store/changeStores.go b/controller/store/changeStores.go old mode 100644 new mode 100755 diff --git a/controller/store/filesystem-settings.go b/controller/store/filesystem-settings.go old mode 100644 new mode 100755 diff --git a/controller/store/genericStore.go b/controller/store/genericStore.go old mode 100644 new mode 100755 diff --git a/controller/store/initialise_test.go b/controller/store/initialise_test.go old mode 100644 new mode 100755 diff --git a/controller/store/oldGenericStore.go b/controller/store/oldGenericStore.go old mode 100644 new mode 100755 diff --git a/controller/store/query.go b/controller/store/query.go old mode 100644 new mode 100755 diff --git a/controller/store/storageMode.go b/controller/store/storageMode.go old mode 100644 new mode 100755 diff --git a/controller/store/utils.go b/controller/store/utils.go old mode 100644 new mode 100755 diff --git a/controller/test/arista-interface-response.json b/controller/test/arista-interface-response.json old mode 100644 new mode 100755 diff --git a/controller/test/arista-interface-response2.json b/controller/test/arista-interface-response2.json old mode 100644 new mode 100755 diff --git a/controller/test/arista-root-response.json b/controller/test/arista-root-response.json old mode 100644 new mode 100755 diff --git a/controller/test/containerlab/complex-1.0.clab.tmpl.yml b/controller/test/containerlab/complex-1.0.clab.tmpl.yml old mode 100644 new mode 100755 diff --git a/controller/test/containerlab/complex-1.0.png b/controller/test/containerlab/complex-1.0.png old mode 100644 new mode 100755 diff --git a/controller/test/containerlab/dev.clab.tmpl.yml b/controller/test/containerlab/dev.clab.tmpl.yml old mode 100644 new mode 100755 diff --git a/controller/test/containerlab/int01.clab.tmpl.yml b/controller/test/containerlab/int01.clab.tmpl.yml old mode 100644 new mode 100755 diff --git a/controller/test/plugin/csbiAdditions.go b/controller/test/plugin/csbiAdditions.go old mode 100644 new mode 100755 diff --git a/controller/test/plugin/faulty/csbiAdditions.go b/controller/test/plugin/faulty/csbiAdditions.go old mode 100644 new mode 100755 diff --git a/controller/test/plugin/faulty/gostructs.go b/controller/test/plugin/faulty/gostructs.go old mode 100644 new mode 100755 diff --git a/controller/test/plugin/faulty/plugin.yml b/controller/test/plugin/faulty/plugin.yml old mode 100644 new mode 100755 diff --git a/controller/test/plugin/gostructs.go b/controller/test/plugin/gostructs.go old mode 100644 new mode 100755 diff --git a/controller/test/plugin/plugin.yml b/controller/test/plugin/plugin.yml old mode 100644 new mode 100755 diff --git a/controller/test/proto/cap-resp-arista-ceos b/controller/test/proto/cap-resp-arista-ceos old mode 100644 new mode 100755 diff --git a/controller/test/proto/req-full-node b/controller/test/proto/req-full-node old mode 100644 new mode 100755 diff --git a/controller/test/proto/req-full-node-arista-ceos b/controller/test/proto/req-full-node-arista-ceos old mode 100644 new mode 100755 diff --git a/controller/test/proto/req-interfaces-arista-ceos b/controller/test/proto/req-interfaces-arista-ceos old mode 100644 new mode 100755 diff --git a/controller/test/proto/req-interfaces-interface-arista-ceos b/controller/test/proto/req-interfaces-interface-arista-ceos old mode 100644 new mode 100755 diff --git a/controller/test/proto/req-interfaces-wildcard b/controller/test/proto/req-interfaces-wildcard old mode 100644 new mode 100755 diff --git a/controller/test/proto/resp-full-node b/controller/test/proto/resp-full-node old mode 100644 new mode 100755 diff --git a/controller/test/proto/resp-full-node-arista-ceos b/controller/test/proto/resp-full-node-arista-ceos old mode 100644 new mode 100755 diff --git a/controller/test/proto/resp-interfaces-arista-ceos b/controller/test/proto/resp-interfaces-arista-ceos old mode 100644 new mode 100755 diff --git a/controller/test/proto/resp-interfaces-interface-arista-ceos b/controller/test/proto/resp-interfaces-interface-arista-ceos old mode 100644 new mode 100755 diff --git a/controller/test/proto/resp-interfaces-wildcard b/controller/test/proto/resp-interfaces-wildcard old mode 100644 new mode 100755 diff --git a/controller/test/proto/resp-set-system-config-hostname b/controller/test/proto/resp-set-system-config-hostname old mode 100644 new mode 100755 diff --git a/controller/test/targets.go b/controller/test/targets.go old mode 100644 new mode 100755 diff --git a/controller/test/terraform/.docker/ca.pem b/controller/test/terraform/.docker/ca.pem old mode 100644 new mode 100755 diff --git a/controller/test/terraform/.docker/cert.pem b/controller/test/terraform/.docker/cert.pem old mode 100644 new mode 100755 diff --git a/controller/test/terraform/.docker/server-cert.pem b/controller/test/terraform/.docker/server-cert.pem old mode 100644 new mode 100755 diff --git a/controller/test/terraform/containers.tf b/controller/test/terraform/containers.tf old mode 100644 new mode 100755 diff --git a/controller/test/terraform/images.tf b/controller/test/terraform/images.tf old mode 100644 new mode 100755 diff --git a/controller/test/terraform/main.tf b/controller/test/terraform/main.tf old mode 100644 new mode 100755 diff --git a/controller/test/terraform/providers.tf b/controller/test/terraform/providers.tf old mode 100644 new mode 100755 diff --git a/controller/test/terraform/resources.tf b/controller/test/terraform/resources.tf old mode 100644 new mode 100755 diff --git a/controller/test/terraform/variables.tf b/controller/test/terraform/variables.tf old mode 100644 new mode 100755 diff --git a/controller/test/yang/test-module.go b/controller/test/yang/test-module.go old mode 100644 new mode 100755 diff --git a/controller/test/yang/test.yang b/controller/test/yang/test.yang old mode 100644 new mode 100755 diff --git a/controller/test/yang/yang.go b/controller/test/yang/yang.go old mode 100644 new mode 100755 diff --git a/controller/topology/links/link.go b/controller/topology/links/link.go old mode 100644 new mode 100755 diff --git a/controller/topology/nodes/databaseNodeStore.go b/controller/topology/nodes/databaseNodeStore.go old mode 100644 new mode 100755 diff --git a/controller/topology/nodes/node.go b/controller/topology/nodes/node.go old mode 100644 new mode 100755 diff --git a/controller/topology/nodes/nodeService.go b/controller/topology/nodes/nodeService.go old mode 100644 new mode 100755 diff --git a/controller/topology/nodes/nodeService_test.go b/controller/topology/nodes/nodeService_test.go old mode 100644 new mode 100755 diff --git a/controller/topology/nodes/store.go b/controller/topology/nodes/store.go old mode 100644 new mode 100755 diff --git a/controller/topology/ports/configuration/configuration.go b/controller/topology/ports/configuration/configuration.go old mode 100644 new mode 100755 diff --git a/controller/topology/ports/port.go b/controller/topology/ports/port.go old mode 100644 new mode 100755 diff --git a/controller/topology/ports/portService.go b/controller/topology/ports/portService.go old mode 100644 new mode 100755 diff --git a/controller/topology/ports/portService_test.go b/controller/topology/ports/portService_test.go old mode 100644 new mode 100755 diff --git a/controller/topology/ports/portStore.go b/controller/topology/ports/portStore.go old mode 100644 new mode 100755 diff --git a/controller/topology/ports/store.go b/controller/topology/ports/store.go old mode 100644 new mode 100755 diff --git a/controller/topology/routing-tables/route.go b/controller/topology/routing-tables/route.go old mode 100644 new mode 100755 diff --git a/controller/topology/routing-tables/routingTable.go b/controller/topology/routing-tables/routingTable.go old mode 100644 new mode 100755 diff --git a/controller/topology/routing-tables/routingTableService.go b/controller/topology/routing-tables/routingTableService.go old mode 100644 new mode 100755 diff --git a/controller/topology/routing-tables/routingTableService_test.go b/controller/topology/routing-tables/routingTableService_test.go old mode 100644 new mode 100755 diff --git a/controller/topology/routing-tables/routingTableStore.go b/controller/topology/routing-tables/routingTableStore.go old mode 100644 new mode 100755 diff --git a/controller/topology/routing-tables/store.go b/controller/topology/routing-tables/store.go old mode 100644 new mode 100755 diff --git a/controller/topology/store.go b/controller/topology/store.go old mode 100644 new mode 100755 diff --git a/controller/topology/store/genericStore.go b/controller/topology/store/genericStore.go old mode 100644 new mode 100755 diff --git a/controller/topology/store/genericStore_test.go b/controller/topology/store/genericStore_test.go old mode 100644 new mode 100755 diff --git a/controller/topology/store/query.go b/controller/topology/store/query.go old mode 100644 new mode 100755 diff --git a/controller/topology/topology.go b/controller/topology/topology.go old mode 100644 new mode 100755 diff --git a/controller/topology/topologyService.go b/controller/topology/topologyService.go old mode 100644 new mode 100755 diff --git a/controller/topology/topologyService_test.go b/controller/topology/topologyService_test.go old mode 100644 new mode 100755 diff --git a/controller/topology/topologyStore.go b/controller/topology/topologyStore.go old mode 100644 new mode 100755 diff --git a/controller/version/version.go b/controller/version/version.go old mode 100644 new mode 100755 diff --git a/controller/version/version_test.go b/controller/version/version_test.go old mode 100644 new mode 100755 diff --git a/csbi/.csbi.yaml b/csbi/.csbi.yaml old mode 100644 new mode 100755 diff --git a/csbi/Dockerfile.exec b/csbi/Dockerfile.exec old mode 100644 new mode 100755 diff --git a/csbi/LICENSE b/csbi/LICENSE old mode 100644 new mode 100755 diff --git a/csbi/README.md b/csbi/README.md old mode 100644 new mode 100755 diff --git a/csbi/arista.capabilities b/csbi/arista.capabilities old mode 100644 new mode 100755 diff --git a/csbi/build.go b/csbi/build.go old mode 100644 new mode 100755 diff --git a/csbi/build/ci/.build-container.yml b/csbi/build/ci/.build-container.yml old mode 100644 new mode 100755 diff --git a/csbi/build/ci/.code-quality-ci.yml b/csbi/build/ci/.code-quality-ci.yml old mode 100644 new mode 100755 diff --git a/csbi/build/ci/.golangci-config/.golangci.yml b/csbi/build/ci/.golangci-config/.golangci.yml old mode 100644 new mode 100755 diff --git a/csbi/build/ci/.security-and-compliance-ci.yml b/csbi/build/ci/.security-and-compliance-ci.yml old mode 100644 new mode 100755 diff --git a/csbi/build/ci/.test.yml b/csbi/build/ci/.test.yml old mode 100644 new mode 100755 diff --git a/csbi/build_test.go b/csbi/build_test.go old mode 100644 new mode 100755 diff --git a/csbi/cmd/csbi/main.go b/csbi/cmd/csbi/main.go old mode 100644 new mode 100755 diff --git a/csbi/cmd/debug/main.go b/csbi/cmd/debug/main.go old mode 100644 new mode 100755 diff --git a/csbi/cmd/demo/main.go b/csbi/cmd/demo/main.go old mode 100644 new mode 100755 diff --git a/csbi/cmd/deploy.go b/csbi/cmd/deploy.go old mode 100644 new mode 100755 diff --git a/csbi/cmd/discover.go b/csbi/cmd/discover.go old mode 100644 new mode 100755 diff --git a/csbi/cmd/executor/executor.go b/csbi/cmd/executor/executor.go old mode 100644 new mode 100755 diff --git a/csbi/cmd/executor/experiment.yaml b/csbi/cmd/executor/experiment.yaml old mode 100644 new mode 100755 diff --git a/csbi/cmd/generate.go b/csbi/cmd/generate.go old mode 100644 new mode 100755 diff --git a/csbi/cmd/hello.go b/csbi/cmd/hello.go old mode 100644 new mode 100755 diff --git a/csbi/cmd/init.go b/csbi/cmd/init.go old mode 100644 new mode 100755 diff --git a/csbi/cmd/repository.go b/csbi/cmd/repository.go old mode 100644 new mode 100755 diff --git a/csbi/cmd/root.go b/csbi/cmd/root.go old mode 100644 new mode 100755 diff --git a/csbi/config/config.go b/csbi/config/config.go old mode 100644 new mode 100755 diff --git a/csbi/csbi.Dockerfile b/csbi/csbi.Dockerfile old mode 100644 new mode 100755 diff --git a/csbi/csbi.Dockerfile.dockerignore b/csbi/csbi.Dockerfile.dockerignore old mode 100644 new mode 100755 diff --git a/csbi/deployment.go b/csbi/deployment.go old mode 100644 new mode 100755 diff --git a/csbi/deployment_test.go b/csbi/deployment_test.go old mode 100644 new mode 100755 diff --git a/csbi/discover.go b/csbi/discover.go old mode 100644 new mode 100755 diff --git a/csbi/discover_test.go b/csbi/discover_test.go old mode 100644 new mode 100755 diff --git a/csbi/docker-compose.yml b/csbi/docker-compose.yml old mode 100644 new mode 100755 diff --git a/csbi/generate.go b/csbi/generate.go old mode 100644 new mode 100755 diff --git a/csbi/generate_test.go b/csbi/generate_test.go old mode 100644 new mode 100755 diff --git a/csbi/gnmi-target/gnmitarget.Dockerfile b/csbi/gnmi-target/gnmitarget.Dockerfile old mode 100644 new mode 100755 diff --git a/csbi/gnmi-target/gnmitarget.Dockerfile.dockerignore b/csbi/gnmi-target/gnmitarget.Dockerfile.dockerignore old mode 100644 new mode 100755 diff --git a/csbi/grafana/provisioning/datasources/prometheus_ds.yml b/csbi/grafana/provisioning/datasources/prometheus_ds.yml old mode 100644 new mode 100755 diff --git a/csbi/grpc.go b/csbi/grpc.go old mode 100644 new mode 100755 diff --git a/csbi/grpc_test.go b/csbi/grpc_test.go old mode 100644 new mode 100755 diff --git a/csbi/http.go b/csbi/http.go old mode 100644 new mode 100755 diff --git a/csbi/http_test.go b/csbi/http_test.go old mode 100644 new mode 100755 diff --git a/csbi/metrics.go b/csbi/metrics.go old mode 100644 new mode 100755 diff --git a/csbi/model.go b/csbi/model.go old mode 100644 new mode 100755 diff --git a/csbi/orchestrator.go b/csbi/orchestrator.go old mode 100644 new mode 100755 diff --git a/csbi/orchestrator_test.go b/csbi/orchestrator_test.go old mode 100644 new mode 100755 diff --git a/csbi/prometheus/alerts.yml b/csbi/prometheus/alerts.yml old mode 100644 new mode 100755 diff --git a/csbi/prometheus/prometheus.yml b/csbi/prometheus/prometheus.yml old mode 100644 new mode 100755 diff --git a/csbi/report.xml b/csbi/report.xml old mode 100644 new mode 100755 diff --git a/csbi/repository.go b/csbi/repository.go old mode 100644 new mode 100755 diff --git a/csbi/repository_test.go b/csbi/repository_test.go old mode 100644 new mode 100755 diff --git a/csbi/resources/Dockerfile b/csbi/resources/Dockerfile old mode 100644 new mode 100755 diff --git a/csbi/resources/config.yaml b/csbi/resources/config.yaml old mode 100644 new mode 100755 diff --git a/csbi/resources/csbi.go b/csbi/resources/csbi.go old mode 100644 new mode 100755 diff --git a/csbi/resources/csbiAdditions.go b/csbi/resources/csbiAdditions.go old mode 100644 new mode 100755 diff --git a/csbi/resources/go.mod b/csbi/resources/go.mod old mode 100644 new mode 100755 diff --git a/csbi/resources/go.sum b/csbi/resources/go.sum old mode 100644 new mode 100755 diff --git a/csbi/resources/gostructs.go b/csbi/resources/gostructs.go old mode 100644 new mode 100755 diff --git a/csbi/run.go b/csbi/run.go old mode 100644 new mode 100755 diff --git a/csbi/run_test.go b/csbi/run_test.go old mode 100644 new mode 100755 diff --git a/csbi/templates.go b/csbi/templates.go old mode 100644 new mode 100755 diff --git a/csbi/test.clab.yml b/csbi/test.clab.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/00000000-0000-0000-0000-000000000000/gostructs.go b/csbi/testdata/00000000-0000-0000-0000-000000000000/gostructs.go old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/experimental/eos/models/arista-cli.yang b/csbi/testdata/models/experimental/eos/models/arista-cli.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/experimental/eos/models/arista-eos-types.yang b/csbi/testdata/models/experimental/eos/models/arista-eos-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/experimental/eos/models/arista-exp-eos.yang b/csbi/testdata/models/experimental/eos/models/arista-exp-eos.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/experimental/eos/models/cert/arista-gnoi-cert.yang b/csbi/testdata/models/experimental/eos/models/cert/arista-gnoi-cert.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/experimental/eos/models/evpn/arista-exp-eos-evpn.yang b/csbi/testdata/models/experimental/eos/models/evpn/arista-exp-eos-evpn.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/experimental/eos/models/igmpsnooping/arista-exp-eos-igmpsnooping.yang b/csbi/testdata/models/experimental/eos/models/igmpsnooping/arista-exp-eos-igmpsnooping.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/experimental/eos/models/l2protocolforwarding/arista-exp-eos-l2protocolforwarding.yang b/csbi/testdata/models/experimental/eos/models/l2protocolforwarding/arista-exp-eos-l2protocolforwarding.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/experimental/eos/models/mlag/arista-exp-eos-mlag.yang b/csbi/testdata/models/experimental/eos/models/mlag/arista-exp-eos-mlag.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/experimental/eos/models/multicast/arista-exp-eos-multicast.yang b/csbi/testdata/models/experimental/eos/models/multicast/arista-exp-eos-multicast.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/experimental/eos/models/openconfig-component-counters.yang b/csbi/testdata/models/experimental/eos/models/openconfig-component-counters.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/experimental/eos/models/qos/arista-exp-eos-qos-acl-config.yang b/csbi/testdata/models/experimental/eos/models/qos/arista-exp-eos-qos-acl-config.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/experimental/eos/models/qos/arista-exp-eos-qos-config.yang b/csbi/testdata/models/experimental/eos/models/qos/arista-exp-eos-qos-config.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/experimental/eos/models/qos/arista-exp-eos-qos.yang b/csbi/testdata/models/experimental/eos/models/qos/arista-exp-eos-qos.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/experimental/eos/models/rpc/arista-rpc-netconf.yang b/csbi/testdata/models/experimental/eos/models/rpc/arista-rpc-netconf.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/experimental/eos/models/varp/arista-exp-eos-varp-intf.yang b/csbi/testdata/models/experimental/eos/models/varp/arista-exp-eos-varp-intf.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/experimental/eos/models/varp/arista-exp-eos-varp-net-inst.yang b/csbi/testdata/models/experimental/eos/models/varp/arista-exp-eos-varp-net-inst.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/experimental/eos/models/vlan/vlan-translation.yang b/csbi/testdata/models/experimental/eos/models/vlan/vlan-translation.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/experimental/eos/models/vxlan/arista-exp-eos-vxlan-config.yang b/csbi/testdata/models/experimental/eos/models/vxlan/arista-exp-eos-vxlan-config.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/experimental/eos/models/vxlan/arista-exp-eos-vxlan.yang b/csbi/testdata/models/experimental/eos/models/vxlan/arista-exp-eos-vxlan.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/hercules/LICENSE b/csbi/testdata/models/openconfig/hercules/LICENSE old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/hercules/yang/openconfig-hercules-interfaces.yang b/csbi/testdata/models/openconfig/hercules/yang/openconfig-hercules-interfaces.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/hercules/yang/openconfig-hercules-platform-chassis.yang b/csbi/testdata/models/openconfig/hercules/yang/openconfig-hercules-platform-chassis.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/hercules/yang/openconfig-hercules-platform-linecard.yang b/csbi/testdata/models/openconfig/hercules/yang/openconfig-hercules-platform-linecard.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/hercules/yang/openconfig-hercules-platform-node.yang b/csbi/testdata/models/openconfig/hercules/yang/openconfig-hercules-platform-node.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/hercules/yang/openconfig-hercules-platform-port.yang b/csbi/testdata/models/openconfig/hercules/yang/openconfig-hercules-platform-port.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/hercules/yang/openconfig-hercules-platform.yang b/csbi/testdata/models/openconfig/hercules/yang/openconfig-hercules-platform.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/hercules/yang/openconfig-hercules-qos.yang b/csbi/testdata/models/openconfig/hercules/yang/openconfig-hercules-qos.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/hercules/yang/openconfig-hercules.yang b/csbi/testdata/models/openconfig/hercules/yang/openconfig-hercules.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/LICENSE b/csbi/testdata/models/openconfig/public/LICENSE old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/README.md b/csbi/testdata/models/openconfig/public/release/README.md old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/acl/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/acl/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/acl/openconfig-acl.yang b/csbi/testdata/models/openconfig/public/release/models/acl/openconfig-acl.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/acl/openconfig-packet-match-types.yang b/csbi/testdata/models/openconfig/public/release/models/acl/openconfig-packet-match-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/acl/openconfig-packet-match.yang b/csbi/testdata/models/openconfig/public/release/models/acl/openconfig-packet-match.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/aft/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/aft/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/aft/openconfig-aft-common.yang b/csbi/testdata/models/openconfig/public/release/models/aft/openconfig-aft-common.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/aft/openconfig-aft-ethernet.yang b/csbi/testdata/models/openconfig/public/release/models/aft/openconfig-aft-ethernet.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/aft/openconfig-aft-ipv4.yang b/csbi/testdata/models/openconfig/public/release/models/aft/openconfig-aft-ipv4.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/aft/openconfig-aft-ipv6.yang b/csbi/testdata/models/openconfig/public/release/models/aft/openconfig-aft-ipv6.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/aft/openconfig-aft-mpls.yang b/csbi/testdata/models/openconfig/public/release/models/aft/openconfig-aft-mpls.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/aft/openconfig-aft-network-instance.yang b/csbi/testdata/models/openconfig/public/release/models/aft/openconfig-aft-network-instance.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/aft/openconfig-aft-pf.yang b/csbi/testdata/models/openconfig/public/release/models/aft/openconfig-aft-pf.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/aft/openconfig-aft-types.yang b/csbi/testdata/models/openconfig/public/release/models/aft/openconfig-aft-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/aft/openconfig-aft.yang b/csbi/testdata/models/openconfig/public/release/models/aft/openconfig-aft.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/bfd/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/bfd/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/bfd/openconfig-bfd.yang b/csbi/testdata/models/openconfig/public/release/models/bfd/openconfig-bfd.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/bgp/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/bgp/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/bgp/openconfig-bgp-common-multiprotocol.yang b/csbi/testdata/models/openconfig/public/release/models/bgp/openconfig-bgp-common-multiprotocol.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/bgp/openconfig-bgp-common-structure.yang b/csbi/testdata/models/openconfig/public/release/models/bgp/openconfig-bgp-common-structure.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/bgp/openconfig-bgp-common.yang b/csbi/testdata/models/openconfig/public/release/models/bgp/openconfig-bgp-common.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/bgp/openconfig-bgp-errors.yang b/csbi/testdata/models/openconfig/public/release/models/bgp/openconfig-bgp-errors.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/bgp/openconfig-bgp-global.yang b/csbi/testdata/models/openconfig/public/release/models/bgp/openconfig-bgp-global.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/bgp/openconfig-bgp-neighbor.yang b/csbi/testdata/models/openconfig/public/release/models/bgp/openconfig-bgp-neighbor.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/bgp/openconfig-bgp-peer-group.yang b/csbi/testdata/models/openconfig/public/release/models/bgp/openconfig-bgp-peer-group.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/bgp/openconfig-bgp-policy.yang b/csbi/testdata/models/openconfig/public/release/models/bgp/openconfig-bgp-policy.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/bgp/openconfig-bgp-types.yang b/csbi/testdata/models/openconfig/public/release/models/bgp/openconfig-bgp-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/bgp/openconfig-bgp.yang b/csbi/testdata/models/openconfig/public/release/models/bgp/openconfig-bgp.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/catalog/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/catalog/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/catalog/openconfig-catalog-types.yang b/csbi/testdata/models/openconfig/public/release/models/catalog/openconfig-catalog-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/catalog/openconfig-module-catalog.yang b/csbi/testdata/models/openconfig/public/release/models/catalog/openconfig-module-catalog.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/firewall/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/firewall/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/firewall/openconfig-fw-high-availability.yang b/csbi/testdata/models/openconfig/public/release/models/firewall/openconfig-fw-high-availability.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/firewall/openconfig-fw-link-monitoring.yang b/csbi/testdata/models/openconfig/public/release/models/firewall/openconfig-fw-link-monitoring.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/interfaces/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/interfaces/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-if-8021x.yang b/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-if-8021x.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-if-aggregate.yang b/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-if-aggregate.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-if-ethernet-ext.yang b/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-if-ethernet-ext.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-if-ethernet.yang b/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-if-ethernet.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-if-ip-ext.yang b/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-if-ip-ext.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-if-ip.yang b/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-if-ip.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-if-poe.yang b/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-if-poe.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-if-sdn-ext.yang b/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-if-sdn-ext.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-if-tunnel.yang b/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-if-tunnel.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-if-types.yang b/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-if-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-interfaces.yang b/csbi/testdata/models/openconfig/public/release/models/interfaces/openconfig-interfaces.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/isis/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/isis/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/isis/openconfig-isis-lsdb-types.yang b/csbi/testdata/models/openconfig/public/release/models/isis/openconfig-isis-lsdb-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/isis/openconfig-isis-lsp.yang b/csbi/testdata/models/openconfig/public/release/models/isis/openconfig-isis-lsp.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/isis/openconfig-isis-policy.yang b/csbi/testdata/models/openconfig/public/release/models/isis/openconfig-isis-policy.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/isis/openconfig-isis-routing.yang b/csbi/testdata/models/openconfig/public/release/models/isis/openconfig-isis-routing.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/isis/openconfig-isis-types.yang b/csbi/testdata/models/openconfig/public/release/models/isis/openconfig-isis-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/isis/openconfig-isis.yang b/csbi/testdata/models/openconfig/public/release/models/isis/openconfig-isis.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/lacp/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/lacp/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/lacp/openconfig-lacp.yang b/csbi/testdata/models/openconfig/public/release/models/lacp/openconfig-lacp.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/lldp/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/lldp/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/lldp/openconfig-lldp-types.yang b/csbi/testdata/models/openconfig/public/release/models/lldp/openconfig-lldp-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/lldp/openconfig-lldp.yang b/csbi/testdata/models/openconfig/public/release/models/lldp/openconfig-lldp.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/local-routing/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/local-routing/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/local-routing/openconfig-local-routing.yang b/csbi/testdata/models/openconfig/public/release/models/local-routing/openconfig-local-routing.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/macsec/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/macsec/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/macsec/openconfig-macsec-types.yang b/csbi/testdata/models/openconfig/public/release/models/macsec/openconfig-macsec-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/macsec/openconfig-macsec.yang b/csbi/testdata/models/openconfig/public/release/models/macsec/openconfig-macsec.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/mpls/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/mpls/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/mpls/openconfig-mpls-igp.yang b/csbi/testdata/models/openconfig/public/release/models/mpls/openconfig-mpls-igp.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/mpls/openconfig-mpls-ldp.yang b/csbi/testdata/models/openconfig/public/release/models/mpls/openconfig-mpls-ldp.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/mpls/openconfig-mpls-rsvp.yang b/csbi/testdata/models/openconfig/public/release/models/mpls/openconfig-mpls-rsvp.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/mpls/openconfig-mpls-sr.yang b/csbi/testdata/models/openconfig/public/release/models/mpls/openconfig-mpls-sr.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/mpls/openconfig-mpls-static.yang b/csbi/testdata/models/openconfig/public/release/models/mpls/openconfig-mpls-static.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/mpls/openconfig-mpls-te.yang b/csbi/testdata/models/openconfig/public/release/models/mpls/openconfig-mpls-te.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/mpls/openconfig-mpls-types.yang b/csbi/testdata/models/openconfig/public/release/models/mpls/openconfig-mpls-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/mpls/openconfig-mpls.yang b/csbi/testdata/models/openconfig/public/release/models/mpls/openconfig-mpls.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/multicast/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/multicast/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/multicast/openconfig-igmp-types.yang b/csbi/testdata/models/openconfig/public/release/models/multicast/openconfig-igmp-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/multicast/openconfig-igmp.yang b/csbi/testdata/models/openconfig/public/release/models/multicast/openconfig-igmp.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/multicast/openconfig-pim-types.yang b/csbi/testdata/models/openconfig/public/release/models/multicast/openconfig-pim-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/multicast/openconfig-pim.yang b/csbi/testdata/models/openconfig/public/release/models/multicast/openconfig-pim.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/network-instance/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/network-instance/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/network-instance/openconfig-network-instance-l2.yang b/csbi/testdata/models/openconfig/public/release/models/network-instance/openconfig-network-instance-l2.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/network-instance/openconfig-network-instance-l3.yang b/csbi/testdata/models/openconfig/public/release/models/network-instance/openconfig-network-instance-l3.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/network-instance/openconfig-network-instance-policy.yang b/csbi/testdata/models/openconfig/public/release/models/network-instance/openconfig-network-instance-policy.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/network-instance/openconfig-network-instance-types.yang b/csbi/testdata/models/openconfig/public/release/models/network-instance/openconfig-network-instance-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/network-instance/openconfig-network-instance.yang b/csbi/testdata/models/openconfig/public/release/models/network-instance/openconfig-network-instance.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/openconfig-extensions.yang b/csbi/testdata/models/openconfig/public/release/models/openconfig-extensions.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/openflow/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/openflow/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/openflow/openconfig-openflow-types.yang b/csbi/testdata/models/openconfig/public/release/models/openflow/openconfig-openflow-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/openflow/openconfig-openflow.yang b/csbi/testdata/models/openconfig/public/release/models/openflow/openconfig-openflow.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/optical-transport/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/optical-transport/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/optical-transport/openconfig-channel-monitor.yang b/csbi/testdata/models/openconfig/public/release/models/optical-transport/openconfig-channel-monitor.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/optical-transport/openconfig-optical-amplifier.yang b/csbi/testdata/models/openconfig/public/release/models/optical-transport/openconfig-optical-amplifier.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/optical-transport/openconfig-optical-attenuator.yang b/csbi/testdata/models/openconfig/public/release/models/optical-transport/openconfig-optical-attenuator.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/optical-transport/openconfig-terminal-device.yang b/csbi/testdata/models/openconfig/public/release/models/optical-transport/openconfig-terminal-device.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/optical-transport/openconfig-transport-line-common.yang b/csbi/testdata/models/openconfig/public/release/models/optical-transport/openconfig-transport-line-common.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/optical-transport/openconfig-transport-line-connectivity.yang b/csbi/testdata/models/openconfig/public/release/models/optical-transport/openconfig-transport-line-connectivity.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/optical-transport/openconfig-transport-line-protection.yang b/csbi/testdata/models/openconfig/public/release/models/optical-transport/openconfig-transport-line-protection.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/optical-transport/openconfig-transport-types.yang b/csbi/testdata/models/openconfig/public/release/models/optical-transport/openconfig-transport-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/optical-transport/openconfig-wavelength-router.yang b/csbi/testdata/models/openconfig/public/release/models/optical-transport/openconfig-wavelength-router.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/ospf/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/ospf/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/ospf/openconfig-ospf-policy.yang b/csbi/testdata/models/openconfig/public/release/models/ospf/openconfig-ospf-policy.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/ospf/openconfig-ospf-types.yang b/csbi/testdata/models/openconfig/public/release/models/ospf/openconfig-ospf-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/ospf/openconfig-ospfv2-area-interface.yang b/csbi/testdata/models/openconfig/public/release/models/ospf/openconfig-ospfv2-area-interface.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/ospf/openconfig-ospfv2-area.yang b/csbi/testdata/models/openconfig/public/release/models/ospf/openconfig-ospfv2-area.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/ospf/openconfig-ospfv2-common.yang b/csbi/testdata/models/openconfig/public/release/models/ospf/openconfig-ospfv2-common.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/ospf/openconfig-ospfv2-global.yang b/csbi/testdata/models/openconfig/public/release/models/ospf/openconfig-ospfv2-global.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/ospf/openconfig-ospfv2-lsdb.yang b/csbi/testdata/models/openconfig/public/release/models/ospf/openconfig-ospfv2-lsdb.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/ospf/openconfig-ospfv2.yang b/csbi/testdata/models/openconfig/public/release/models/ospf/openconfig-ospfv2.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/p4rt/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/p4rt/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/p4rt/openconfig-p4rt.yang b/csbi/testdata/models/openconfig/public/release/models/p4rt/openconfig-p4rt.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/platform/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/platform/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform-cpu.yang b/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform-cpu.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform-ext.yang b/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform-ext.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform-fan.yang b/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform-fan.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform-linecard.yang b/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform-linecard.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform-pipeline-counters.yang b/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform-pipeline-counters.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform-port.yang b/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform-port.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform-psu.yang b/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform-psu.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform-software.yang b/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform-software.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform-transceiver.yang b/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform-transceiver.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform-types.yang b/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform.yang b/csbi/testdata/models/openconfig/public/release/models/platform/openconfig-platform.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/policy-forwarding/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/policy-forwarding/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/policy-forwarding/openconfig-pf-forwarding-policies.yang b/csbi/testdata/models/openconfig/public/release/models/policy-forwarding/openconfig-pf-forwarding-policies.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/policy-forwarding/openconfig-pf-interfaces.yang b/csbi/testdata/models/openconfig/public/release/models/policy-forwarding/openconfig-pf-interfaces.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/policy-forwarding/openconfig-pf-path-groups.yang b/csbi/testdata/models/openconfig/public/release/models/policy-forwarding/openconfig-pf-path-groups.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/policy-forwarding/openconfig-pf-srte.yang b/csbi/testdata/models/openconfig/public/release/models/policy-forwarding/openconfig-pf-srte.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/policy-forwarding/openconfig-policy-forwarding.yang b/csbi/testdata/models/openconfig/public/release/models/policy-forwarding/openconfig-policy-forwarding.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/policy/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/policy/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/policy/openconfig-policy-types.yang b/csbi/testdata/models/openconfig/public/release/models/policy/openconfig-policy-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/policy/openconfig-routing-policy.yang b/csbi/testdata/models/openconfig/public/release/models/policy/openconfig-routing-policy.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/probes/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/probes/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/probes/openconfig-probes-types.yang b/csbi/testdata/models/openconfig/public/release/models/probes/openconfig-probes-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/probes/openconfig-probes.yang b/csbi/testdata/models/openconfig/public/release/models/probes/openconfig-probes.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/qos/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/qos/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/qos/openconfig-qos-elements.yang b/csbi/testdata/models/openconfig/public/release/models/qos/openconfig-qos-elements.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/qos/openconfig-qos-interfaces.yang b/csbi/testdata/models/openconfig/public/release/models/qos/openconfig-qos-interfaces.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/qos/openconfig-qos-types.yang b/csbi/testdata/models/openconfig/public/release/models/qos/openconfig-qos-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/qos/openconfig-qos.yang b/csbi/testdata/models/openconfig/public/release/models/qos/openconfig-qos.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/relay-agent/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/relay-agent/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/relay-agent/openconfig-relay-agent.yang b/csbi/testdata/models/openconfig/public/release/models/relay-agent/openconfig-relay-agent.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/rib/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/rib/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/rib/openconfig-rib-bgp-attributes.yang b/csbi/testdata/models/openconfig/public/release/models/rib/openconfig-rib-bgp-attributes.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/rib/openconfig-rib-bgp-ext.yang b/csbi/testdata/models/openconfig/public/release/models/rib/openconfig-rib-bgp-ext.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/rib/openconfig-rib-bgp-shared-attributes.yang b/csbi/testdata/models/openconfig/public/release/models/rib/openconfig-rib-bgp-shared-attributes.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/rib/openconfig-rib-bgp-table-attributes.yang b/csbi/testdata/models/openconfig/public/release/models/rib/openconfig-rib-bgp-table-attributes.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/rib/openconfig-rib-bgp-tables.yang b/csbi/testdata/models/openconfig/public/release/models/rib/openconfig-rib-bgp-tables.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/rib/openconfig-rib-bgp-types.yang b/csbi/testdata/models/openconfig/public/release/models/rib/openconfig-rib-bgp-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/rib/openconfig-rib-bgp.yang b/csbi/testdata/models/openconfig/public/release/models/rib/openconfig-rib-bgp.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/sampling/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/sampling/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/sampling/openconfig-sampling-sflow.yang b/csbi/testdata/models/openconfig/public/release/models/sampling/openconfig-sampling-sflow.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/segment-routing/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/segment-routing/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/segment-routing/openconfig-rsvp-sr-ext.yang b/csbi/testdata/models/openconfig/public/release/models/segment-routing/openconfig-rsvp-sr-ext.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/segment-routing/openconfig-segment-routing-types.yang b/csbi/testdata/models/openconfig/public/release/models/segment-routing/openconfig-segment-routing-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/segment-routing/openconfig-segment-routing.yang b/csbi/testdata/models/openconfig/public/release/models/segment-routing/openconfig-segment-routing.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/segment-routing/openconfig-srte-policy.yang b/csbi/testdata/models/openconfig/public/release/models/segment-routing/openconfig-srte-policy.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/stp/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/stp/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/stp/openconfig-spanning-tree-types.yang b/csbi/testdata/models/openconfig/public/release/models/stp/openconfig-spanning-tree-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/stp/openconfig-spanning-tree.yang b/csbi/testdata/models/openconfig/public/release/models/stp/openconfig-spanning-tree.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/system/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/system/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/system/openconfig-aaa-radius.yang b/csbi/testdata/models/openconfig/public/release/models/system/openconfig-aaa-radius.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/system/openconfig-aaa-tacacs.yang b/csbi/testdata/models/openconfig/public/release/models/system/openconfig-aaa-tacacs.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/system/openconfig-aaa-types.yang b/csbi/testdata/models/openconfig/public/release/models/system/openconfig-aaa-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/system/openconfig-aaa.yang b/csbi/testdata/models/openconfig/public/release/models/system/openconfig-aaa.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/system/openconfig-alarm-types.yang b/csbi/testdata/models/openconfig/public/release/models/system/openconfig-alarm-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/system/openconfig-alarms.yang b/csbi/testdata/models/openconfig/public/release/models/system/openconfig-alarms.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/system/openconfig-license.yang b/csbi/testdata/models/openconfig/public/release/models/system/openconfig-license.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/system/openconfig-messages.yang b/csbi/testdata/models/openconfig/public/release/models/system/openconfig-messages.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/system/openconfig-procmon.yang b/csbi/testdata/models/openconfig/public/release/models/system/openconfig-procmon.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/system/openconfig-system-logging.yang b/csbi/testdata/models/openconfig/public/release/models/system/openconfig-system-logging.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/system/openconfig-system-management.yang b/csbi/testdata/models/openconfig/public/release/models/system/openconfig-system-management.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/system/openconfig-system-terminal.yang b/csbi/testdata/models/openconfig/public/release/models/system/openconfig-system-terminal.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/system/openconfig-system.yang b/csbi/testdata/models/openconfig/public/release/models/system/openconfig-system.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/telemetry/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/telemetry/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/telemetry/openconfig-telemetry-types.yang b/csbi/testdata/models/openconfig/public/release/models/telemetry/openconfig-telemetry-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/telemetry/openconfig-telemetry.yang b/csbi/testdata/models/openconfig/public/release/models/telemetry/openconfig-telemetry.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/types/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/types/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/types/openconfig-inet-types.yang b/csbi/testdata/models/openconfig/public/release/models/types/openconfig-inet-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/types/openconfig-types.yang b/csbi/testdata/models/openconfig/public/release/models/types/openconfig-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/types/openconfig-yang-types.yang b/csbi/testdata/models/openconfig/public/release/models/types/openconfig-yang-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/vlan/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/vlan/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/vlan/openconfig-vlan-types.yang b/csbi/testdata/models/openconfig/public/release/models/vlan/openconfig-vlan-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/vlan/openconfig-vlan.yang b/csbi/testdata/models/openconfig/public/release/models/vlan/openconfig-vlan.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/wifi/.spec.yml b/csbi/testdata/models/openconfig/public/release/models/wifi/.spec.yml old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/wifi/README.md b/csbi/testdata/models/openconfig/public/release/models/wifi/README.md old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/wifi/openconfig-access-points.yang b/csbi/testdata/models/openconfig/public/release/models/wifi/openconfig-access-points.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/wifi/openconfig-ap-interfaces.yang b/csbi/testdata/models/openconfig/public/release/models/wifi/openconfig-ap-interfaces.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/wifi/openconfig-ap-manager.yang b/csbi/testdata/models/openconfig/public/release/models/wifi/openconfig-ap-manager.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/wifi/openconfig-wifi-mac.yang b/csbi/testdata/models/openconfig/public/release/models/wifi/openconfig-wifi-mac.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/wifi/openconfig-wifi-phy.yang b/csbi/testdata/models/openconfig/public/release/models/wifi/openconfig-wifi-phy.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/openconfig/public/release/models/wifi/openconfig-wifi-types.yang b/csbi/testdata/models/openconfig/public/release/models/wifi/openconfig-wifi-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/acl/arista-acl-deviations.yang b/csbi/testdata/models/release/openconfig/models/acl/arista-acl-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/aft/arista-aft-augments.yang b/csbi/testdata/models/release/openconfig/models/aft/arista-aft-augments.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/bfd/arista-bfd-augments.yang b/csbi/testdata/models/release/openconfig/models/bfd/arista-bfd-augments.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/bfd/arista-bfd-deviations.yang b/csbi/testdata/models/release/openconfig/models/bfd/arista-bfd-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/bgp/arista-bgp-augments.yang b/csbi/testdata/models/release/openconfig/models/bgp/arista-bgp-augments.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/bgp/arista-bgp-deviations.yang b/csbi/testdata/models/release/openconfig/models/bgp/arista-bgp-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/interfaces/arista-intf-augments.yang b/csbi/testdata/models/release/openconfig/models/interfaces/arista-intf-augments.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/interfaces/arista-intf-deviations.yang b/csbi/testdata/models/release/openconfig/models/interfaces/arista-intf-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/isis/arista-isis-augments.yang b/csbi/testdata/models/release/openconfig/models/isis/arista-isis-augments.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/isis/arista-isis-deviations.yang b/csbi/testdata/models/release/openconfig/models/isis/arista-isis-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/lacp/arista-lacp-augments.yang b/csbi/testdata/models/release/openconfig/models/lacp/arista-lacp-augments.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/lacp/arista-lacp-deviations.yang b/csbi/testdata/models/release/openconfig/models/lacp/arista-lacp-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/lldp/arista-lldp-augments.yang b/csbi/testdata/models/release/openconfig/models/lldp/arista-lldp-augments.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/lldp/arista-lldp-deviations.yang b/csbi/testdata/models/release/openconfig/models/lldp/arista-lldp-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/local-routing/arista-local-routing-deviations.yang b/csbi/testdata/models/release/openconfig/models/local-routing/arista-local-routing-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/mpls/arista-mpls-augments.yang b/csbi/testdata/models/release/openconfig/models/mpls/arista-mpls-augments.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/mpls/arista-mpls-deviations.yang b/csbi/testdata/models/release/openconfig/models/mpls/arista-mpls-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/multicast/arista-pim-augments.yang b/csbi/testdata/models/release/openconfig/models/multicast/arista-pim-augments.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/network-instance/arista-netinst-deviations.yang b/csbi/testdata/models/release/openconfig/models/network-instance/arista-netinst-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/network-instance/arista-vlan-augments.yang b/csbi/testdata/models/release/openconfig/models/network-instance/arista-vlan-augments.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/network-instance/arista-vlan-deviations.yang b/csbi/testdata/models/release/openconfig/models/network-instance/arista-vlan-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/not-supported/arista-acl-notsupported-deviations.yang b/csbi/testdata/models/release/openconfig/models/not-supported/arista-acl-notsupported-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/not-supported/arista-bfd-notsupported-deviations.yang b/csbi/testdata/models/release/openconfig/models/not-supported/arista-bfd-notsupported-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/not-supported/arista-bgp-notsupported-deviations.yang b/csbi/testdata/models/release/openconfig/models/not-supported/arista-bgp-notsupported-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/not-supported/arista-interfaces-notsupported-deviations.yang b/csbi/testdata/models/release/openconfig/models/not-supported/arista-interfaces-notsupported-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/not-supported/arista-lacp-notsupported-deviations.yang b/csbi/testdata/models/release/openconfig/models/not-supported/arista-lacp-notsupported-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/not-supported/arista-lldp-notsupported-deviations.yang b/csbi/testdata/models/release/openconfig/models/not-supported/arista-lldp-notsupported-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/not-supported/arista-local-routing-notsupported-deviations.yang b/csbi/testdata/models/release/openconfig/models/not-supported/arista-local-routing-notsupported-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/not-supported/arista-messages-notsupported-deviations.yang b/csbi/testdata/models/release/openconfig/models/not-supported/arista-messages-notsupported-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/not-supported/arista-network-instance-notsupported-deviations.yang b/csbi/testdata/models/release/openconfig/models/not-supported/arista-network-instance-notsupported-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/not-supported/arista-platform-notsupported-deviations.yang b/csbi/testdata/models/release/openconfig/models/not-supported/arista-platform-notsupported-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/not-supported/arista-qos-notsupported-deviations.yang b/csbi/testdata/models/release/openconfig/models/not-supported/arista-qos-notsupported-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/not-supported/arista-routing-policy-notsupported-deviations.yang b/csbi/testdata/models/release/openconfig/models/not-supported/arista-routing-policy-notsupported-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/not-supported/arista-system-notsupported-deviations.yang b/csbi/testdata/models/release/openconfig/models/not-supported/arista-system-notsupported-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/openflow/arista-openflow-deviations.yang b/csbi/testdata/models/release/openconfig/models/openflow/arista-openflow-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/policy-forwarding/arista-srte-augments.yang b/csbi/testdata/models/release/openconfig/models/policy-forwarding/arista-srte-augments.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/policy-forwarding/arista-srte-deviations.yang b/csbi/testdata/models/release/openconfig/models/policy-forwarding/arista-srte-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/policy/arista-rpol-augments.yang b/csbi/testdata/models/release/openconfig/models/policy/arista-rpol-augments.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/policy/arista-rpol-deviations.yang b/csbi/testdata/models/release/openconfig/models/policy/arista-rpol-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/qos/arista-qos-augments.yang b/csbi/testdata/models/release/openconfig/models/qos/arista-qos-augments.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/relay-agent/arista-relay-agent-deviations.yang b/csbi/testdata/models/release/openconfig/models/relay-agent/arista-relay-agent-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/system/arista-system-augments.yang b/csbi/testdata/models/release/openconfig/models/system/arista-system-augments.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/release/openconfig/models/system/arista-system-deviations.yang b/csbi/testdata/models/release/openconfig/models/system/arista-system-deviations.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/third_party/README.md b/csbi/testdata/models/third_party/README.md old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/third_party/ietf/iana-if-type.yang b/csbi/testdata/models/third_party/ietf/iana-if-type.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/third_party/ietf/ietf-inet-types.yang b/csbi/testdata/models/third_party/ietf/ietf-inet-types.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/third_party/ietf/ietf-interfaces.yang b/csbi/testdata/models/third_party/ietf/ietf-interfaces.yang old mode 100644 new mode 100755 diff --git a/csbi/testdata/models/third_party/ietf/ietf-yang-types.yang b/csbi/testdata/models/third_party/ietf/ietf-yang-types.yang old mode 100644 new mode 100755 diff --git a/csbi/write.go b/csbi/write.go old mode 100644 new mode 100755 diff --git a/csbi/write_test.go b/csbi/write_test.go old mode 100644 new mode 100755 diff --git a/dev_env_data/clab/basic_one_arista.yaml b/dev_env_data/clab/basic_one_arista.yaml old mode 100644 new mode 100755 diff --git a/dev_env_data/clab/basic_two_aristas.yaml b/dev_env_data/clab/basic_two_aristas.yaml old mode 100644 new mode 100755 diff --git a/dev_env_data/clab/basic_two_gnmi_targets.yaml b/dev_env_data/clab/basic_two_gnmi_targets.yaml old mode 100644 new mode 100755 diff --git a/dev_env_data/clab/demo.clab.yaml b/dev_env_data/clab/demo.clab.yaml old mode 100644 new mode 100755 diff --git a/dev_env_data/clab/gosdn.clab.yaml b/dev_env_data/clab/gosdn.clab.yaml old mode 100644 new mode 100755 diff --git a/dev_env_data/clab/gosdn_slim.clab.yaml b/dev_env_data/clab/gosdn_slim.clab.yaml old mode 100644 new mode 100755 diff --git a/dev_env_data/docker-compose/basic_docker-compose.yml b/dev_env_data/docker-compose/basic_docker-compose.yml old mode 100644 new mode 100755 diff --git a/dev_env_data/docker-compose/integration-test_docker-compose.yml b/dev_env_data/docker-compose/integration-test_docker-compose.yml old mode 100644 new mode 100755 diff --git a/dev_env_data/plugin-registry/plugin-store.json b/dev_env_data/plugin-registry/plugin-store.json old mode 100644 new mode 100755 diff --git a/dev_env_data/sdn/basic_two_aristas.json b/dev_env_data/sdn/basic_two_aristas.json old mode 100644 new mode 100755 diff --git a/docker-compose.yml b/docker-compose.yml old mode 100644 new mode 100755 diff --git a/docker_volume_backup/.gitkeep b/docker_volume_backup/.gitkeep old mode 100644 new mode 100755 diff --git a/docs/images/logo.png b/docs/images/logo.png old mode 100644 new mode 100755 diff --git a/docs/images/logo.svg b/docs/images/logo.svg old mode 100644 new mode 100755 diff --git a/docs/index.md b/docs/index.md old mode 100644 new mode 100755 diff --git a/documentation/README.md b/documentation/README.md old mode 100644 new mode 100755 diff --git a/documentation/SUMMARY.md b/documentation/SUMMARY.md old mode 100644 new mode 100755 diff --git a/documentation/figures/.gitkeep b/documentation/figures/.gitkeep old mode 100644 new mode 100755 diff --git a/documentation/figures/nucleus/.gitkeep b/documentation/figures/nucleus/.gitkeep old mode 100644 new mode 100755 diff --git a/documentation/figures/nucleus/updated_controller_architecture_nucleus.drawio b/documentation/figures/nucleus/updated_controller_architecture_nucleus.drawio old mode 100644 new mode 100755 diff --git a/documentation/figures/nucleus/updated_controller_architecture_nucleus.drawio.png b/documentation/figures/nucleus/updated_controller_architecture_nucleus.drawio.png old mode 100644 new mode 100755 diff --git a/documentation/figures/overview/.gitkeep b/documentation/figures/overview/.gitkeep old mode 100644 new mode 100755 diff --git a/documentation/figures/overview/updated_controller_architecture_overview.drawio b/documentation/figures/overview/updated_controller_architecture_overview.drawio old mode 100644 new mode 100755 diff --git a/documentation/figures/overview/updated_controller_architecture_overview.drawio.png b/documentation/figures/overview/updated_controller_architecture_overview.drawio.png old mode 100644 new mode 100755 diff --git a/documentation/figures/plugins/.gitkeep b/documentation/figures/plugins/.gitkeep old mode 100644 new mode 100755 diff --git a/documentation/figures/plugins/plugin-device-interaction.drawio b/documentation/figures/plugins/plugin-device-interaction.drawio old mode 100644 new mode 100755 diff --git a/documentation/figures/plugins/plugin-device-interaction.drawio.png b/documentation/figures/plugins/plugin-device-interaction.drawio.png old mode 100644 new mode 100755 diff --git a/forks/LICENSE b/forks/LICENSE old mode 100644 new mode 100755 diff --git a/forks/README.md b/forks/README.md old mode 100644 new mode 100755 diff --git a/forks/goarista/gnmi/arbitration.go b/forks/goarista/gnmi/arbitration.go old mode 100644 new mode 100755 diff --git a/forks/goarista/gnmi/arbitration_test.go b/forks/goarista/gnmi/arbitration_test.go old mode 100644 new mode 100755 diff --git a/forks/goarista/gnmi/client.go b/forks/goarista/gnmi/client.go old mode 100644 new mode 100755 diff --git a/forks/goarista/gnmi/json.go b/forks/goarista/gnmi/json.go old mode 100644 new mode 100755 diff --git a/forks/goarista/gnmi/operation.go b/forks/goarista/gnmi/operation.go old mode 100644 new mode 100755 diff --git a/forks/goarista/gnmi/operation_test.go b/forks/goarista/gnmi/operation_test.go old mode 100644 new mode 100755 diff --git a/forks/goarista/gnmi/path.go b/forks/goarista/gnmi/path.go old mode 100644 new mode 100755 diff --git a/forks/goarista/gnmi/path_test.go b/forks/goarista/gnmi/path_test.go old mode 100644 new mode 100755 diff --git a/forks/google/README.md b/forks/google/README.md old mode 100644 new mode 100755 diff --git a/forks/google/gnmi/model.go b/forks/google/gnmi/model.go old mode 100644 new mode 100755 diff --git a/forks/google/gnmi/modeldata/gostruct/gen.go b/forks/google/gnmi/modeldata/gostruct/gen.go old mode 100644 new mode 100755 diff --git a/forks/google/gnmi/modeldata/gostruct/generated.go.wasd b/forks/google/gnmi/modeldata/gostruct/generated.go.wasd old mode 100644 new mode 100755 diff --git a/forks/google/gnmi/modeldata/modeldata.go b/forks/google/gnmi/modeldata/modeldata.go old mode 100644 new mode 100755 diff --git a/forks/google/gnmi/server.go b/forks/google/gnmi/server.go old mode 100644 new mode 100755 diff --git a/forks/google/gnmi/server_test.go.wasd b/forks/google/gnmi/server_test.go.wasd old mode 100644 new mode 100755 diff --git a/forks/google/gnmi/util.go b/forks/google/gnmi/util.go old mode 100644 new mode 100755 diff --git a/go.mod b/go.mod old mode 100644 new mode 100755 diff --git a/go.sum b/go.sum old mode 100644 new mode 100755 diff --git a/gosdn-cli-showcase.webm b/gosdn-cli-showcase.webm old mode 100644 new mode 100755 diff --git a/integration-tests/application_tests/appUtility_test.go b/integration-tests/application_tests/appUtility_test.go old mode 100644 new mode 100755 diff --git a/integration-tests/application_tests/application_test.go b/integration-tests/application_tests/application_test.go old mode 100644 new mode 100755 diff --git a/integration-tests/application_tests/eventAssertion_test.go b/integration-tests/application_tests/eventAssertion_test.go old mode 100644 new mode 100755 diff --git a/integration-tests/example_tests/example_test.go b/integration-tests/example_tests/example_test.go old mode 100644 new mode 100755 diff --git a/integration-tests/integrationTestUtils/integrationTestUtils.go b/integration-tests/integrationTestUtils/integrationTestUtils.go old mode 100644 new mode 100755 diff --git a/integration-tests/lab_tests/lab00_test.go b/integration-tests/lab_tests/lab00_test.go old mode 100644 new mode 100755 diff --git a/integration-tests/lab_tests/labUtility_test.go b/integration-tests/lab_tests/labUtility_test.go old mode 100644 new mode 100755 diff --git a/integration-tests/networkElement_tests/modelUtility_test.go b/integration-tests/networkElement_tests/modelUtility_test.go old mode 100644 new mode 100755 diff --git a/integration-tests/networkElement_tests/networkElement_test.go b/integration-tests/networkElement_tests/networkElement_test.go old mode 100644 new mode 100755 diff --git a/integration-tests/rbac_tests/rbac_test.go b/integration-tests/rbac_tests/rbac_test.go old mode 100644 new mode 100755 diff --git a/integration-tests/topology_tests/topology_test.go b/integration-tests/topology_tests/topology_test.go old mode 100644 new mode 100755 diff --git a/lab-vm/README.md b/lab-vm/README.md old mode 100644 new mode 100755 diff --git a/lab-vm/vm-with-packer/gosdn_vm.pkr.hcl b/lab-vm/vm-with-packer/gosdn_vm.pkr.hcl old mode 100644 new mode 100755 diff --git a/lab-vm/vm-with-packer/http/meta-data b/lab-vm/vm-with-packer/http/meta-data old mode 100644 new mode 100755 diff --git a/lab-vm/vm-with-packer/http/user-data b/lab-vm/vm-with-packer/http/user-data old mode 100644 new mode 100755 diff --git a/lab-vm/vm-with-packer/scripts/gosdn_clone.sh b/lab-vm/vm-with-packer/scripts/gosdn_clone.sh old mode 100644 new mode 100755 diff --git a/lab-vm/vm-with-packer/scripts/setup.sh b/lab-vm/vm-with-packer/scripts/setup.sh old mode 100644 new mode 100755 diff --git a/lab-vm/vm-with-vagrant/Vagrantfile b/lab-vm/vm-with-vagrant/Vagrantfile old mode 100644 new mode 100755 diff --git a/makefiles/build/Makefile b/makefiles/build/Makefile old mode 100644 new mode 100755 diff --git a/makefiles/ci/Makefile b/makefiles/ci/Makefile old mode 100644 new mode 100755 diff --git a/makefiles/clab/Makefile b/makefiles/clab/Makefile old mode 100644 new mode 100755 diff --git a/makefiles/container/Makefile b/makefiles/container/Makefile old mode 100644 new mode 100755 diff --git a/makefiles/generate/Makefile b/makefiles/generate/Makefile old mode 100644 new mode 100755 diff --git a/mkdocs.yml b/mkdocs.yml old mode 100644 new mode 100755 diff --git a/models/generated/README.md b/models/generated/README.md old mode 100644 new mode 100755 diff --git a/models/generated/arista/additions.patch b/models/generated/arista/additions.patch old mode 100644 new mode 100755 diff --git a/models/generated/arista/arista.go b/models/generated/arista/arista.go old mode 100644 new mode 100755 diff --git a/models/generated/arista/config.yaml b/models/generated/arista/config.yaml old mode 100644 new mode 100755 diff --git a/models/generated/arista/yang.go b/models/generated/arista/yang.go old mode 100644 new mode 100755 diff --git a/models/generated/openconfig/additions.patch b/models/generated/openconfig/additions.patch old mode 100644 new mode 100755 diff --git a/models/generated/openconfig/config.yaml b/models/generated/openconfig/config.yaml old mode 100644 new mode 100755 diff --git a/models/generated/openconfig/openconfig.go b/models/generated/openconfig/openconfig.go old mode 100644 new mode 100755 diff --git a/models/generated/openconfig/yang.go b/models/generated/openconfig/yang.go old mode 100644 new mode 100755 diff --git a/plugin-registry/README.md b/plugin-registry/README.md old mode 100644 new mode 100755 diff --git a/plugin-registry/main.go b/plugin-registry/main.go old mode 100644 new mode 100755 diff --git a/plugin-registry/plugin-registry.Dockerfile b/plugin-registry/plugin-registry.Dockerfile old mode 100644 new mode 100755 diff --git a/plugin-registry/plugin-registry.Dockerfile.dockerignore b/plugin-registry/plugin-registry.Dockerfile.dockerignore old mode 100644 new mode 100755 diff --git a/plugin-registry/plugin-registry.debug.Dockerfile b/plugin-registry/plugin-registry.debug.Dockerfile old mode 100644 new mode 100755 diff --git a/plugin-registry/plugin-registry.debug.Dockerfile.dockerignore b/plugin-registry/plugin-registry.debug.Dockerfile.dockerignore old mode 100644 new mode 100755 diff --git a/plugin-registry/registry.go b/plugin-registry/registry.go old mode 100644 new mode 100755 diff --git a/plugin-registry/server.go b/plugin-registry/server.go old mode 100644 new mode 100755 diff --git a/plugin-registry/store.go b/plugin-registry/store.go old mode 100644 new mode 100755 diff --git a/plugins/README.md b/plugins/README.md old mode 100644 new mode 100755 diff --git a/plugins/examples/arista/cmd/main.go b/plugins/examples/arista/cmd/main.go old mode 100644 new mode 100755 diff --git a/plugins/examples/arista/plugin.yaml b/plugins/examples/arista/plugin.yaml old mode 100644 new mode 100755 diff --git a/plugins/examples/openconfig/cmd/main.go b/plugins/examples/openconfig/cmd/main.go old mode 100644 new mode 100755 diff --git a/plugins/examples/openconfig/plugin.yaml b/plugins/examples/openconfig/plugin.yaml old mode 100644 new mode 100755 diff --git a/plugins/sdk/deviceModel.go b/plugins/sdk/deviceModel.go old mode 100644 new mode 100755 diff --git a/react-ui/assets/logo.svg b/react-ui/assets/logo.svg deleted file mode 100755 index b7f71bd907d8ab0aa829f03519d4d6f06cdadfec..0000000000000000000000000000000000000000 --- a/react-ui/assets/logo.svg +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<!-- Created with Vectornator (http://vectornator.io/) --> -<svg height="100%" stroke-miterlimit="10" style="fill-rule:nonzero;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;" version="1.1" viewBox="0 0 113.4 212.625" width="100%" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:vectornator="http://vectornator.io" xmlns:xlink="http://www.w3.org/1999/xlink"> -<defs> -<radialGradient cx="170.235" cy="146.046" gradientTransform="matrix(1.00001 -8.65109e-05 8.65119e-05 1 -115.465 -116.986)" gradientUnits="userSpaceOnUse" id="RadialGradient" r="217.591"> -<stop offset="0" stop-color="#c456f7"/> -<stop offset="1" stop-color="#34054a"/> -</radialGradient> -<filter color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="209.692" id="Filter" width="111.957" x="0.722269" y="2.46642"> -<feDropShadow dx="-4.37114e-08" dy="1" flood-color="#050505" flood-opacity="1" in="SourceGraphic" result="Shadow" stdDeviation="1"/> -</filter> -</defs> -<g id="Layer-1" vectornator:layerName="Layer 1"> -<path d="M35.1413 3.47016L35.1416 6.93891L27.1415 6.93961L27.1464 63.3771C21.6096 65.0011 16.4869 67.0445 12.2717 69.6596C-9.35807 83.0789 12.5182 123.232 12.5264 123.222C12.5341 123.213 12.5498 123.2 12.5576 123.191C13.1518 124.609 14.5144 125.761 16.5579 126.534C18.7737 127.372 21.8204 127.855 26.8082 128.408C25.0644 132.318 24.4639 137.732 25.3409 144.846C26.0816 150.854 28.2327 155.309 32.5924 161.533C32.9615 162.06 34.1761 163.796 34.3427 164.033C35.013 164.984 35.5416 165.705 35.9991 166.408C38.1084 169.647 39.1319 172.149 39.3124 174.814C39.3701 175.665 39.3355 180.513 39.251 187.751C39.2362 189.024 39.0999 200.614 39.0959 200.907C37.7122 201.653 36.7523 203.069 36.7525 204.751C36.7527 207.19 38.7205 209.157 41.1591 209.157C43.5978 209.157 45.5653 207.189 45.5651 204.751C45.5649 203.019 44.5477 201.568 43.096 200.844C43.1023 200.341 43.2363 189.045 43.2511 187.782C43.3388 180.268 43.3816 175.583 43.3124 174.563C43.0775 171.096 41.7912 168.012 39.3427 164.251C38.854 163.5 38.3197 162.708 37.6237 161.72C37.4507 161.474 36.2342 159.766 35.8735 159.251C31.8564 153.517 29.9529 149.563 29.3096 144.346C28.2621 135.848 29.4895 130.5 32.027 127.533C32.6413 126.815 33.2789 126.306 33.9019 125.97C34.2334 125.792 34.4442 125.7 34.4956 125.689C35.5735 125.448 36.2365 124.392 35.9954 123.314C35.7543 122.236 34.6982 121.542 33.6202 121.783C33.2264 121.871 32.6655 122.078 31.9953 122.439C31.0669 122.939 30.1635 123.734 29.3079 124.658C23.0392 124.019 20.0922 123.577 17.9951 122.784C16.1482 122.086 15.9773 121.63 16.7137 120.347C25.511 115.923 43.9287 113.157 55.0885 113.156C63.8081 113.155 79.7952 116.873 90.4333 119.622C93.9977 120.542 94.7294 120.755 96.621 121.277C94.2649 123.034 89.4439 124.738 83.3087 125.247C83.0835 125.266 82.9434 125.443 82.7462 125.529C82.6074 125.348 82.5171 125.106 82.3711 124.935C81.4271 123.831 80.3863 122.999 79.3396 122.435C78.6693 122.074 78.1085 121.867 77.7145 121.779C76.6365 121.538 75.5805 122.233 75.3396 123.31C75.0987 124.388 75.7619 125.444 76.8399 125.685C76.8913 125.697 77.1021 125.788 77.4337 125.967C78.0567 126.302 78.6942 126.81 79.3088 127.529C81.8468 130.496 83.0751 135.844 82.029 144.341C81.3867 149.559 79.4839 153.513 75.4678 159.248C75.1071 159.763 73.8909 161.471 73.7179 161.717C73.0221 162.705 72.488 163.498 71.9994 164.248C69.5516 168.009 68.2658 171.094 68.0315 174.561C67.9625 175.581 68.0061 180.266 68.0951 187.78C68.1102 189.055 68.2793 200.673 68.2838 200.967C66.9421 201.725 66.0027 203.098 66.0028 204.749C66.0031 207.187 67.9709 209.155 70.4095 209.155C72.8481 209.154 74.8156 207.187 74.8154 204.748C74.8153 202.975 73.7598 201.482 72.2526 200.779C72.2461 200.277 72.1101 189.009 72.0952 187.748C72.0095 180.511 71.974 175.662 72.0316 174.811C72.2116 172.146 73.2659 169.644 75.3746 166.404C75.8321 165.701 76.3292 164.981 76.9994 164.029C77.1659 163.793 78.3803 162.056 78.7492 161.529C83.1079 155.305 85.2582 150.849 85.9979 144.841C86.8306 138.077 86.2654 132.917 84.7153 129.06C93.073 128.178 99.944 125.471 101.777 121.527C105.258 116.592 120.674 81.4184 100.46 69.1833C96.4145 66.7344 91.6503 64.7196 86.3971 63.1845L86.3922 6.93448L78.3609 6.93517L78.3606 3.46642L35.1413 3.47016ZM31.1419 10.9393L39.1107 10.9386L39.3309 27.9386C39.3406 28.6841 39.9605 29.2606 40.7061 29.2509C41.4516 29.2413 42.0593 28.6214 42.0497 27.8758L41.7983 10.9383L44.517 10.9381L44.7998 27.9381C44.8108 28.6836 45.3981 29.2615 46.1436 29.2505C46.8892 29.2394 47.4983 28.6209 47.4873 27.8753L47.2358 10.9379L49.9546 10.9376L50.2061 27.9376C50.2169 28.6831 50.8357 29.2608 51.5812 29.25C52.3267 29.2392 52.9044 28.6203 52.8936 27.8749L52.6421 10.9374L55.3609 10.9372L55.6124 27.9371C55.623 28.6827 56.242 29.2601 56.9875 29.2495C57.733 29.2389 58.3418 28.6199 58.3312 27.8744L58.0797 10.9369L60.8297 10.9367L61.05 27.9367C61.0546 28.3094 61.2147 28.6381 61.4563 28.8741C61.6979 29.1102 62.0211 29.2537 62.3938 29.2491C63.1394 29.2398 63.7468 28.6194 63.7375 27.8739L63.5173 10.9365L66.2986 10.9362L66.4875 27.905C66.4957 28.6505 67.1171 29.2568 67.8627 29.2486C68.6082 29.2404 69.1834 28.6503 69.1751 27.9047L68.9861 10.936L71.7674 10.9357L71.9564 27.9357C71.9605 28.3085 72.1132 28.6372 72.3627 28.8732C72.6122 29.1091 72.9587 29.2523 73.3315 29.2481C74.077 29.2398 74.6833 28.6498 74.6751 27.9042L74.4862 10.9355L82.3925 10.9348L82.3969 62.2473C78.1953 61.2363 73.8195 60.4151 69.2716 59.936L69.0841 59.936L69.0846 65.9672L62.3352 73.3116L62.211 82.5928L62.212 94.7803L56.5244 94.7808L50.3056 94.7814L50.2733 82.9376L50.1163 73.3126L43.1468 65.8132L43.1463 60.0945L31.1463 62.3455L31.1419 10.9393ZM46.0197 41.188L45.9904 64.3755L52.9599 71.8749L53.1492 91.9374L59.368 91.9368L59.5225 71.8743L66.2407 64.5612L66.2387 41.3425L46.0197 41.188ZM45.5578 121.282C45.0484 121.232 44.5158 121.369 44.0891 121.719C43.2356 122.421 43.1382 123.71 43.8394 124.563C43.8712 124.602 43.9181 124.67 44.0269 124.813C44.2163 125.062 44.4521 125.354 44.6832 125.688C45.3494 126.65 45.998 127.755 46.621 128.938C48.9603 133.379 50.0248 137.836 49.1222 141.875C48.4351 144.95 46.6061 147.711 43.4353 150.126C43.1568 150.338 42.1644 150.942 40.7792 151.751C40.6905 151.803 37.4839 153.662 37.4356 153.689C36.4728 154.23 36.1131 155.445 36.6545 156.408C37.1959 157.37 38.4106 157.699 39.3734 157.157C39.4251 157.128 42.7199 155.272 42.8108 155.22C44.3781 154.304 45.4057 153.669 45.8731 153.313C49.7829 150.336 52.1324 146.76 53.0285 142.75C54.1746 137.622 52.9238 132.266 50.1834 127.063C49.4811 125.729 48.7181 124.526 47.9643 123.438C47.5056 122.775 47.1244 122.271 46.9017 122C46.5511 121.574 46.0673 121.332 45.5578 121.282ZM65.7769 121.28C65.2675 121.33 64.7837 121.572 64.4331 121.999C64.2105 122.27 63.8293 122.774 63.3708 123.436C62.6172 124.525 61.8858 125.728 61.1835 127.062C58.444 132.265 57.163 137.621 58.3099 142.749C59.2067 146.759 61.5569 150.335 65.4671 153.311C65.9346 153.667 66.9935 154.302 68.5611 155.217C68.6519 155.27 71.9158 157.125 71.9675 157.154C72.9304 157.696 74.145 157.367 74.6862 156.404C75.2275 155.441 74.8676 154.227 73.9048 153.686C73.8565 153.658 70.6495 151.8 70.5608 151.748C69.1754 150.939 68.1829 150.336 67.9044 150.124C64.7332 147.71 62.9036 144.948 62.2161 141.874C61.3128 137.835 62.3766 133.378 64.715 128.936C65.3378 127.753 65.9862 126.649 66.6522 125.686C66.8833 125.352 67.1191 125.06 67.3084 124.811C67.4172 124.668 67.4953 124.6 67.5272 124.561C68.2282 123.708 68.0992 122.418 67.2457 121.717C66.8189 121.367 66.2862 121.23 65.7769 121.28ZM28.3735 160.064C27.8641 160.114 27.3492 160.357 26.9985 160.783C24.0604 164.358 22.5881 168.723 22.5621 174.253C22.5614 174.404 22.6311 200.839 22.627 200.877C21.1966 201.608 20.1896 203.036 20.1898 204.753C20.19 207.191 22.1578 209.159 24.5964 209.159C27.0351 209.158 29.0026 207.191 29.0024 204.752C29.0022 203.061 28.0235 201.65 26.627 200.908C26.6562 200.425 26.6538 197.055 26.6259 187.658C26.6229 186.662 26.5615 174.385 26.5622 174.252C26.584 169.618 27.7563 166.157 30.0925 163.314C30.7939 162.461 30.6644 161.203 29.811 160.502C29.3844 160.151 28.8829 160.015 28.3735 160.064ZM82.9679 160.06C82.4585 160.01 81.9571 160.147 81.5304 160.497C80.6772 161.199 80.5479 162.457 81.2494 163.31C83.5862 166.152 84.7591 169.613 84.7817 174.247C84.7823 174.378 84.7241 199.67 84.7527 200.841C83.3011 201.564 82.2529 203.015 82.253 204.747C82.2533 207.186 84.2524 209.153 86.691 209.153C89.1295 209.153 91.0971 207.185 91.0969 204.747C91.0967 203.049 90.1265 201.611 88.7215 200.872C88.7173 200.833 88.7318 194.753 88.7516 187.684C88.7544 186.688 88.7824 174.398 88.7817 174.247C88.7548 168.717 87.2817 164.353 84.343 160.778C83.9922 160.352 83.4774 160.109 82.9679 160.06Z" fill="url(#RadialGradient)" fill-rule="nonzero" filter="url(#Filter)" stroke="none" vectornator:shadowAngle="1.5708" vectornator:shadowColor="#050505" vectornator:shadowOffset="1" vectornator:shadowOpacity="1" vectornator:shadowRadius="2"/> -</g> -</svg> diff --git a/react-ui/docker/webserver/nginx.conf b/react-ui/docker/webserver/nginx.conf index eb4fc2be925602e892b2bdb0a134d5016cc2c736..b9028bec32ba630f8277d054dcbfbac37d707297 100644 --- a/react-ui/docker/webserver/nginx.conf +++ b/react-ui/docker/webserver/nginx.conf @@ -1,51 +1,82 @@ - -#user nobody; worker_processes 1; -#error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; - -#pid logs/nginx.pid; - - events { worker_connections 1024; + multi_accept on; + use epoll; } http { include mime.types; default_type application/octet-stream; - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #access_log logs/access.log main; - - sendfile on; - #tcp_nopush on; - - #keepalive_timeout 0; - keepalive_timeout 65; + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main buffer=16k; + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + types_hash_max_size 2048; + server_tokens off; + + # Buffer size settings + client_body_buffer_size 10K; + client_header_buffer_size 8k; + client_max_body_size 8m; + large_client_header_buffers 4 8k; + + # File descriptor cache + open_file_cache max=2000 inactive=20s; + open_file_cache_valid 60s; + open_file_cache_min_uses 5; + open_file_cache_errors off; + + # Compression settings + gzip on; + gzip_comp_level 6; + gzip_min_length 256; + gzip_proxied any; + gzip_vary on; + gzip_types + application/javascript + application/json + application/x-javascript + application/xml + text/css + text/javascript + text/plain + text/xml + text/html + application/x-font-ttf + font/opentype + application/vnd.ms-fontobject + image/svg+xml; resolver 127.0.0.11 ipv6=off; - #gzip on; - server { listen 80; server_name localhost; - #charset koi8-r; - - #access_log logs/host.access.log main; - location ^~ /api/ { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; + + # Proxy timeouts + proxy_connect_timeout 60s; + proxy_send_timeout 60s; + proxy_read_timeout 60s; + + # Proxy buffering + proxy_buffering on; + proxy_buffer_size 4k; + proxy_buffers 8 16k; # CORS headers add_header 'Access-Control-Allow-Origin' '*' always; @@ -74,59 +105,23 @@ http { try_files $uri $uri/ /index.html; } - location ~* \.(js|css|jpg|png|svg|woff|woff2|ttf|otf|eot|ico)$ { + + # Static asset handling with improved caching + location ~* \.(js|css|jpg|jpeg|png|gif|ico|svg|woff|woff2|ttf|otf|eot)$ { root /usr/share/nginx/html; - add_header 'Access-Control-Allow-Origin' '*' always; expires 30d; - add_header Cache-Control "public"; + add_header Cache-Control "public, no-transform"; + add_header 'Access-Control-Allow-Origin' '*' always; + + # Enable compression for these files + gzip_static on; # Serve pre-compressed files if available + + # Disable access logs for static files + access_log off; } - - # #error_page 404 /404.html; - - # # redirect server error pages to the static page /50x.html - # # - # error_page 500 502 503 504 /50x.html; - # location = /50x.html { - # root html; - # } - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # - #location ~ \.php$ { - # root html; - # fastcgi_pass 127.0.0.1:9000; - # fastcgi_index index.php; - # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; - # include fastcgi_params; - #} - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} } - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} # HTTPS server @@ -149,5 +144,4 @@ http { # index index.html index.htm; # } #} - } \ No newline at end of file diff --git a/react-ui/index.html b/react-ui/index.html index 91d50a11c836668b61e6e60fee7dabe940186c0f..3dc374a596e8a0a21a920783305d30984626c95e 100755 --- a/react-ui/index.html +++ b/react-ui/index.html @@ -5,13 +5,14 @@ <link rel="icon" href="favicon.ico" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="theme-color" content="#000000" /> + <meta name="author" content="Matthias Feyll" /> <meta name="description" - content="Web site created using create-react-app" + content="goSDN web ui" /> <link rel="apple-touch-icon" href="logo.png" /> <link rel="manifest" href="manifest.json" /> - <title>goSDN</title> + <title>goSDN - ui</title> </head> <body> <noscript>You need to enable JavaScript to run this app.</noscript> diff --git a/react-ui/package.json b/react-ui/package.json index 709c5bfcb623cd76f6b0e5264378ad3f909a58a7..76af9e08b8816b67d32f7057f361cf5e5551c8e6 100755 --- a/react-ui/package.json +++ b/react-ui/package.json @@ -12,8 +12,12 @@ "@fortawesome/free-regular-svg-icons": "^6.6.0", "@fortawesome/free-solid-svg-icons": "^6.6.0", "@fortawesome/react-fontawesome": "^0.2.2", + "@fullhuman/postcss-purgecss": "^7.0.2", "@reduxjs/toolkit": "^2.2.4", + "@types/react-grid-layout": "^1.3.5", + "@vitejs/plugin-react": "^4.2.1", "bootstrap": "^5.3.3", + "crypto-js": "^4.2.0", "dompurify": "^3.2.3", "i18next": "^24.0.5", "jwt-decode": "^4.0.0", @@ -21,14 +25,45 @@ "react-bootstrap": "^2.10.2", "react-dom": "^18.3.1", "react-error-boundary": "^4.1.2", + "react-grid-layout": "^1.5.0", + "react-hook-form": "^7.54.2", "react-i18next": "^15.0.0", + "react-loading-skeleton": "^3.5.0", "react-redux": "^9.1.2", "react-router-dom": "^6.23.1", - "react-scripts": "5.0.1", "react-toastify": "^10.0.5", "redux": "^5.0.1", "redux-observable": "^3.0.0-rc.2", "redux-persist": "^6.0.0", + "sass": "1.82.0", + "sass-embedded": "^1.80.6", + "vite": "^6.0.3" + }, + "devDependencies": { + "@babel/runtime": "^7.21.5", + "@rtk-query/codegen-openapi": "^2.0.0", + "@testing-library/jest-dom": "^6.4.8", + "@testing-library/react": "^16.0.0", + "@testing-library/user-event": "^14.5.2", + "@types/react": "^18.2.66", + "@types/react-dom": "^18.2.22", + "@typescript-eslint/eslint-plugin": "^8.0.1", + "@typescript-eslint/parser": "^8.0.1", + "eslint": "^9.9.0", + "eslint-config-airbnb-typescript": "^18.0.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-import": "^2.27.5", + "eslint-plugin-jsx-a11y": "^6.7.1", + "eslint-plugin-prettier": "^5.2.1", + "eslint-plugin-react": "^7.32.2", + "eslint-plugin-react-hooks": "^5.1.0-rc.0", + "eslint-plugin-react-refresh": "^0.4.9", + "globals": "^15.9.0", + "prettier": "^3.3.3", + "react-scripts": "5.0.1", + "typescript": "^5.5.3", + "typescript-eslint": "^8.0.1", + "vite-bundle-visualizer": "^1.2.1", "web-vitals": "^4.2.2" }, "scripts": { @@ -37,7 +72,9 @@ "build::api": "npx @rtk-query/codegen-openapi ./scripts/openapi-config.json", "build": "yarn build::api && yarn build::frontend", "lint": "eslint src", - "lint::fix": "eslint src --fix" + "lint::fix": "eslint src --fix", + "dev": "./scripts/dev.sh", + "postbuild": "purgecss --css dist/assets/*.css --content dist/index.html dist/assets/*.js --output dist/purged" }, "eslintConfig": { "extends": [ @@ -55,34 +92,5 @@ "last 1 firefox version", "last 1 safari version" ] - }, - "devDependencies": { - "@babel/runtime": "^7.21.5", - "@rtk-query/codegen-openapi": "^2.0.0", - "@testing-library/jest-dom": "^6.4.8", - "@testing-library/react": "^16.0.0", - "@testing-library/user-event": "^14.5.2", - "@types/react": "^18.2.66", - "@types/react-dom": "^18.2.22", - "@typescript-eslint/eslint-plugin": "^8.0.1", - "@typescript-eslint/parser": "^8.0.1", - "@vitejs/plugin-react": "^4.2.1", - "eslint": "^9.9.0", - "eslint-config-airbnb-typescript": "^18.0.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-import": "^2.27.5", - "eslint-plugin-jsx-a11y": "^6.7.1", - "eslint-plugin-prettier": "^5.2.1", - "eslint-plugin-react": "^7.32.2", - "eslint-plugin-react-hooks": "^5.1.0-rc.0", - "eslint-plugin-react-refresh": "^0.4.9", - "globals": "^15.9.0", - "prettier": "^3.3.3", - "sass": "1.82.0", - "sass-embedded": "^1.80.6", - "typescript": "^5.5.3", - "typescript-eslint": "^8.0.1", - "vite": "^6.0.3", - "vite-bundle-visualizer": "^1.2.1" } -} \ No newline at end of file +} diff --git a/react-ui/public/favicon.ico b/react-ui/public/favicon.ico old mode 100755 new mode 100644 index a11777cc471a4344702741ab1c8a588998b1311a..ae6dcf05241b89f446e88d15b81ffd69202fa83a Binary files a/react-ui/public/favicon.ico and b/react-ui/public/favicon.ico differ diff --git a/react-ui/public/fonts/inter-webfont.woff b/react-ui/public/fonts/inter-webfont.woff new file mode 100644 index 0000000000000000000000000000000000000000..7eca6fe75d3ba56e14981e8f8e1c50d948bb8b56 Binary files /dev/null and b/react-ui/public/fonts/inter-webfont.woff differ diff --git a/react-ui/public/fonts/inter-webfont.woff2 b/react-ui/public/fonts/inter-webfont.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..25ef870d53d5616ee3e92bbe3e85b5ed164fe4d2 Binary files /dev/null and b/react-ui/public/fonts/inter-webfont.woff2 differ diff --git a/react-ui/scripts/dev.sh b/react-ui/scripts/dev.sh new file mode 100755 index 0000000000000000000000000000000000000000..3a2d208858603433cf61c69ade5aa21d46f26377 --- /dev/null +++ b/react-ui/scripts/dev.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +docker run \ + -it \ + --rm \ + -v $(pwd):/app \ + -w /app \ + -p 127.0.0.1:3000:3000 \ + --network gosdn-csbi-arista-base-net \ + node:20-alpine3.20 \ + npx vite diff --git a/react-ui/src/.prettierrc b/react-ui/src/.prettierrc new file mode 100644 index 0000000000000000000000000000000000000000..222861c341540db6785e10c2b6461d5cbc94a6eb --- /dev/null +++ b/react-ui/src/.prettierrc @@ -0,0 +1,4 @@ +{ + "tabWidth": 2, + "useTabs": false +} diff --git a/react-ui/src/components/devices/reducer/device.reducer.ts b/react-ui/src/components/devices/reducer/device.reducer.ts index 8e4454bd285396b3aca4dce62bc7d1b1518fcd51..c7538079a6b10160cfebaec4664517e6b355b4fd 100755 --- a/react-ui/src/components/devices/reducer/device.reducer.ts +++ b/react-ui/src/components/devices/reducer/device.reducer.ts @@ -1,107 +1,156 @@ import { - api, NetworkelementFlattenedManagedNetworkElement, NetworkelementManagedNetworkElement, - PndPrincipalNetworkDomain, - PndServiceGetPndListApiArg, + PndPrincipalNetworkDomain } from '@api/api' -import { DeviceViewTabValues } from '@component/devices/view/device.view.tabs' -import { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit' +import { createSlice, PayloadAction } from '@reduxjs/toolkit' +import { refreshUpdateTimer } from '@shared/reducer/routine.reducer' +import { Category, CategoryType } from '@shared/types/category.type' +import { REHYDRATE } from 'redux-persist' import { RootState } from 'src/stores' import '../routines/index' import { startListening } from '/src/stores/middleware/listener.middleware' export type Device = NetworkelementFlattenedManagedNetworkElement -interface SelectedDeviceInterface { +interface SelectedObject { device: Device mne: NetworkelementManagedNetworkElement | null json: JSON | null } -type SelectedDeviceType = SelectedDeviceInterface | null - export interface DeviceSliceState { devices: Device[] pnds: PndPrincipalNetworkDomain[] - activeTab: DeviceViewTabValues - selectedDevice: SelectedDeviceType + selected: SelectedObject | null } const initialState: DeviceSliceState = { devices: [], pnds: [], - activeTab: DeviceViewTabValues.METADATA, - selectedDevice: null, + selected: null, +} + +interface SetSelectedDeviceType { + device: Device | null, + options?: { + bypassCheck: boolean + } } const deviceSlice = createSlice({ name: 'device', initialState, reducers: { - setDevices: (state, action: PayloadAction<Device[]>) => { - state.devices = action.payload + setDevices: (state, action: PayloadAction<Device[] | undefined>) => { + state.devices = action.payload || [] }, - setPnds: (state, action: PayloadAction<PndPrincipalNetworkDomain[]>) => { - state.pnds = action.payload + setPnds: (state, action: PayloadAction<PndPrincipalNetworkDomain[] | undefined>) => { + state.pnds = action.payload || [] }, - setActiveTab: (state, action: PayloadAction<DeviceViewTabValues>) => { - state.activeTab = action.payload - }, - setSelectedDevice: (state, action: PayloadAction<Device | null>) => { - let selectedDevice: SelectedDeviceType = null - if (action.payload) { - selectedDevice = { device: action.payload, mne: null, json: null } + setSelectedDevice: { + reducer: (state, { payload, meta }: PayloadAction<SetSelectedDeviceType, string, { skipListener?: boolean }>) => { + /** + * Do nothing if desired device is already selected + * Bypass the check if the flag is set to true. We + * use this bypass to trigger the listener functions + * accordingly + */ + if (!payload?.options?.bypassCheck && state.selected?.device.id === payload.device?.id) { + meta.skipListener = true + return + } + + if (!payload.device) { + throw Error('Passed null device as parameter while bypassing the safety check') + } + + let selectedObject: SelectedObject | null = null; + if (payload) { + selectedObject = { device: payload.device, mne: null, json: null } + } + + state.selected = selectedObject + }, + prepare: (payload) => { + return { + payload, + meta: { skipListener: false } + } } - - state.selectedDevice = selectedDevice }, setSelectedMne: (state, action: PayloadAction<NetworkelementManagedNetworkElement>) => { - if (!state.selectedDevice) { - throw new Error('Selected Device is null where it shouldn´t be null') + if (!state.selected) { + throw new Error('Can not find corresponding device') } - state.selectedDevice.mne = action.payload - // TODO maybe don´t take the device of "selected device" instead search in the devices array for the proper device - // should not make a diffrence due to pointer but dunno + // safety check to prevent possible race conditions + if (state.selected.device.id !== action.payload.id) { + // TODO proper error handling by retry fetching the device object + throw new Error('Device and mne id does not match') + } + + state.selected.mne = action.payload }, setSelectedJson: (state, action: PayloadAction<JSON>) => { - if (!state.selectedDevice) { + if (!state.selected) { throw new Error('Selected Device is null where it shouldn´t be null') } - state.selectedDevice.json = action.payload || null + state.selected.json = action.payload || null }, }, }) -export const { setDevices, setActiveTab, setSelectedDevice, setSelectedMne, setSelectedJson } = +export const { setDevices, setSelectedDevice, setSelectedMne, setSelectedJson, setPnds } = deviceSlice.actions -const { setPnds } = deviceSlice.actions export default deviceSlice.reducer export const deviceReducerPath = deviceSlice.reducerPath -export const fetchPnds = createAsyncThunk('device/fetchPnds', (_, thunkApi) => { - const payload: PndServiceGetPndListApiArg = { - timestamp: new Date().getTime().toString(), - } +// add default selected device if no selected device is set +startListening({ + predicate: (action) => setDevices.match(action), + effect: async (action, listenerApi) => { + const { device: state } = listenerApi.getOriginalState() as RootState + if (state.selected) { + return + } - const subscription = thunkApi.dispatch(api.endpoints.pndServiceGetPndList.initiate(payload)) - subscription.unwrap().then((response) => { - thunkApi.dispatch(setPnds(response.pnd)) - }) + // if there are no devices available do set null + const device = action.payload?.[0] || null + listenerApi.dispatch(setSelectedDevice({ device } as SetSelectedDeviceType)) + }, +}) + +startListening({ + predicate: (action) => setSelectedMne.match(action), + effect: async (action, listenerApi) => { + listenerApi.dispatch(refreshUpdateTimer(Category.TAB as CategoryType)) + }, }) -// add default selected device if no selected device is set startListening({ predicate: (action) => setDevices.match(action), effect: async (action, listenerApi) => { - const { device } = listenerApi.getOriginalState() as RootState - if (!device.selectedDevice && !!action.payload[0]) { - listenerApi.dispatch(setSelectedDevice(action.payload[0])) - } + listenerApi.dispatch(refreshUpdateTimer(Category.DEVICE as CategoryType)) }, }) + +/** + * On startup reset the selected device + */ +startListening({ + predicate: ({ type }: any) => type === REHYDRATE, + effect: async (_, listenerApi) => { + const { device: state } = listenerApi.getState() as RootState + const device = state.selected?.device + if (!device) { + return + } + + listenerApi.dispatch(setSelectedDevice({ device, options: { bypassCheck: true } } as SetSelectedDeviceType)) + }, +}) \ No newline at end of file diff --git a/react-ui/src/components/devices/reducer/plugin.reducer.ts b/react-ui/src/components/devices/reducer/plugin.reducer.ts new file mode 100644 index 0000000000000000000000000000000000000000..f11f24477aed8e0673653c81f4f5eaff88c4cd73 --- /dev/null +++ b/react-ui/src/components/devices/reducer/plugin.reducer.ts @@ -0,0 +1,46 @@ +import { + NetworkelementFlattenedManagedNetworkElement, + NetworkelementManagedNetworkElement, + PluginRegistryPlugin +} from '@api/api' +import { createSlice, PayloadAction } from '@reduxjs/toolkit' +import '../routines/index' + +export type Device = NetworkelementFlattenedManagedNetworkElement + +interface SelectedObject { + device: Device + mne: NetworkelementManagedNetworkElement | null + json: JSON | null +} + +export interface PluginSliceState { + plugins: Array<PluginRegistryPlugin> +} + +const initialState: PluginSliceState = { + plugins: [], +} + +interface SetSelectedDeviceType { + device: Device | null, + options?: { + bypassCheck: boolean + } +} + +const pluginSlice = createSlice({ + name: 'plugins', + initialState, + reducers: { + setPlugins: (state, action: PayloadAction<PluginRegistryPlugin[] | undefined>) => { + state.plugins = action.payload || [] + }, + }, +}) + +export const { setPlugins } = + pluginSlice.actions + +export default pluginSlice.reducer +export const pluginReducerPath = pluginSlice.reducerPath diff --git a/react-ui/src/components/devices/routines/device.routine.ts b/react-ui/src/components/devices/routines/device.routine.ts index 10caffa2faa1eb0bdcba5f616c23f36c1721cb30..058f65f9fb7416d1efb55cf7a00e70571b55fb30 100755 --- a/react-ui/src/components/devices/routines/device.routine.ts +++ b/react-ui/src/components/devices/routines/device.routine.ts @@ -1,26 +1,39 @@ import { NetworkElementServiceGetAllFlattenedApiArg, api } from '@api/api' import { setDevices } from '@component/devices/reducer/device.reducer' import { createAsyncThunk } from '@reduxjs/toolkit' +import { addRoutine } from '@shared/reducer/routine.reducer' import { setUser } from '@shared/reducer/user.reducer' +import { Category, CategoryType } from '@shared/types/category.type' import { RootState } from 'src/stores' import { startListening } from '../../../stores/middleware/listener.middleware' export const FETCH_DEVICE_ACTION = 'subscription/device/fetchDevices' // continously fetch devices -const FETCH_DEVICES_INTERVAL = 15000 // in ms startListening({ actionCreator: setUser, effect: async (_, listenerApi) => { - listenerApi.dispatch(fetchDevicesThunk()) + listenerApi.dispatch( + addRoutine({ + thunk: fetchDevicesThunk, + category: Category.DEVICE as CategoryType, + payload: {}, + }) + ) }, }) +const FETCH_DEVICES_INTERVAL = 15000 // in ms export const fetchDevicesThunk = createAsyncThunk(FETCH_DEVICE_ACTION, (_, thunkApi) => { const { user } = thunkApi.getState() as RootState + if (!user.user?.roles) { + throw new Error('Background device fetching failed! User data is missing. Reload page or logout and login again') + // TODO + } + const payload: NetworkElementServiceGetAllFlattenedApiArg = { - pid: Object.keys(user?.user.roles)[0], + pid: Object.keys(user.user.roles)[0], timestamp: new Date().getTime().toString(), } diff --git a/react-ui/src/components/devices/routines/mne.routine.ts b/react-ui/src/components/devices/routines/mne.routine.ts index 7de1d18149c35c2bfbe47582d479a5736fa7f1b1..967da2615e5ccad3a80995d5dc8eebd7e72a0b0a 100755 --- a/react-ui/src/components/devices/routines/mne.routine.ts +++ b/react-ui/src/components/devices/routines/mne.routine.ts @@ -6,26 +6,41 @@ import { setSelectedMne, } from '@component/devices/reducer/device.reducer' import { createAsyncThunk } from '@reduxjs/toolkit' -import { addRoutine, CATEGORIES } from '@shared/reducer/routine.reducer' +import { addRoutine } from '@shared/reducer/routine.reducer' +import { Category, CategoryType } from '@shared/types/category.type' import { RootState } from 'src/stores' import { startListening } from '../../../stores/middleware/listener.middleware' export const FETCH_MNE_ACTION = 'subscription/device/fetchSelectedMNE' -// fetch mne if selected device is set +/** + * #0 + * Trigger fetch MNE (#1) + * + * Triggered by a selectedDevice + */ startListening({ - predicate: (action) => setSelectedDevice.match(action) && !!action.payload, + predicate: (action) => setSelectedDevice.match(action) && !!action.payload.device && !action.meta?.skipListener, effect: async (action, listenerApi) => { + + const device = action.payload.device + listenerApi.dispatch( addRoutine({ thunk: fetchSelectedMneThunk, - category: CATEGORIES.TAB, - payload: action.payload, + category: Category.TAB as CategoryType, + payload: device, }) ) }, }) +/** + * #1 + * Fetch MNE + * + * Triggered by #0 + */ const FETCH_MNE_INTERVAL = 5000 // in ms export const fetchSelectedMneThunk = createAsyncThunk( FETCH_MNE_ACTION, @@ -56,7 +71,12 @@ export const fetchSelectedMneThunk = createAsyncThunk( } ) -// save fetched mne +/** + * #2 + * Received MNE + * + * Triggered by #1 + */ startListening({ predicate: (action) => api.endpoints.networkElementServiceGet.matchFulfilled(action), effect: async (action, listenerApi) => { @@ -64,7 +84,12 @@ startListening({ }, }) -// save fetched mne +/** + * #3 + * Fetch & receive json + * + * Triggered by #2 + */ startListening({ predicate: (action) => setSelectedMne.match(action), effect: async (action, listenerApi) => { diff --git a/react-ui/src/components/devices/routines/plugin.routine.ts b/react-ui/src/components/devices/routines/plugin.routine.ts new file mode 100644 index 0000000000000000000000000000000000000000..ece4608f7ba8caf8a0d25558ca37532d25e6a6eb --- /dev/null +++ b/react-ui/src/components/devices/routines/plugin.routine.ts @@ -0,0 +1,36 @@ +import { PluginInternalServiceGetAvailablePluginsApiArg, api } from "@api/api" +import { warnMessage } from "@helper/debug" +import { createAsyncThunk } from "@reduxjs/toolkit" +import { RootState } from "src/stores" +import { setPlugins } from "../reducer/plugin.reducer" + +const FETCH_PLUGIN_ACTION = 'subscription/plugin/fetchPlugins' + + +export const fetchPluginsThunk = createAsyncThunk( + FETCH_PLUGIN_ACTION, + async (_, thunkApi) => { + const { user } = thunkApi.getState() as RootState + + if (!user.user?.roles) { + warnMessage('Plugin fetch was triggered but user data is not presence') + return + } + + const payload: PluginInternalServiceGetAvailablePluginsApiArg = { + timestamp: new Date().getTime().toString(), + } + + + const plugins = await thunkApi.dispatch(api.endpoints.pluginInternalServiceGetAvailablePlugins.initiate(payload)) + + if (plugins.error || !plugins.data?.plugins) { + warnMessage('Plugin fetch returned an error: ' + plugins.error) + return + } + + thunkApi.dispatch( + setPlugins(plugins.data?.plugins) + ) + } +) \ No newline at end of file diff --git a/react-ui/src/components/devices/view/device.scss b/react-ui/src/components/devices/view/device.scss index 540cd4d01d67ba3e11b5e8d18c654dceb160ee95..7358cdcf45977dd521e27fbde902cee1b3fd12cd 100755 --- a/react-ui/src/components/devices/view/device.scss +++ b/react-ui/src/components/devices/view/device.scss @@ -6,7 +6,7 @@ } & tr:hover > td { - background-color: map-get($theme-colors, "primary::hover"); + background-color: map-get($theme-colors, "primary-hover"); cursor: pointer; } @@ -24,11 +24,6 @@ } } -.c-box { - padding: 2em !important; - padding-top: 1em !important; -} - .border-right { $border-padding: 2em; @@ -57,5 +52,44 @@ &.active { color: map-get($theme-colors, primary); font-weight: 500; + text-decoration: underline; + } +} +.transitions { + $transition-duration-hover: 0.1s; + $transition-duration-change: 0.2s; + transition: + --startOpacity $transition-duration-hover ease-in-out, + --startPosition $transition-duration-hover ease-in-out; +} + +@property --startOpacity { + syntax: "<number>"; + initial-value: 0.35; + inherits: false; +} + +@property --startPosition { + syntax: "<percentage>"; + initial-value: 10%; + inherits: false; +} + +.bg-gradient-fade { + $primary-color: map-get($theme-colors, "primary"); + background: linear-gradient( + to bottom, + rgba($primary-color, var(--startOpacity)) var(--startPosition), + rgba($primary-color, 0.1) 100% + ); + + &:hover { + --startOpacity: 0.4; + --startPosition: 30%; } } + +.disabled-hover:hover { + $primary-color: rgba(map-get($theme-colors, "dark"), 0.1); + background: linear-gradient(to bottom, rgb(223, 223, 223) 1%, white 100%); +} diff --git a/react-ui/src/components/devices/view/device.view.list.tsx b/react-ui/src/components/devices/view/device.view.list.tsx new file mode 100755 index 0000000000000000000000000000000000000000..868f26959038dc2b73ddb4d07c2ced774d3a3fd9 --- /dev/null +++ b/react-ui/src/components/devices/view/device.view.list.tsx @@ -0,0 +1,122 @@ +import { insertMarkTags } from "@helper/text"; +import { useAppSelector } from "@hooks"; +import DOMPurify from "dompurify"; +import { RefObject, useCallback, useRef } from "react"; +import { Col, OverlayTrigger, Row, Tooltip } from "react-bootstrap"; +import { useTranslation } from "react-i18next"; +import { Device } from "../reducer/device.reducer"; +import { useDeviceTableViewModel } from "../view_model/device.list.viewmodel"; + +const cropUUID = (uuid: string): string => { + return ( + uuid.substring(0, 3) + "..." + uuid.substring(uuid.length - 3, uuid.length) + ); +}; + +export const DeviceList = ({ + searchRef, +}: { + searchRef: RefObject<HTMLInputElement>; +}) => { + const { + devices, + pnds, + selected: selectedDevice, + } = useAppSelector((state) => state.device); + const { t } = useTranslation("common"); + const listRef = useRef<HTMLDivElement>(null); + const { dispatchDevice } = useDeviceTableViewModel(searchRef, listRef); + + const handleItemClick = useCallback((device: Device) => { + dispatchDevice(device); + }, []); + + const getDeviceList = useCallback(() => { + const search = searchRef?.current?.value; + let filtered = devices; + + if (search) { + filtered = devices.filter((device) => { + const user = pnds.find((pnd) => pnd.id === device.pid); + return ( + device.id?.includes(search) || + device.name?.includes(search) || + user?.name?.includes(search) + ); + }); + } + + return filtered.map((device) => { + const user = pnds.find((pnd) => pnd.id === device.pid); + const username = user?.name || ""; + const deviceId = device.id!; + const croppedId = cropUUID(deviceId); + const devicename = device.name || ""; + const isSelected = selectedDevice?.device.id === deviceId; + + return ( + <div + key={deviceId} + className={`border-bottom border-primary p-2 transitions ${isSelected && "bg-gradient-fade py-2"} ${!isSelected && "text-disabled disabled-hover"}`} + onClick={() => handleItemClick(device)} + > + <Row + className="align-items-center clickable" + onClick={() => handleItemClick(device)} + > + <Col xs={12} sm={5}> + <span + dangerouslySetInnerHTML={{ + __html: search + ? insertMarkTags(devicename, search) + : DOMPurify.sanitize(devicename), + }} + /> + </Col> + <Col xs={12} sm={3}> + <OverlayTrigger + overlay={<Tooltip id={deviceId}>{deviceId}</Tooltip>} + > + <span + className="text-gray-500" + dangerouslySetInnerHTML={{ + __html: search + ? insertMarkTags(croppedId, search) + : DOMPurify.sanitize(croppedId), + }} + /> + </OverlayTrigger> + </Col> + <Col xs={12} sm={4}> + <span + className="text-gray-500" + dangerouslySetInnerHTML={{ + __html: search + ? insertMarkTags(username, search) + : DOMPurify.sanitize(username), + }} + /> + </Col> + </Row> + </div> + ); + }); + }, [devices, searchRef, pnds, selectedDevice, handleItemClick]); + + return ( + <div className="rounded border border-primary mt-2"> + <Row className="border-bottom border-primary px-2 py-2 mx-0"> + <Col xs={12} sm={5}> + <span className="font-medium">{t("device.table.header.name")}</span> + </Col> + <Col xs={12} sm={3}> + <span className="font-medium">{t("device.table.header.uuid")}</span> + </Col> + <Col xs={12} sm={4}> + <span className="font-medium">{t("device.table.header.user")}</span> + </Col> + </Row> + <div ref={listRef}>{getDeviceList()}</div> + </div> + ); +}; diff --git a/react-ui/src/components/devices/view/device.view.table.tsx b/react-ui/src/components/devices/view/device.view.table.tsx deleted file mode 100755 index 312caab60d858b0931e50154c2c6e796e0405e47..0000000000000000000000000000000000000000 --- a/react-ui/src/components/devices/view/device.view.table.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import { useAppSelector } from "@hooks"; -import { MutableRefObject, useCallback } from "react"; -import { OverlayTrigger, Table, Tooltip } from "react-bootstrap"; -import { useTranslation } from "react-i18next"; -import { useDeviceTableViewModel } from "../view_model/device.table.viewmodel"; - -export const DeviceViewTable = (searchRef: MutableRefObject<HTMLInputElement>) => { - const { devices, pnds, selectedDevice } = useAppSelector(state => state.device); - const { t } = useTranslation('common'); - const { trClickHandler } = useDeviceTableViewModel(searchRef); - - - const cropUUID = (uuid: string): string => { - return uuid.substring(0, 3) + "..." + uuid.substring(uuid.length - 3, uuid.length); - } - - const getDeviceTable = useCallback(() => { - return devices.filter((device) => { - if (!searchRef.current?.value) { - return true; - } - - const searchInput = searchRef.current!.value; - const user = pnds.find(pnd => pnd.id === device.pid); - - return device.id.includes(searchInput) || device.name.includes(searchInput) || user?.name.includes(searchInput); - }).map((device, index) => { - const user = pnds.find(pnd => pnd.id === device.pid); - - return ( - <tr key={index} onClick={() => trClickHandler(device)} className={selectedDevice?.device.id === device.id ? 'active' : ''}> - <td>{device.name}</td> - <OverlayTrigger overlay={<Tooltip id={device.id}>{device.id}</Tooltip>}> - <td>{cropUUID(device.id)}</td> - </OverlayTrigger> - <td>{user?.name || ''}</td> - <td></td> - </tr> - ) - }) - }, [devices, searchRef, pnds, selectedDevice, trClickHandler]); - - - return ( - <Table striped responsive className="device-table"> - <thead> - <tr> - <th>{t('device.table.header.name')}</th> - <th>{t('device.table.header.uuid')}</th> - <th>{t('device.table.header.user')}</th> - <th>{t('device.table.header.last_updated')}</th> - </tr> - </thead> - <tbody> - {getDeviceTable()} - </tbody> - </Table> - ) -} \ No newline at end of file diff --git a/react-ui/src/components/devices/view/device.view.tabs.tsx b/react-ui/src/components/devices/view/device.view.tabs.tsx deleted file mode 100755 index 2929f9b64855359fa19ea9c0e17d90f5af79bb61..0000000000000000000000000000000000000000 --- a/react-ui/src/components/devices/view/device.view.tabs.tsx +++ /dev/null @@ -1,65 +0,0 @@ -import { useAppSelector } from "@hooks"; -import { JsonViewer } from "../../../shared/components/json_viewer/view/json_viewer.view"; -import { useDeviceTabsViewModel } from "../view_model/device.tabs.viewmodel"; - -export enum DeviceViewTabValues { - METADATA = 'metadata', - YANGMODEL = 'yang_model' -} - -export const DeviceViewTabs = (activeTab: DeviceViewTabValues) => { - const { selectedDevice } = useAppSelector(state => state.device); - const { jsonYang } = useDeviceTabsViewModel(); - - const metadataTab = () => { - return ( - <div> - {selectedDevice!.mne!.name} - </div> - ) - } - - const yangModelTab = () => { - return ( - <> - {jsonYang && - <JsonViewer json={jsonYang} /> - - //<ReactJson src={selectedDevice.json} name={false} collapsed={true} quotesOnKeys={false} /> - } - </> - ); - } - - const renderLoading = () => { - return ( - <div> - Loading... - </div> - ) - } - - const renderNoDeviceSelected = () => { - - return ( - <div> - No device selected - </div> - ) - } - - - return ( - <> - {selectedDevice?.mne ? ( - <> - {activeTab === DeviceViewTabValues.METADATA && metadataTab()} - {activeTab === DeviceViewTabValues.YANGMODEL && yangModelTab()} - </> - ) : - selectedDevice ? renderLoading() : renderNoDeviceSelected() - } - - </> - ); -} diff --git a/react-ui/src/components/devices/view/device.view.tsx b/react-ui/src/components/devices/view/device.view.tsx index 2602463bba8e51a8be7aff14b50008d0c9ad32ce..814f51db1c77123e5b285131e48e5c94c65f40ed 100755 --- a/react-ui/src/components/devices/view/device.view.tsx +++ b/react-ui/src/components/devices/view/device.view.tsx @@ -1,66 +1,91 @@ -import { useRef } from 'react'; -import { Button, Col, Container, Form, Nav, NavLink, Row } from 'react-bootstrap'; -import { useTranslation } from 'react-i18next'; -import { useDeviceViewModel } from '../view_model/device.viewmodel'; -import './device.scss'; -import { DeviceViewTable } from './device.view.table'; -import { DeviceViewTabs, DeviceViewTabValues } from './device.view.tabs'; +import { + faCircleInfo, + faPlus, + faServer, + faSliders, +} from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { GridLayout } from "@layout/grid.layout/grid.layout"; +import { GridBox } from "@shared/components/box/gridBox.view"; +import { JsonViewer } from "@shared/components/json_viewer/view/json_viewer.view"; +import { useRef } from "react"; +import { Button, Col, Form, Row } from "react-bootstrap"; +import { useTranslation } from "react-i18next"; +import { useDeviceViewModel } from "../view_model/device.viewmodel"; +import "./device.scss"; +import { DeviceList } from "./device.view.list"; +import { DeviceListCollapsable } from "./subcomponent/device.view.list-detail"; +import AddDeviceModal from "./subcomponent/modal.view"; -function DeviceView() { - const { t } = useTranslation('common'); - const searchRef = useRef<HTMLInputElement>(null); - const { activeTab, setActiveTab, handleActiveTabLink } = useDeviceViewModel(); +const DeviceView = () => { + const { t } = useTranslation("common"); + const searchRef = useRef<HTMLInputElement>(null); + const { jsonYang, openAddModal, closeModal, addModal } = useDeviceViewModel(); - return ( - <div className='m-4 pt-4'> - <Container fluid> - <Row> - <Col sm={5}> - <Container className='bg-white rounded c-box'> - <Row> - <Col sm={12} className='mt-4'><h3 className='text-black-50'>{t('device.title')}</h3></Col> - </Row> + return ( + <GridLayout> + <> + <div key="device-list"> + <GridBox title={t("device.box.list.title")} title_icon={faServer}> + <Row className="mb-3 align-items-center"> + <Col xs={12} md={6} lg={8}> + <Form.Group controlId="device.search"> + <Form.Control + type="text" + placeholder={t("device.search.placeholder")} + ref={searchRef} + /> + </Form.Group> + </Col> + <Col xs={12} md={6} lg={4} className="mt-3 mt-md-0 text-md-end"> + <Button + variant="primary::button" + className="btn-primary-button" + onClick={() => openAddModal()} + > + <FontAwesomeIcon icon={faPlus} className="me-2" /> + {t("device.add_device_button")} + </Button> - <Row className='align-items-center'> - <Col sm={6}> - <Form.Group controlId='device.search' className='p-0 mx-1 pt-2'> - <Form.Control type="text" placeholder={t('device.search.placeholder')} ref={searchRef} /> - </Form.Group> - </Col> - <Col sm={{ span: 3, offset: 3 }} className='pt-2'> - <Button variant='primary' className='w-100 my-auto'>{t('device.add_device_button')}</Button> - </Col> - </Row> + <AddDeviceModal show={addModal} onHide={() => closeModal()} /> + </Col> + </Row> + <Row> + <Col xs={12} className="h-auto"> + <DeviceList searchRef={searchRef} /> + </Col> + </Row> + </GridBox> + </div> - <Row className='align-items-start'> - <Col sm={12} className='pt-2'> - {DeviceViewTable(searchRef)} - </Col> - </Row> - </Container> - </Col> - <Col sm={7}> - <Container className='bg-white rounded c-box'> - <Row> - <Col sm={12} className='mt-4'> - <Nav className='justify-content-around'> - <NavLink className={handleActiveTabLink(DeviceViewTabValues.METADATA) + " tab-links"} onClick={() => setActiveTab(DeviceViewTabValues.METADATA)}>{t('device.tabs.metadata.title')}</NavLink> - <NavLink className={handleActiveTabLink(DeviceViewTabValues.YANGMODEL) + " tab-links"} onClick={() => setActiveTab(DeviceViewTabValues.YANGMODEL)}>{t('device.tabs.yang_model.title')}</NavLink> - </Nav> - </Col> - </Row> + <div key="device-metadata"> + <GridBox + title={t("device.box.information.title")} + title_icon={faCircleInfo} + > + <Row> + <Col xs={12}> + <DeviceListCollapsable + search={searchRef.current?.value || ""} + /> + </Col> + </Row> + </GridBox> + </div> - <Row className='align-items-start'> - <Col sm={12} className='pt-2'> - {DeviceViewTabs(activeTab)} - </Col> - </Row> - </Container> - </Col> - </Row> - </Container> + <div key="device-details"> + <GridBox + title={t("device.box.configuration.title")} + title_icon={faSliders} + > + <Row> + <Col xs={12}>{jsonYang && <JsonViewer json={jsonYang} />}</Col> + </Row> + </GridBox> </div> - ) -} + </> + </GridLayout> + ); +}; -export default DeviceView +export default DeviceView; diff --git a/react-ui/src/components/devices/view/subcomponent/device.view.list-detail.tsx b/react-ui/src/components/devices/view/subcomponent/device.view.list-detail.tsx new file mode 100644 index 0000000000000000000000000000000000000000..ba146d782e4ce583c3d7bbc48173e02d44cad2e2 --- /dev/null +++ b/react-ui/src/components/devices/view/subcomponent/device.view.list-detail.tsx @@ -0,0 +1,87 @@ +import { faChevronDown, faHashtag, faUser } from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { insertMarkTags } from "@helper/text"; +import { useAppSelector } from "@hooks"; +import { JsonViewer } from "@shared/components/json_viewer/view/json_viewer.view"; +import DOMPurify from 'dompurify'; +import { useState } from "react"; +import { Collapse } from "react-bootstrap"; + +interface DeviceListCollapsableProps { + search?: string, +} + +enum Collapsables { + Metadata = 1, + Config = 2 +} + +export const DeviceListCollapsable = ({ search }: DeviceListCollapsableProps) => { + const { selected } = useAppSelector(state => state.device); + const [collapseable, setCollapsable] = useState<Collapsables | undefined>(undefined) + + const username = selected?.device.name || ""; + const deviceId = selected?.device.id || ""; + const json = selected?.json || {} + + const metadataKey = Object.keys(json).at(2) as keyof typeof json + const metadataObject = json[metadataKey] as JSON || {}; + + const configKey = Object.keys(json).at(0) as keyof typeof json + const configObject = json[configKey] as JSON || {}; + + + const setCollapsed = (prev: Collapsables) => { + const next = collapseable === prev ? undefined : prev; + setCollapsable(next); + } + + return ( + <div id={`collapse-${deviceId}`}> + <div className="pb-4 pt-1 d-flex flex-column gap-1" > + <div className="d-flex justify-content-between"> + <div> + <FontAwesomeIcon className="me-2" icon={faHashtag} /> + UUID: + </div> + <span dangerouslySetInnerHTML={{ + __html: search ? insertMarkTags(deviceId, search) : DOMPurify.sanitize(deviceId) + }} /> + </div> + <div className="d-flex justify-content-between"> + <div> + <FontAwesomeIcon className="me-2" icon={faUser} /> + User: + </div> + <span>{username}</span> + </div> + + <div className="d-flex justify-content-between clickable border-top border-dark mt-3 pt-3" aria-expanded={collapseable === Collapsables.Metadata} onClick={() => setCollapsed(Collapsables.Metadata)}> + <div> + <FontAwesomeIcon icon={faChevronDown} rotation={collapseable === Collapsables.Metadata ? undefined : 270} /> + Metadata + </div> + </div> + + <Collapse in={collapseable === Collapsables.Metadata}> + <div id={`collapse-${deviceId}`}> + {JsonViewer({ json: metadataObject, options: { editable: false, searchEnabled: false } })} + </div> + </Collapse> + + <div className="d-flex justify-content-between clickable mt-3" aria-expanded={collapseable === Collapsables.Config} onClick={() => setCollapsed(Collapsables.Config)}> + <div> + <FontAwesomeIcon icon={faChevronDown} rotation={collapseable === Collapsables.Config ? undefined : 270} /> + Config + </div> + </div> + + <Collapse in={collapseable === Collapsables.Config}> + <div id={`collapse-${deviceId}`}> + {JsonViewer({ json: configObject, options: { editable: false, searchEnabled: false } })} + </div> + </Collapse> + </div> + </div > + ) +} \ No newline at end of file diff --git a/react-ui/src/components/devices/view/subcomponent/modal.view.tsx b/react-ui/src/components/devices/view/subcomponent/modal.view.tsx new file mode 100644 index 0000000000000000000000000000000000000000..fd59364126c899baf67da2081de49bff879c8f0a --- /dev/null +++ b/react-ui/src/components/devices/view/subcomponent/modal.view.tsx @@ -0,0 +1,162 @@ +import { useModalViewModel } from "@component/devices/view_model/modal.viewmodel"; +import { useAppSelector } from "@hooks"; +import React from "react"; +import { Alert, Button, Form, Modal } from "react-bootstrap"; +import { useTranslation } from "react-i18next"; + +interface AddDeviceModalProps { + show: boolean; + onHide: () => void; +} + +const AddDeviceModal: React.FC<AddDeviceModalProps> = ({ show, onHide }) => { + const { loading, register, handleSubmit, errors } = useModalViewModel({ + hide: onHide, + }); + const { plugins } = useAppSelector((state) => state.plugin); + const { t } = useTranslation("common"); + + return ( + <Modal show={show} onHide={onHide} centered size="lg"> + <Modal.Header closeButton> + <Modal.Title>{t("device.add_device.title")}</Modal.Title> + </Modal.Header> + <Modal.Body> + {errors.root && ( + <Alert variant="danger" className="mt-3"> + {errors.root.message || t("device.add_device.error")} + </Alert> + )} + <Form onSubmit={handleSubmit}> + <Form.Group className="mb-3"> + <Form.Label> + {t("device.add_device.fields.mne_name.label")} + </Form.Label> + <Form.Control + type="text" + placeholder={t("device.add_device.fields.mne_name.placeholder")} + isInvalid={!!errors.mneName} + {...register("mneName", { + required: t("device.add_device.fields.mne_name.required"), + })} + /> + <Form.Control.Feedback type="invalid"> + {errors.mneName?.message} + </Form.Control.Feedback> + </Form.Group> + <Form.Group className="mb-3"> + <Form.Label> + {t("device.add_device.fields.address.label")} + </Form.Label> + <Form.Control + type="text" + placeholder={t("device.add_device.fields.address.placeholder")} + isInvalid={!!errors.address} + {...register("transportOption.address", { + required: t("device.add_device.fields.address.required"), + })} + /> + <Form.Control.Feedback type="invalid"> + {errors.address?.message} + </Form.Control.Feedback> + </Form.Group> + + <Form.Group className="mb-3"> + <Form.Label> + {t("device.add_device.fields.plugin.label")} + </Form.Label> + <Form.Control + as="select" + isInvalid={!!errors.pluginId} + {...register("pluginId", { + required: t("device.add_device.fields.plugin.required"), + })} + > + <option value=""> + {t("device.add_device.fields.plugin.placeholder")} + </option> + {plugins.map((plugin) => ( + <option key={plugin.id} value={plugin.id}> + {plugin.manifest?.name} + </option> + ))} + </Form.Control> + <Form.Control.Feedback type="invalid"> + {errors.pluginId?.message} + </Form.Control.Feedback> + </Form.Group> + + <Form.Group className="mb-3"> + <Form.Check + type="checkbox" + label={t("device.add_device.fields.tls.label")} + {...register("transportOption.tls")} + /> + </Form.Group> + + <h5 className="mt-4"> + {t("device.add_device.fields.credentials.title")} + </h5> + <Form.Group className="mb-3"> + <Form.Label> + {t("device.add_device.fields.credentials.username.label")} + </Form.Label> + <Form.Control + type="text" + placeholder={t( + "device.add_device.fields.credentials.username.placeholder", + )} + isInvalid={!!errors.transportOption?.username} + {...register("transportOption.username", { + required: t( + "device.add_device.fields.credentials.username.required", + ), + })} + /> + <Form.Control.Feedback type="invalid"> + {errors.transportOption?.username?.message} + </Form.Control.Feedback> + </Form.Group> + + <Form.Group className="mb-3"> + <Form.Label> + {t("device.add_device.fields.credentials.password.label")} + </Form.Label> + <Form.Control + type="password" + placeholder={t( + "device.add_device.fields.credentials.password.placeholder", + )} + isInvalid={!!errors.transportOption?.password} + {...register("transportOption.password", { + required: t( + "device.add_device.fields.credentials.password.required", + ), + })} + /> + <Form.Control.Feedback type="invalid"> + {errors.transportOption?.password?.message} + </Form.Control.Feedback> + </Form.Group> + + <div className="d-flex justify-content-end gap-2"> + <Button variant="secondary" onClick={onHide}> + {t("device.add_device.buttons.cancel")} + </Button> + <Button disabled={loading} variant="primary" type="submit"> + {loading ? ( + <> + <span className="spinner-border spinner-border-sm me-2" /> + {t("device.add_device.buttons.loading")} + </> + ) : ( + t("device.add_device.buttons.submit") + )} + </Button> + </div> + </Form> + </Modal.Body> + </Modal> + ); +}; +export default AddDeviceModal; diff --git a/react-ui/src/components/devices/view_model/device.list.viewmodel.ts b/react-ui/src/components/devices/view_model/device.list.viewmodel.ts new file mode 100755 index 0000000000000000000000000000000000000000..77ba8ddea057a8d98b4252c62f0a3a01d91969ad --- /dev/null +++ b/react-ui/src/components/devices/view_model/device.list.viewmodel.ts @@ -0,0 +1,104 @@ +import { Device, setSelectedDevice } from "@component/devices/reducer/device.reducer"; +import { faCopy } from "@fortawesome/free-solid-svg-icons"; +import { useAppDispatch } from "@hooks"; +import { useMenu } from "@provider/menu/menu.provider"; +import { useUtils } from "@provider/utils.provider"; +import { useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; +import { toast } from "react-toastify"; + +export const useDeviceTableViewModel = (searchRef, listRef) => { + const [searchTerm, setSearchTerm] = useState(''); + const dispatch = useAppDispatch(); + const { subscribe } = useMenu(); + const { toClipboard } = useUtils(); + const { t } = useTranslation('common'); + + + const registerMenuOptions = () => { + const subscription = subscribe!({ + target: listRef.current, + actions: [ + { + key: t('device.table.actions.copy'), + icon: faCopy, + action: (clickedElement) => { + if (clickedElement) { + const text = clickedElement.dataset.copyValue + if (!text) { + toast.warn(t('global.toast.copied_failed')) + return + } + + + toClipboard(text) + } + } + }, + + { + key: t('device.table.actions.copy_row'), + icon: faCopy, + action: (clickedElement) => { + let parent = clickedElement; + while (parent && parent.tagName !== 'TR') { + parent = parent.parentNode; + } + + const text = parent.dataset.copyValue + if (!text) { + toast.warn(t('global.toast.copied_failed')) + return + } + toClipboard(text) + } + } + ] + }) + + return () => { + subscription.unsubscribe() + } + } + + useEffect(() => { + if (!subscribe || !listRef?.current) { + return + } + + const unsubscribe = registerMenuOptions() + + return () => { + unsubscribe() + } + }, [listRef, subscribe]) + + + useEffect(() => { + if (!searchRef?.current) { + return + } + + const handleSearchChange = () => { + setSearchTerm(searchRef.current.value); + }; + + searchRef.current.addEventListener('input', handleSearchChange); + + return () => { + if (searchRef.current) { + searchRef.current.removeEventListener('input', handleSearchChange); + } + }; + }, [searchRef]); + + const dispatchDevice = (device: Device) => { + dispatch(setSelectedDevice({ device })); + } + + + return { + searchTerm, + dispatchDevice + } +} \ No newline at end of file diff --git a/react-ui/src/components/devices/view_model/device.table.viewmodel.ts b/react-ui/src/components/devices/view_model/device.table.viewmodel.ts deleted file mode 100755 index df75953288d659c17a53a744c7c4ba015f0dcab9..0000000000000000000000000000000000000000 --- a/react-ui/src/components/devices/view_model/device.table.viewmodel.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Device, setSelectedDevice } from "@component/devices/reducer/device.reducer"; -import { useAppDispatch } from "@hooks"; -import { useEffect, useState } from "react"; - -export const useDeviceTableViewModel = (searchRef) => { - const [searchTerm, setSearchTerm] = useState(''); - const dispatch = useAppDispatch(); - - - useEffect(() => { - const handleSearchChange = () => { - if (searchRef.current) { - setSearchTerm(searchRef.current.value); - } - }; - - if (searchRef.current) { - searchRef.current.addEventListener('input', handleSearchChange); - } - - return () => { - if (searchRef.current) { - searchRef.current.removeEventListener('input', handleSearchChange); - } - }; - }, []); - - const trClickHandler = (device: Device) => { - dispatch(setSelectedDevice(device)); - } - - - return { - searchTerm, - trClickHandler - } -} \ No newline at end of file diff --git a/react-ui/src/components/devices/view_model/device.tabs.viewmodel.ts b/react-ui/src/components/devices/view_model/device.tabs.viewmodel.ts deleted file mode 100755 index 4a60567b68e78e571577d7f74fb0729df47008cb..0000000000000000000000000000000000000000 --- a/react-ui/src/components/devices/view_model/device.tabs.viewmodel.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { useAppSelector } from '@hooks' -import { useMemo } from 'react' - -export enum DeviceViewTabValues { - METADATA = 'metadata', - YANGMODEL = 'yang_model', -} - -export const useDeviceTabsViewModel = () => { - const { selectedDevice } = useAppSelector((state) => state.device) - - const getYangModelJSON = (): JSON | null => { - if (!selectedDevice?.json) { - return null - } - - const key = Object.keys(selectedDevice.json).at(1) as keyof typeof selectedDevice.json - const innerJson = selectedDevice.json[key] - - if (!(innerJson instanceof Object)) { - return null - } - - return innerJson - } - - const jsonYang = useMemo<JSON | null>(getYangModelJSON, [selectedDevice]) - - return { - jsonYang, - } -} diff --git a/react-ui/src/components/devices/view_model/device.viewmodel.ts b/react-ui/src/components/devices/view_model/device.viewmodel.ts index 9a0fbe17a0b8f3bf0aa5c00e8ef10a9d56b4a08d..5c4acc6619f1f7156e85ef7b5f393a29dee09276 100755 --- a/react-ui/src/components/devices/view_model/device.viewmodel.ts +++ b/react-ui/src/components/devices/view_model/device.viewmodel.ts @@ -1,25 +1,43 @@ -import { setActiveTab as setActiveTabState } from '@component/devices/reducer/device.reducer' import { useAppDispatch, useAppSelector } from '@hooks' -import { DeviceViewTabValues } from '@view/device/device.view.tabs' -import { useEffect } from 'react' +import { useMemo, useState } from 'react' +import { fetchPluginsThunk } from '../routines/plugin.routine' export const useDeviceViewModel = () => { - const { activeTab } = useAppSelector((state) => state.device) + const [addModal, setAddModal] = useState<boolean>(false) + const { selected: selectedDevice } = useAppSelector((state) => state.device) const dispatch = useAppDispatch() - useEffect(() => {}, []) + const openAddModal = () => { + dispatch(fetchPluginsThunk()) + setAddModal(true) + } - const handleActiveTabLink = (tabLink: DeviceViewTabValues) => { - return activeTab === tabLink ? 'active' : '' + const closeModal = () => { + setAddModal(false) } - const setActiveTab = (tab: DeviceViewTabValues) => { - dispatch(setActiveTabState(tab)) + const getYangModelJSON = (): JSON | null => { + if (!selectedDevice?.json) { + return null + } + + const key = Object.keys(selectedDevice.json).at(1) as keyof typeof selectedDevice.json + const innerJson = selectedDevice.json[key] + + if (!(innerJson instanceof Object)) { + return null + } + + return innerJson } + const jsonYang = useMemo<JSON | null>(getYangModelJSON, [selectedDevice]) + return { - activeTab, - setActiveTab, - handleActiveTabLink, + jsonYang, + selectedDevice, + openAddModal, + closeModal, + addModal } } diff --git a/react-ui/src/components/devices/view_model/modal.viewmodel.ts b/react-ui/src/components/devices/view_model/modal.viewmodel.ts new file mode 100644 index 0000000000000000000000000000000000000000..98742bd3495ba6ced883402a7d8dbbcf4e22f9ba --- /dev/null +++ b/react-ui/src/components/devices/view_model/modal.viewmodel.ts @@ -0,0 +1,94 @@ +import { NetworkelementAddListRequest, NetworkelementSetMne, useNetworkElementServiceAddListMutation } from "@api/api"; +import { useAppDispatch, useAppSelector } from "@hooks"; +import { fetchUser } from "@shared/routine/user.routine"; +import { useState } from "react"; +import { SubmitHandler, useForm } from "react-hook-form"; +import { useTranslation } from "react-i18next"; +import { toast } from "react-toastify"; + +interface FormData { + address: string; + mneName: string; + pluginId: string; + transportOption: { + address: string; + username: string; + password: string; + tls: boolean; + gnmiTransportOption: Object; + }; + gnmiSubscribePaths: string[]; +} + +type ModalViewModelType = { + hide: () => void +} + +export const useModalViewModel = ({ hide }: ModalViewModelType) => { + const dispatch = useAppDispatch() + const [addNetworkElement] = useNetworkElementServiceAddListMutation(); + const [loading, setLoading] = useState<boolean>(false) + const { t } = useTranslation('common') + + const { + register, + handleSubmit, + setError, + clearErrors, + formState: { errors }, + reset: resetModal + } = useForm<FormData>(); + + const { user } = useAppSelector(state => state.user); + + const reset = () => { resetModal(); hide(); } + const success = () => { toast.success(t('device.add_device.success')); reset(); dispatch(fetchUser()) } + + + const onSubmit: SubmitHandler<FormData> = async (data) => { + clearErrors() + setLoading(true) + const mne: NetworkelementSetMne = { + ...data, + gnmiSubscribePaths: [], + transportOption: { + ...data.transportOption, + gnmiTransportOption: {}, + } + } + + if (!user?.id) { + toast.error("global.error.missing_user") + return + } + + const request: NetworkelementAddListRequest = { + timestamp: Date.now().toString(), + mne: [mne], + pid: user.id + }; + + try { + const response = await addNetworkElement({ networkelementAddListRequest: request }); + setLoading(false) + + if (response.error) { + const error = response.error as any + setError('root', error.data) + return + } + + success() + } catch (error) { + setError('root', error?.data?.message || undefined) + } + } + + return { + onSubmit, + handleSubmit: handleSubmit(onSubmit), + register, + errors, + loading + } +} \ No newline at end of file diff --git a/react-ui/src/components/login/layouts/login.layout.tsx b/react-ui/src/components/login/layouts/login.layout.tsx index 556dc6de436397b283bd426041b1d08749cf505a..58e8fc99133d8674b57c7d39f06e40da2c9f03e4 100755 --- a/react-ui/src/components/login/layouts/login.layout.tsx +++ b/react-ui/src/components/login/layouts/login.layout.tsx @@ -20,4 +20,6 @@ export const LoginLayout = () => { return ( <LoginView>{outlet}</LoginView> ) -} \ No newline at end of file +} + +export default LoginLayout \ No newline at end of file diff --git a/react-ui/src/components/login/view/login.view.tsx b/react-ui/src/components/login/view/login.view.tsx index 03d7406f42bc37a78f9e6047f4aa70758e8b8258..6b782e8779abdd754158d9b565fd78fdec5c4344 100755 --- a/react-ui/src/components/login/view/login.view.tsx +++ b/react-ui/src/components/login/view/login.view.tsx @@ -1,10 +1,10 @@ -import logo from '@assets/logo.svg' -import { BasicProp } from '@helper/interfaces' +import { BasicProp } from '@shared/types/interfaces.type' import React, { useRef } from 'react' import { Alert, Button, Col, Container, Form, Image, Row, Spinner } from 'react-bootstrap' import { useTranslation } from 'react-i18next' import useLoginViewModel from '../viewmodel/login.viewmodel' import './login.scss' +import logo from '/public/logo.svg' const LoginView: React.FC<BasicProp> = () => { const { t } = useTranslation('common') @@ -31,7 +31,7 @@ const LoginView: React.FC<BasicProp> = () => { <Image src={logo} alt="logo" height={150} /> </Row> <Row className="mt-2 justify-content-center"> - <Col md={6} sm={10} className="c-box p-4"> + <Col md={6} sm={10} className="c-box p-4 bg-white"> <h1 className="text-center h2">goSDN - Web</h1> {handleErrorMessageRendering(invalidForm, invalidCredentials)} diff --git a/react-ui/src/components/login/viewmodel/login.viewmodel.ts b/react-ui/src/components/login/viewmodel/login.viewmodel.ts index 60c39b55ab7efe77b90fe5c449504f1d1193e2e6..fabb0a8613cfee92f864beef15a998dda159238f 100755 --- a/react-ui/src/components/login/viewmodel/login.viewmodel.ts +++ b/react-ui/src/components/login/viewmodel/login.viewmodel.ts @@ -7,9 +7,9 @@ export interface PageLoginState { } export default function useLoginViewModel() { - const {login, loginProperties} = useAuth(); - const {isLoading: loginLoading, error: loginError, reset: resetLogin} = loginProperties!; - + const { login, loginProperties } = useAuth(); + const { isLoading: loginLoading, error: loginError, reset: resetLogin } = loginProperties; + const [localFormState, updateLocalFormState] = useState({ submitted: false, valid: false, diff --git a/react-ui/src/i18n/locales/en/translations.json b/react-ui/src/i18n/locales/en/translations.json index 46b76563c7d78355e9484e49d344f4132bf3766d..8a81a03e9c7b11ad84263a385ef38bd01c2d3d10 100755 --- a/react-ui/src/i18n/locales/en/translations.json +++ b/react-ui/src/i18n/locales/en/translations.json @@ -6,10 +6,17 @@ "empty_field": "This field can´t be empty" }, "toast": { - "copied": "Copied to clipboard" + "copied": "Copied to clipboard", + "copied_failed": "Copying to clipboard failed" }, "menu_item": { "logout": "Logout" + }, + "box": { + "lastUpdate": "Last updated {{seconds}} seconds ago" + }, + "error": { + "missing_user": "Error: User information. Please relogin and try it again" } }, "json_viewer": { @@ -28,27 +35,76 @@ } }, "device": { - "title": "Device list", + "box": { + "list": { + "title": "Devices" + }, + "information": { + "title": "Information" + }, + "configuration": { + "title": "Configuration" + } + }, + "add_device": { + "success": "Device successfully added", + "title": "Add New Device", + "error": "An error occurred on save", + "fields": { + "address": { + "label": "IPv4 address", + "placeholder": "172.100.0.1", + "required": "Ipv4 Address is required" + }, + "mne_name": { + "label": "MNE Name", + "placeholder": "Enter MNE name", + "required": "MNE name is required" + }, + "plugin": { + "label": "Plugin", + "placeholder": "Select plugin...", + "required": "Plugin selection is required" + }, + "tls": { + "label": "TLS Enabled" + }, + "credentials": { + "title": "Credentials", + "username": { + "label": "Username", + "placeholder": "Enter username", + "required": "Username is required" + }, + "password": { + "label": "Password", + "placeholder": "Enter password", + "required": "Password is required" + } + } + }, + "buttons": { + "cancel": "Cancel", + "submit": "Add Device", + "loading": "Adding..." + } + }, "table": { "header": { "name": "Name", "uuid": "UUID", "user": "User", "last_updated": "Last updated" + }, + "actions": { + "copy": "Copy", + "copy_row": "Copy row" } }, "search": { "placeholder": "Search" }, - "add_device_button": "Add device", - "tabs": { - "metadata": { - "title": "Metadata" - }, - "yang_model": { - "title": "YANG Model" - } - } + "add_device_button": "Add device" }, "protected": { "link": { diff --git a/react-ui/src/index.scss b/react-ui/src/index.scss index 8dd280e6436cf6df71772494e87cdd950872f16b..610261473b771dcbdb508afe81966f54237cbaff 100755 --- a/react-ui/src/index.scss +++ b/react-ui/src/index.scss @@ -1,9 +1,16 @@ -@import './shared/style/index.scss'; +@import "./shared/style/index.scss"; +@import "./shared/style/colors.scss"; body { margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - background-color: map-get($theme-colors, bg-primary) !important; + // background-color: map-get($theme-colors, bg-primary) !important; + + background: linear-gradient( + to top, + rgba(lighten(map-get($map: $theme-colors, $key: primary), 20%), 0.1) 0%, + rgba(map-get($map: $theme-colors, $key: bg-primary), 0.9) 90% + ); } diff --git a/react-ui/src/index.tsx b/react-ui/src/index.tsx index 8383248cea22fc89c4ba1c9f5248458f7fa150ec..7d6cfe0ac8c3e70a5bb2a15e7701f5e4f62be12c 100755 --- a/react-ui/src/index.tsx +++ b/react-ui/src/index.tsx @@ -1,9 +1,11 @@ import { UtilsProvider } from '@provider/utils.provider' +import AnimatedBackground from '@shared/components/background/background.view' import i18next from 'i18next' import React from 'react' import ReactDOM from 'react-dom/client' import { ErrorBoundary } from "react-error-boundary" import { I18nextProvider } from 'react-i18next' +import { SkeletonTheme } from 'react-loading-skeleton' import { Provider } from 'react-redux' import { RouterProvider @@ -13,24 +15,28 @@ import { PersistGate } from 'redux-persist/integration/react' import './i18n/config' import './index.scss' import { router } from './routes' -import './shared/icons/icons' import { persistor, store } from './stores' +window.env = window.location.hostname === 'localhost' ? 'development' : 'production'; ReactDOM.createRoot(document.getElementById("root")).render( <React.StrictMode> - <ErrorBoundary fallback={<div>Something went wrong</div>}> - <Provider store={store}> - <PersistGate loading={null} persistor={persistor}> - <I18nextProvider i18n={i18next}> - <UtilsProvider> - <ToastContainer /> - <RouterProvider router={router} /> - </UtilsProvider> - </I18nextProvider> - </PersistGate> - </Provider> - </ErrorBoundary> + <AnimatedBackground> + <ErrorBoundary fallback={<div>Something went wrong</div>}> + <SkeletonTheme height="2em" > + <Provider store={store}> + <PersistGate loading={null} persistor={persistor}> + <I18nextProvider i18n={i18next}> + <UtilsProvider> + <ToastContainer /> + <RouterProvider router={router} /> + </UtilsProvider> + </I18nextProvider> + </PersistGate> + </Provider> + </SkeletonTheme> + </ErrorBoundary> + </AnimatedBackground> </React.StrictMode> ); diff --git a/react-ui/src/routes.tsx b/react-ui/src/routes.tsx index 368df55a472bdbc20bc2dd34bb9fb1f33b43047f..a476feaaedfd8922a1841bd6f877792416856f13 100755 --- a/react-ui/src/routes.tsx +++ b/react-ui/src/routes.tsx @@ -1,21 +1,50 @@ import { BasicLayout } from "@layout/basic.layout"; import { ProtectedLayout } from "@layout/protected.layout/protected.layout"; +import DelayedRender, { SplashScreen } from "@utils/loading-fallback"; +import { lazy, Suspense } from 'react'; import { createBrowserRouter, createRoutesFromElements, Navigate, Route } from "react-router-dom"; -import DeviceView from "./components/devices/view/device.view"; -import { LoginLayout } from "./components/login/layouts/login.layout"; export const DEVICE_URL = '/device/'; export const LOGIN_URL = '/login'; +// Lazy load components +const DeviceView = lazy(() => import('./components/devices/view/device.view')); +const LoginLayout = lazy(() => import('./components/login/layouts/login.layout')); export const router = createBrowserRouter( createRoutesFromElements( <Route element={<BasicLayout />}> - <Route path={LOGIN_URL} element={<LoginLayout />} /> + <Route + path={LOGIN_URL} + element={ + <Suspense fallback={null}> + <DelayedRender> + <LoginLayout /> + </DelayedRender> + </Suspense> + } + /> <Route element={<ProtectedLayout />}> - <Route path={DEVICE_URL} element={<DeviceView />} /> - <Route path="/" element={<Navigate to={DEVICE_URL} replace={true} />} /> + <Route + path={DEVICE_URL} + element={ + <DelayedRender + loading={{ + minimumLoadingTime: 1000, + component: SplashScreen + }} + > + <Suspense fallback={null}> + <DeviceView /> + </Suspense> + </DelayedRender> + } + /> + <Route + path="/" + element={<Navigate to={DEVICE_URL} replace={true} />} + /> </Route> - </Route> + </Route > ) -) \ No newline at end of file +); \ No newline at end of file diff --git a/react-ui/src/shared/api/api.ts b/react-ui/src/shared/api/api.ts index 32969f1686479812253d387868a9350bd41a882c..e0f35f0b7c2db79d9eb066c2d7a1375642292b7d 100755 --- a/react-ui/src/shared/api/api.ts +++ b/react-ui/src/shared/api/api.ts @@ -4,6 +4,7 @@ export const addTagTypes = [ 'ConfigurationManagementService', 'AuthService', 'NetworkElementService', + 'PluginInternalService', 'PndService', 'RoleService', 'RoutingTableService', @@ -214,6 +215,18 @@ const injectedRtkApi = api }), invalidatesTags: ['NetworkElementService'], }), + pluginInternalServiceGetAvailablePlugins: build.query< + PluginInternalServiceGetAvailablePluginsApiResponse, + PluginInternalServiceGetAvailablePluginsApiArg + >({ + query: (queryArg) => ({ + url: `/plugins`, + params: { + timestamp: queryArg.timestamp, + }, + }), + providesTags: ['PluginInternalService'], + }), pndServiceGetPnd: build.query< PndServiceGetPndApiResponse, PndServiceGetPndApiArg @@ -680,6 +693,11 @@ export type NetworkElementServiceUpdateApiResponse = export type NetworkElementServiceUpdateApiArg = { networkelementUpdateNetworkElementRequest: TodoChangeNameToFitTheRest } +export type PluginInternalServiceGetAvailablePluginsApiResponse = + /** status 200 A successful response. */ GosdnpluginRegistryGetResponse +export type PluginInternalServiceGetAvailablePluginsApiArg = { + timestamp?: string +} export type PndServiceGetPndApiResponse = /** status 200 A successful response. */ PndGetPndResponse export type PndServiceGetPndApiArg = { @@ -1183,6 +1201,11 @@ export type TodoChangeNameToFitTheRest = { timestamp?: string networkElement?: NetworkelementManagedNetworkElement } +export type GosdnpluginRegistryGetResponse = { + /** Timestamp in nanoseconds since Epoch. */ + timestamp?: string + plugins?: PluginRegistryPlugin[] +} export type PndGetPndResponse = { /** Timestamp in nanoseconds since Epoch. */ timestamp?: string @@ -1432,6 +1455,7 @@ export const { useNetworkElementServiceGetIntendedPathQuery, useNetworkElementServiceGetPathQuery, useNetworkElementServiceUpdateMutation, + usePluginInternalServiceGetAvailablePluginsQuery, usePndServiceGetPndQuery, usePndServiceGetPndListQuery, usePndServiceCreatePndListMutation, diff --git a/react-ui/src/shared/components/background/background.view.tsx b/react-ui/src/shared/components/background/background.view.tsx new file mode 100644 index 0000000000000000000000000000000000000000..27cf56cebe2fe345a6302762e14975aaf79a57b6 --- /dev/null +++ b/react-ui/src/shared/components/background/background.view.tsx @@ -0,0 +1,92 @@ +import { useEffect, useRef, useState } from 'react'; + +const AnimatedBackground = ({ children }) => { + const containerRef = useRef(null); + const [linePaths, setLinePaths] = useState([]); + + useEffect(() => { + const updatePaths = () => { + if (containerRef.current) { + const box = containerRef.current.getBoundingClientRect(); + const width = box.width; + const height = box.height; + + // Calculate starting points and angles for parallel lines + const startX = width * 0; // Start from right side + const startY = height * 0.9; // Start from bottom + const endX = width * 1.2; // End at 30% of width + const endY = height * -0.3; // End at 30% of height + const spacing = 80; // 2em spacing between lines + + // Calculate angle and offsets + const angle = Math.atan2(startY - endY, startX - endX); + const xOffset = spacing * Math.sin(angle); + const yOffset = spacing * Math.cos(angle); + + // Create 5 parallel lines + const paths = Array.from({ length: 7 }).map((_, index) => { + const startXOffset = index * xOffset; + const startYOffset = index * yOffset; + + return `M ${startX - startXOffset} ${startY - startYOffset} + L ${endX - startXOffset} ${endY - startYOffset}`; + }); + + setLinePaths(paths); + } + }; + + updatePaths(); + window.addEventListener('resize', updatePaths); + return () => window.removeEventListener('resize', updatePaths); + }, []); + + return ( + <div ref={containerRef} className="position-relative min-vh-100"> + + {/* Animated lines */} + <div className="position-absolute w-100 h-100"> + <svg className="w-100 h-100"> + {linePaths.map((path, index) => ( + <g key={index}> + {/* Background line */} + {/* Animated border */} + <path + d={path} + fill="none" + stroke={`${index % 2 === 0 ? 'rgba(179, 80, 224, 0.4)' : 'rgba(150, 50, 190, .2)'}`} + strokeWidth="2" + strokeLinecap="round" + strokeDasharray="40 240" + style={{ + animation: `dash ${0.4 * index + 20}s linear infinite`, + }} + /> + </g> + ))} + </svg> + </div> + + {/* Content container */} + <div className="position-relative" style={{ zIndex: 10 }}> + {children} + </div> + + <style> + {` + @keyframes dash { + from { + stroke-dashoffset: 280; + } + to { + stroke-dashoffset: -280; + } + } + + `} + </style> + </div> + ); +}; + +export default AnimatedBackground; \ No newline at end of file diff --git a/react-ui/src/shared/components/box/gridBox.view.scss b/react-ui/src/shared/components/box/gridBox.view.scss new file mode 100644 index 0000000000000000000000000000000000000000..f247f654c322faf306bffd7da1dcccd8ad4552d1 --- /dev/null +++ b/react-ui/src/shared/components/box/gridBox.view.scss @@ -0,0 +1,67 @@ +@import "/src/shared/style/colors.scss"; + +.grid-box:hover .grid-box-dependency { + opacity: 0.7; + transition: opacity 0.3s ease-in-out; +} + +.grid-box-dependency { + opacity: 0.4; + font-size: 0.9em; +} + +.grid-box .content { + overflow-x: clip; + overflow-y: auto; +} + +$box-padding: 1.5em; +$border-radius: 0.25em; +$border-width: 2px; +$transition-duration: 0.3s; + +.c-box { + padding: $box-padding / 2 $box-padding !important; + background-color: white; + position: relative; + transition: box-shadow $transition-duration ease-in-out; + @extend .border-gradient; + @extend .rounded; + box-shadow: $box-shadow; + + &:hover { + box-shadow: 0 0.5rem 1rem rgba(map-get($theme-colors, "primary"), 0.2); + + &::before { + opacity: 1; + } + } +} + +.c-box-title { + $text-color: black; + color: $text-color; + padding: 0.5em 0; + margin-top: 0.2em; + + small { + font-size: 0.75em; + color: rgba($text-color, 0.65); + &::before { + content: "("; + } + &::after { + content: ")"; + } + } +} + +.rounded { + border-radius: $border-radius; +} + +.abstract-box { + padding: $box-padding; + font-size: 0.9em; + border-radius: calc($border-radius / 2); +} diff --git a/react-ui/src/shared/components/box/gridBox.view.tsx b/react-ui/src/shared/components/box/gridBox.view.tsx new file mode 100644 index 0000000000000000000000000000000000000000..cc887610090525e4f714288173bce44ecd66cb5f --- /dev/null +++ b/react-ui/src/shared/components/box/gridBox.view.tsx @@ -0,0 +1,39 @@ +import { faGripVertical, IconDefinition } from "@fortawesome/free-solid-svg-icons" +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" +import UpdateIndicator from "@layout/grid.layout/update-inidicator.layout/update-indicator.layout" +import { Category, CategoryType } from "@shared/types/category.type" +import { Col, Container, Row } from "react-bootstrap" +import './gridBox.view.scss' + +interface GridBoxProps { + title: string, + title_icon: IconDefinition, + children: React.ReactNode, + className?: string, +} + + +export const GridBox: React.FC<GridBoxProps> = ({ children, title, title_icon, className = "" }) => { + return ( + <div className="grid-box h-100"> + <Container fluid className={`c-box d-flex flex-column h-100 ${className}`}> + <div> + <UpdateIndicator + category={Category.DEVICE as CategoryType} + updateInterval={15000} + /> + <FontAwesomeIcon icon={faGripVertical} className="drag-handle" /> + <Row className="mb-0"> + <Col xs={12}> + + <h4 className='c-box-title'><FontAwesomeIcon icon={title_icon} size="1x" className="me-2 text-primary" />{title}</h4> + </Col> + </Row> + </div> + <div className="flex-grow-1 content"> + {children} + </div> + </Container> + </div> + ) +} \ No newline at end of file diff --git a/react-ui/src/shared/components/json_viewer/reducer/json_viewer.reducer.ts b/react-ui/src/shared/components/json_viewer/reducer/json_viewer.reducer.ts index dd432535cba4f5cb7a37140ddfc00c05f8e28a94..093dde85084257853534ef3d75c9dd295088de81 100755 --- a/react-ui/src/shared/components/json_viewer/reducer/json_viewer.reducer.ts +++ b/react-ui/src/shared/components/json_viewer/reducer/json_viewer.reducer.ts @@ -25,8 +25,6 @@ interface CollapsedItem { } export interface ReducerState { - breadcrumbs: Array<string>, - /** * Meta container containg identifier of * all non collapsed json objects @@ -35,7 +33,6 @@ export interface ReducerState { } const initialState: ReducerState = { - breadcrumbs: [], collapseContainer: [], } @@ -76,14 +73,11 @@ const JsonViewerSlice = createSlice({ collapsed: CollapseActions[collapse](item.collapsed) } }) - }, - setBreadcrumbs: (state, { payload }: PayloadAction<Array<string>>) => { - state.breadcrumbs = payload - }, - }, + } + } }) -export const { toggleCollapse, setBreadcrumbs } = JsonViewerSlice.actions +export const { toggleCollapse, } = JsonViewerSlice.actions export default JsonViewerSlice.reducer diff --git a/react-ui/src/shared/components/json_viewer/view/json_viewer.scss b/react-ui/src/shared/components/json_viewer/view/json_viewer.scss index 20befdcbbcbebb9adac754c1b61dc62111dd197f..b971de526309f1b2f70c9d55c40fbfe2722ccde4 100755 --- a/react-ui/src/shared/components/json_viewer/view/json_viewer.scss +++ b/react-ui/src/shared/components/json_viewer/view/json_viewer.scss @@ -1,17 +1,11 @@ @import "/src/shared/style/colors.scss"; -.list-group-tr { - list-style-type: none; - margin: 0; - padding: 0 0; -} - .list-item-td { & > td { color: lighten(map-get($map: $theme-colors, $key: "black"), 20%) !important; - background-color: white !important; border: 0; padding: 0.2em 0 !important; + background-color: transparent !important; } & > td:nth-child(2) { @@ -19,7 +13,7 @@ } &:hover > td { - background-color: map-get($theme-colors, "primary::hover") !important; + background-color: map-get($theme-colors, "primary-hover") !important; } &:hover .icons { diff --git a/react-ui/src/shared/components/json_viewer/view/json_viewer.view.tsx b/react-ui/src/shared/components/json_viewer/view/json_viewer.view.tsx index 720f75c7d26b4ffd181707c46ff42502168a72c0..b2f409c17f6fd729cbf91e51c98e694c4f25351b 100755 --- a/react-ui/src/shared/components/json_viewer/view/json_viewer.view.tsx +++ b/react-ui/src/shared/components/json_viewer/view/json_viewer.view.tsx @@ -1,45 +1,37 @@ import { faAlignRight, faPenToSquare, faTrashCan } from "@fortawesome/free-solid-svg-icons" import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" +import { insertMarkTags } from "@helper/text" import DOMPurify from 'dompurify' import React, { Suspense, useMemo, useRef } from "react" import { Form, Table } from "react-bootstrap" import { useTranslation } from "react-i18next" +import Skeleton from 'react-loading-skeleton' import { useJsonViewer } from "../viewmodel/json_viewer.viewmodel" import './json_viewer.scss' + type JsonViewerProbs = { - json: JSON + json: JSON, + options?: { + searchEnabled?: boolean + editable?: boolean + } } -export const JsonViewer = ({ json }: JsonViewerProbs) => { +export const JsonViewer = ({ json, options = { searchEnabled: true, editable: true } }: JsonViewerProbs) => { const { t } = useTranslation('common'); const htmlContainer = useRef(null); const search = useRef<HTMLInputElement>(null); - const { getSubset, breadcrumbs, isCollapsed, collapseable, collapse, parameterizedJson, searchTerm } = useJsonViewer({ json, search, container: htmlContainer }); - - const breadcrumbHTML = useMemo(() => { - return ( - <nav aria-label="breadcrumb"> - <ol className="breadcrumb"> - {breadcrumbs.map(breadcrumb => ( - <li key={breadcrumb} className="breadcrumb-item"><a href="#">{breadcrumb}</a></li> - ))} - </ol> - </nav> - ) - }, [breadcrumbs]) - - const insertMarkTags = (text: string, search: string): string => { - const start = text.indexOf(search) - const end = start + search.length - - return DOMPurify.sanitize(text.substring(0, start)) + "<span class='highlight'>" + DOMPurify.sanitize(search) + "</span>" + DOMPurify.sanitize(text.substring(end, text.length)) - } + const { getSubset, isCollapsed, collapseable, collapse, parameterizedJson, searchTerm } = useJsonViewer({ json, search, container: htmlContainer }); const renderInner = (innerJson: JSON, nested: number = 0, parentKey: string = "", path: string = "/network-instance/0/"): JSX.Element => { path += parentKey + (parentKey === "" ? "" : "/") + if (Object.entries(innerJson).length === 0) { + return <tr><td><Skeleton count={3}></Skeleton></td></tr> + } + return Object.entries(innerJson).map(([key, child]): JSX.Element => { let collapsed = isCollapsed(key, nested); @@ -90,14 +82,16 @@ export const JsonViewer = ({ json }: JsonViewerProbs) => { > <td style={{ marginLeft: tabs + 'em' }} className={"d-flex align-items-center "}>{icon}<span> <span dangerouslySetInnerHTML={{ __html: concatenatedKey }} /></span></td> <td className="text-element text-truncate" dangerouslySetInnerHTML={{ __html: readableValue }}></td> - <td className="text-end"> - <div className="d-flex icons justify-content-end align-items-center"> - <FontAwesomeIcon icon={faPenToSquare} size="sm" /> - <FontAwesomeIcon icon={faTrashCan} size="sm" /> - </div> - </td> + {options?.editable && + <td className="text-end"> + <div className="d-flex icons justify-content-end align-items-center"> + <FontAwesomeIcon icon={faPenToSquare} size="sm" /> + <FontAwesomeIcon icon={faTrashCan} size="sm" /> + </div> + </td> + } </tr > - {isObject && collapsed ? renderInner(innerChild, nested + 1, concatenatedKey, path) : ''} + {isObject && collapsed && renderInner(innerChild, nested + 1, concatenatedKey, path)} </React.Fragment > ) }) @@ -105,7 +99,7 @@ export const JsonViewer = ({ json }: JsonViewerProbs) => { const renderJson = (json: JSON): JSX.Element => { return ( - <Table className="list-group-tr"> + <Table className="m-0 p-0 list-unstyled"> <tbody> { renderInner(json) @@ -116,32 +110,29 @@ export const JsonViewer = ({ json }: JsonViewerProbs) => { } - const hierarchyHTML = useMemo(() => { + const Hierarchy = useMemo(() => { const subset = getSubset(json); return ( - <> - <Suspense fallback={<div>loading...</div>}> - {renderJson(subset)} - </Suspense> - </> + <Suspense> + {renderJson(subset)} + </Suspense> ) }, [json, collapseable, searchTerm]) - const searchHTML = () => { + + + const Search = (): React.ReactElement => { return ( - <> - <Form.Group controlId='device.search' className='p-0 mx-1 pt-2'> - <Form.Control type="text" placeholder={t('device.search.placeholder')} ref={search} /> - </Form.Group> - </> + <Form.Group controlId='json_viewer.search' className='p-0 '> + <Form.Control type="text" placeholder={t('device.search.placeholder')} ref={search} /> + </Form.Group> ) } return ( <div ref={htmlContainer}> - {searchHTML()} - {breadcrumbHTML} - {hierarchyHTML} + {options?.searchEnabled && Search()} + {Hierarchy} </div> ) } \ No newline at end of file diff --git a/react-ui/src/shared/components/json_viewer/viewmodel/json_viewer.viewmodel.tsx b/react-ui/src/shared/components/json_viewer/viewmodel/json_viewer.viewmodel.tsx index 6c3ac78f306d0ff0b1c09263a4d791795757b51c..ccbeac7135e6e26ed310ef7ccb4360282516dd95 100644 --- a/react-ui/src/shared/components/json_viewer/viewmodel/json_viewer.viewmodel.tsx +++ b/react-ui/src/shared/components/json_viewer/viewmodel/json_viewer.viewmodel.tsx @@ -19,7 +19,7 @@ interface JsonViewerViewModelType { } export const useJsonViewer = ({ json, search, container }: JsonViewerViewModelType) => { - const { breadcrumbs, collapseContainer } = useAppSelector(state => state.json_viwer) + const { collapseContainer } = useAppSelector(state => state.json_viwer) const dispatch = useAppDispatch(); const [searchTerm, setSearchTerm] = useState(''); const { toClipboard } = useUtils(); @@ -31,10 +31,8 @@ export const useJsonViewer = ({ json, search, container }: JsonViewerViewModelTy const parameterizedJsonMap = useRef<Array<string>>([]); - const getSubset = (json: JSON) => { - const subset = breadcrumbs.reduce((nested, key) => nested?.[key], json); - - let inner = subset; + const getSubset = (json: JSON): JSON => { + let inner = json; const keys: Array<string> = []; while (Object.keys(inner).length === 1) { const key: string = Object.keys(inner)[0]; @@ -42,7 +40,6 @@ export const useJsonViewer = ({ json, search, container }: JsonViewerViewModelTy keys.push(key); } - //dispatch(setBreadcrumbs([...breadcrumbs, ...keys])) return inner } @@ -67,29 +64,27 @@ export const useJsonViewer = ({ json, search, container }: JsonViewerViewModelTy } const registerMenuOptions = () => { - if (container.current) { - const subscription = subscribe({ - target: container.current, - actions: [ - { - key: t('json_viewer.copy'), - icon: faCopy, - action: (clickedElement) => { - let parent = clickedElement; - while (parent && parent.tagName !== 'TR') { - parent = parent.parentNode; - } - - const copyValue = parent.dataset.copyValue - toClipboard(copyValue) + const subscription = subscribe!({ + target: container.current!, + actions: [ + { + key: t('json_viewer.copy'), + icon: faCopy, + action: (clickedElement) => { + let parent = clickedElement; + while (parent && parent.tagName !== 'TR') { + parent = parent.parentNode; } + + const copyValue = parent.dataset.copyValue + toClipboard(copyValue) } - ] - }) + } + ] + }) - return () => { - subscription.unsubscribe(); - } + return () => { + subscription.unsubscribe(); } } @@ -134,11 +129,21 @@ export const useJsonViewer = ({ json, search, container }: JsonViewerViewModelTy innerSearch(json, searchTerm); return parameterizedJsonMap - }, [searchTerm]) + }, [searchTerm, json]) useEffect(() => { - registerMenuOptions(); + if (!container.current || !subscribe) { + return + } + const unsubscribe = registerMenuOptions() + + return () => { + unsubscribe() + } + }, [subscribe]) + + useEffect(() => { if (search.current) { search.current.addEventListener('input', handleSearchInput) } @@ -152,7 +157,6 @@ export const useJsonViewer = ({ json, search, container }: JsonViewerViewModelTy return { getSubset, - breadcrumbs, collapseable: collapseContainer, isCollapsed, collapse, diff --git a/react-ui/src/shared/helper/debug.ts b/react-ui/src/shared/helper/debug.ts new file mode 100644 index 0000000000000000000000000000000000000000..db10a0979ac9b5acfab21af71fc4c1dc2595fbe3 --- /dev/null +++ b/react-ui/src/shared/helper/debug.ts @@ -0,0 +1,11 @@ +export const warnMessage = (message: string) => { + if (window?.env === 'development') { + console.warn("Debug: \n" + message) + } +} + +export const infoMessage = (message: string) => { + if (window?.env === 'development') { + console.info("Info: \n" + message) + } +} \ No newline at end of file diff --git a/react-ui/src/shared/helper/text.ts b/react-ui/src/shared/helper/text.ts new file mode 100644 index 0000000000000000000000000000000000000000..6aee13790561eefcfe347fb2e42a79c5ef84cfec --- /dev/null +++ b/react-ui/src/shared/helper/text.ts @@ -0,0 +1,12 @@ + +import DOMPurify from 'dompurify' + +export const insertMarkTags = (text: string, search: string): string => { + const start = text.indexOf(search) + if (start === -1) { + return DOMPurify.sanitize(text) + } + const end = start + search.length + + return DOMPurify.sanitize(text.substring(0, start)) + "<span class='highlight'>" + DOMPurify.sanitize(search) + "</span>" + DOMPurify.sanitize(text.substring(end, text.length)) +} \ No newline at end of file diff --git a/react-ui/src/shared/icons/icons.ts b/react-ui/src/shared/icons/icons.ts deleted file mode 100755 index 00021aa116faae88600fd06ab461aabd41aee9bb..0000000000000000000000000000000000000000 --- a/react-ui/src/shared/icons/icons.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { library } from '@fortawesome/fontawesome-svg-core' -import { faSpinner, fas } from '@fortawesome/free-solid-svg-icons' - -library.add(fas, faSpinner) \ No newline at end of file diff --git a/react-ui/src/shared/layouts/grid.layout/grid.layout.scss b/react-ui/src/shared/layouts/grid.layout/grid.layout.scss new file mode 100644 index 0000000000000000000000000000000000000000..0bacb29b5645e1b22aa1b76fe287fd991759752c --- /dev/null +++ b/react-ui/src/shared/layouts/grid.layout/grid.layout.scss @@ -0,0 +1,88 @@ +@import "/src/shared/style/colors.scss"; + +.custom-resize-handle { + position: absolute; + right: 0; + bottom: 0; + width: 20px; + height: 20px; + cursor: se-resize; + + .resize-handle-inner { + position: absolute; + right: 4px; + bottom: 4px; + width: 12px; + height: 12px; + border-right: 2px solid rgba(0, 0, 0, 0.2); + border-bottom: 2px solid rgba(0, 0, 0, 0.2); + } +} + +.react-grid-item { + &.resizing { + z-index: 1; + will-change: transform; + } +} + +.react-grid-item { + .custom-resize-handle { + opacity: 0; + transition: opacity 0.2s ease-in-out; + } + + &:hover .custom-resize-handle { + opacity: 1; + } +} + +.drag-handle { + position: absolute; + top: 0; + right: 0; + padding: 10px; + cursor: grab; + color: map-get($theme-colors, "dark"); + background-color: lighten(map-get($theme-colors, primary), 38%); + border-radius: 0 0.25rem 0 0.25rem; + border-left: 1px solid lighten(map-get($theme-colors, dark), 35%); + border-bottom: 1px solid lighten(map-get($theme-colors, dark), 35%); + z-index: 10; + + &:hover { + color: map-get($theme-colors, primary); + background-color: lighten(map-get($theme-colors, primary), 35%); + } + + &:active { + cursor: grabbing; + } +} + +.react-grid-item.react-grid-placeholder { + background: lighten(map-get($theme-colors, primary), 10%) !important; + opacity: 0.2; + transition-duration: 100ms; + z-index: 2; + border-radius: 4px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; +} + +.react-resizable-handle-se { + position: absolute; + right: 0; + bottom: 0; + width: 20px; + height: 20px; + background-image: url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiPjxwYXRoIGQ9Ik02IDZIMHYtNmg2djZ6TTUgMUgxdjRoNFYxeiIgZmlsbD0iIzk5OTk5OSIvPjwvc3ZnPg=="); + background-position: bottom right; + background-repeat: no-repeat; + background-size: 10px 10px; + cursor: se-resize; + z-index: 10; +} diff --git a/react-ui/src/shared/layouts/grid.layout/grid.layout.tsx b/react-ui/src/shared/layouts/grid.layout/grid.layout.tsx new file mode 100644 index 0000000000000000000000000000000000000000..7ec2c4a513dbe1ccad8344c04417a2ec1da8b263 --- /dev/null +++ b/react-ui/src/shared/layouts/grid.layout/grid.layout.tsx @@ -0,0 +1,81 @@ +import React, { ReactElement, useEffect, useRef, useState } from 'react'; +import RGL, { WidthProvider } from "react-grid-layout"; + +import 'react-grid-layout/css/styles.css'; +import 'react-resizable/css/styles.css'; +import './grid.layout.scss'; + +const ResponsiveGridLayout = WidthProvider(RGL); + +interface GridLayoutProps { + children: ReactElement; +} + +const RowCount = 2; +const padding = 80; + +export const GridLayout: React.FC<GridLayoutProps> = ({ children }) => { + const [rowHeight, setRowHeight] = useState<number>(0); + const [containerHeight, setContainerHeight] = useState<number>(0); + const [mounted, setMounted] = useState<boolean>(false); + const containerRef = useRef<HTMLDivElement>(null); + + const layouts = [ + { i: 'device-list', x: 0, y: 0, w: 2, h: 1, minW: 1, minH: 1 }, + { i: 'device-metadata', x: 0, y: 1, w: 2, h: 1, minW: 1, minH: 1 }, + { i: 'device-details', x: 3, y: 0, w: 2, h: 2, minW: 1, minH: 1 } + ]; + + const calcHeights = () => { + const container = containerRef.current; + if (!container) { + const height = document.body.clientHeight * 0.7; + setRowHeight(Math.floor(height / RowCount)); + return; + } + const { top } = container.getBoundingClientRect(); + const height = document.body.clientHeight - (top + padding); + setContainerHeight(height); + setRowHeight(Math.floor(height / RowCount)); + }; + + useEffect(() => { + calcHeights(); + }, [containerRef.current]); + + useEffect(() => { + setMounted(true); + window.addEventListener('resize', calcHeights); + return () => window.removeEventListener('resize', calcHeights); + }, []); + + return ( + <div + ref={containerRef} + style={{ + display: mounted ? 'block' : 'none', + height: `${containerHeight}px`, + }} + > + <ResponsiveGridLayout + cols={5} + layout={layouts} + maxRows={RowCount} + rowHeight={rowHeight} + margin={[20, 20]} + draggableHandle=".drag-handle" + isDraggable={true} + isResizable={true} + resizeHandles={['se']} + useCSSTransforms={true} + resizeHandle={ + <div className="custom-resize-handle"> + <div className="resize-handle-inner" /> + </div> + } + > + {children.props.children} + </ResponsiveGridLayout> + </div> + ); +}; diff --git a/react-ui/src/shared/layouts/grid.layout/update-inidicator.layout/update-indicator.layout.tsx b/react-ui/src/shared/layouts/grid.layout/update-inidicator.layout/update-indicator.layout.tsx new file mode 100644 index 0000000000000000000000000000000000000000..d71bb6cce17eefb53d7ddcdcda9db99545bf6b86 --- /dev/null +++ b/react-ui/src/shared/layouts/grid.layout/update-inidicator.layout/update-indicator.layout.tsx @@ -0,0 +1,52 @@ +import { faCircle } from '@fortawesome/free-solid-svg-icons' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import React, { useState } from 'react' +import { Overlay, Tooltip } from 'react-bootstrap' +import { useTranslation } from 'react-i18next' +import { CategoryType } from '../types' +import { useUpdateIndicatorViewModel } from './update-indicator.viewmodel' + +interface UpdateIndicatorProps { + category: CategoryType + updateInterval: number +} + +const UpdateIndicator: React.FC<UpdateIndicatorProps> = ({ category, updateInterval }) => { + const [showTooltip, setShowTooltip] = useState(false) + const { t } = useTranslation('common') + const target = React.useRef(null) + const { secondsSinceUpdate, getStatusColor } = useUpdateIndicatorViewModel(category) + + return ( + <div + className="position-absolute" + style={{ + top: 0, + right: '40px', + padding: '10px', + zIndex: 10 + }} + > + <div + ref={target} + onMouseEnter={() => setShowTooltip(true)} + onMouseLeave={() => setShowTooltip(false)} + style={{ cursor: 'pointer' }} + > + <FontAwesomeIcon + icon={faCircle} + className={getStatusColor(updateInterval)} + size="sm" + /> + </div> + + <Overlay target={target.current} show={showTooltip} placement="bottom"> + <Tooltip id="update-tooltip"> + {t('device.box.lastUpdate', { seconds: secondsSinceUpdate })} + </Tooltip> + </Overlay> + </div> + ) +} + +export default UpdateIndicator \ No newline at end of file diff --git a/react-ui/src/shared/layouts/grid.layout/update-inidicator.layout/update-indicator.viewmodel.tsx b/react-ui/src/shared/layouts/grid.layout/update-inidicator.layout/update-indicator.viewmodel.tsx new file mode 100644 index 0000000000000000000000000000000000000000..bb91b0b17e1c4e815d92d14420f0022ddaf819e2 --- /dev/null +++ b/react-ui/src/shared/layouts/grid.layout/update-inidicator.layout/update-indicator.viewmodel.tsx @@ -0,0 +1,39 @@ +import { useAppSelector } from "@hooks" +import { CategoryType } from "@shared/types/category.type" +import { useEffect, useState } from 'react' + +export const useUpdateIndicatorViewModel = (category: CategoryType) => { + const { thunks } = useAppSelector((state) => state.routine) + const [secondsSinceUpdate, setSecondsSinceUpdate] = useState<number>(-1) + + useEffect(() => { + const updateTimer = () => { + const lastupdate = thunks[category]?.lastupdate + if (lastupdate) { + setSecondsSinceUpdate(Math.round((Date.now() - lastupdate) / 1000)) + } else { + setSecondsSinceUpdate(-1) + } + } + + // Initial update + updateTimer() + + // Set up interval for updates + const intervalId = setInterval(updateTimer, 1000) + + return () => clearInterval(intervalId) + }, [category, thunks]) + + const getStatusColor = (updateInterval: number) => { + const updateIntervalSeconds = updateInterval / 1000 + if (secondsSinceUpdate > updateIntervalSeconds * 0.9) return "text-primary" + if (secondsSinceUpdate > updateIntervalSeconds * 1.3) return "text-danger" + return "text-bg-primary" + } + + return { + secondsSinceUpdate, + getStatusColor + } +} \ No newline at end of file diff --git a/react-ui/src/shared/layouts/protected.layout/protected.layout.scss b/react-ui/src/shared/layouts/protected.layout/protected.layout.scss index 07b38d5a73d1102bebf4e4b0f82e8cc2bc10a799..6f255d331872410d7da1f9419894a857c8f8d706 100755 --- a/react-ui/src/shared/layouts/protected.layout/protected.layout.scss +++ b/react-ui/src/shared/layouts/protected.layout/protected.layout.scss @@ -1,7 +1,5 @@ @import "/src/shared/style/colors.scss"; -$sidebar-width: 4.5em; - .head-links { text-decoration: none; color: map-get($theme-colors, dark); @@ -10,7 +8,6 @@ $sidebar-width: 4.5em; &:hover { color: map-get($theme-colors, primary); - font-weight: 600; } &.active { @@ -19,11 +16,46 @@ $sidebar-width: 4.5em; } } -.sidebar { - width: $sidebar-width; - height: 100vh; +#navbar { + padding: 1em !important; } -.main-content { - margin-left: $sidebar-width; +// Add these styles to your protected.layout.scss +nav { + border-radius: $border-radius $border-radius; + padding: 0 !important; + + .head-links { + text-decoration: none; + color: map-get($theme-colors, "dark"); + padding: 8px 16px; + margin: 0 4px; + border-radius: 12px; + transition: all 0.2s ease; + + &:hover { + background-color: map-get($theme-colors, "bg-primary"); + } + + &.active { + color: map-get($theme-colors, "primary"); + background-color: map-get($theme-colors, "primary-button"); + } + } + + .dropdown-menu { + border-radius: $border-radius; + box-shadow: $box-shadow; + border: none; + padding: 8px; + + .dropdown-item { + border-radius: 8px; + padding: 8px 16px; + + &:hover { + background-color: map-get($theme-colors, "bg-primary"); + } + } + } } diff --git a/react-ui/src/shared/layouts/protected.layout/protected.layout.tsx b/react-ui/src/shared/layouts/protected.layout/protected.layout.tsx index c7e13c6fe55a2f874c6eeafbc956305986051b63..4e54f58dee5f7a1ae7c6cf0c90aa81bb5d24fd82 100755 --- a/react-ui/src/shared/layouts/protected.layout/protected.layout.tsx +++ b/react-ui/src/shared/layouts/protected.layout/protected.layout.tsx @@ -1,17 +1,16 @@ -import logo from '@assets/logo.svg'; -import { fetchPnds } from '@component/devices/reducer/device.reducer'; import { faCircleUser, faRightFromBracket } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { useAppDispatch, useAppSelector } from '@hooks'; import { useAuth } from "@provider/auth.provider"; import { MenuProvider } from '@provider/menu/menu.provider'; import { DEVICE_URL, LOGIN_URL } from '@routes'; -import { fetchUser } from '@shared/reducer/user.reducer'; +import { fetchPnds, fetchUser } from '@shared/routine/user.routine'; import React, { useEffect } from "react"; -import { Dropdown } from "react-bootstrap"; +import { Col, Container, Dropdown, Row } from "react-bootstrap"; import { useTranslation } from "react-i18next"; import { Link, Outlet, useNavigate } from "react-router-dom"; import "./protected.layout.scss"; +import logo from '/public/logo.png'; export const ProtectedLayout = () => { @@ -70,48 +69,46 @@ export const ProtectedLayout = () => { } ); - const VerticalSidebar = () => { - return ( - <div className="d-flex fixed-top flex-column flex-shrink-0 bg-white sidebar justify-content-end border-end border-dark py-3 z-2"> - <FontAwesomeIcon className="clickable icon" icon={faRightFromBracket} onClick={logout} size="2x" /> - </div> - ) - } - const HorizontalNavbar = () => { return ( - <nav className="bg-white border-bottom border-dark py-2 d-flex align-items-center z-3 position-relative"> - <Link to="/"><img src={logo} className="mx-4 me-5" width={25} alt="logo" /></Link> - <Link className={"head-links" + handleActiveLink(DEVICE_URL)} to="/">{t('protected.link.device_list')}</Link> - <Link className={"head-links" + handleActiveLink('/map')} to="/">{t('protected.link.map')}</Link> - <Link className={"head-links" + handleActiveLink('/configuration_management')} to="/">{t('protected.link.configuration_mgmt')}</Link> + <Container fluid className="mb-4"> + <Row> + <Col> + <nav id="navbar" className="bg-white mx-4 mt-4 d-flex align-items-center c-box overflow-visible"> + <Link to="/"><img src={logo} className="mx-4" width={45} alt="logo" /></Link> + <Link className={"head-links" + handleActiveLink(DEVICE_URL)} to="/">{t('protected.link.device_list')}</Link> + <Link className={"head-links" + handleActiveLink('/map')} to="/">{t('protected.link.map')}</Link> + <Link className={"head-links" + handleActiveLink('/configuration_management')} to="/">{t('protected.link.configuration_mgmt')}</Link> - <Dropdown className="ms-auto px-3"> - <Dropdown.Toggle as={UserIconToggle}> - <FontAwesomeIcon icon={faCircleUser} className="icon clickable" /> - </Dropdown.Toggle> + <Dropdown className="ms-auto px-3"> + <Dropdown.Toggle as={UserIconToggle}> + <FontAwesomeIcon icon={faCircleUser} className="clickable" size="2x" /> + </Dropdown.Toggle> - <Dropdown.Menu as={UserIconMenu}> - <Dropdown.Item eventKey="1">{user?.name}</Dropdown.Item> - <hr /> - <Dropdown.Item eventKey="1"> - <Link className="text-decoration-none text-reset" to="/">{t('protected.link.settings')}</Link> - </Dropdown.Item> - </Dropdown.Menu> - </Dropdown> - </nav> + <Dropdown.Menu as={UserIconMenu}> + <Dropdown.Item eventKey="1">{user?.name}</Dropdown.Item> + <hr /> + <Dropdown.Item eventKey="2"> + <Link className="text-decoration-none text-reset" to="/">{t('protected.link.settings')}</Link> + </Dropdown.Item> + <Dropdown.Item eventKey="3" onClick={logout}> + <Link className="text-decoration-none text-reset" to="/"><FontAwesomeIcon className="clickable" icon={faRightFromBracket} /><span className="ms-1">{t('global.menu_item.logout')}</span></Link> + </Dropdown.Item> + </Dropdown.Menu> + </Dropdown> + </nav> + </Col> + </Row> + </Container> ) } return ( - <div> - <MenuProvider> - {HorizontalNavbar()} - {VerticalSidebar()} - <div className='main-content'> - <Outlet /> - </div> - </MenuProvider> - </div> + <MenuProvider> + {HorizontalNavbar()} + <div className="px-3"> + <Outlet /> + </div> + </MenuProvider> ) }; \ No newline at end of file diff --git a/react-ui/src/shared/provider/auth.provider.tsx b/react-ui/src/shared/provider/auth.provider.tsx index 69bdccbdfbb3b6db3295d20a137e56a57d8504f2..77219bdce1547fc11b889eb444ae6d6a9eb5eb6a 100755 --- a/react-ui/src/shared/provider/auth.provider.tsx +++ b/react-ui/src/shared/provider/auth.provider.tsx @@ -1,8 +1,8 @@ import { AuthServiceLoginApiArg, AuthServiceLoginApiResponse, useAuthServiceLoginMutation } from "@api/api"; import { getCookieValue } from "@helper/coookie"; -import { BasicProp } from "@helper/interfaces"; import { useAppDispatch, useAppSelector } from "@hooks"; import { DEVICE_URL, LOGIN_URL } from "@routes"; +import { BasicProp } from "@shared/types/interfaces.type"; import { jwtDecode } from "jwt-decode"; import { createContext, useContext, useEffect, useMemo } from "react"; import { useNavigate } from "react-router-dom"; diff --git a/react-ui/src/shared/provider/menu/menu.provider.tsx b/react-ui/src/shared/provider/menu/menu.provider.tsx index a91f46639af28e2db261a3089f62e0a79fc13c41..f3af8e5c13573e8c317eb27e433ebf63872e093f 100644 --- a/react-ui/src/shared/provider/menu/menu.provider.tsx +++ b/react-ui/src/shared/provider/menu/menu.provider.tsx @@ -1,7 +1,7 @@ import { faRightFromBracket, IconDefinition } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { BasicProp } from "@helper/interfaces"; import { useAuth } from "@provider/auth.provider"; +import { BasicProp } from "@shared/types/interfaces.type"; import React, { createContext, useContext, useEffect, useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; import './menu.provider.scss'; @@ -19,13 +19,11 @@ type Action = { } interface MenuProviderType { - subscribe: (value: SubscriptionValue) => MenuSubscription + subscribe: ((value: SubscriptionValue) => MenuSubscription) | null; } const MenuContext = createContext<MenuProviderType>({ - subscribe: function (): MenuSubscription { - throw new Error("Function not implemented."); - } + subscribe: null }) interface SubscriptionValue { @@ -33,11 +31,16 @@ interface SubscriptionValue { actions: Array<Action> } +interface SubscriptionMap { + [id: string]: SubscriptionValue +} + export const MenuProvider: React.FC<BasicProp> = ({ children }) => { const [menuPosition, setMenuPosition] = useState({ top: 0, left: 0 }); const [showMenu, setShowMenu] = useState(false); - const [subscribedTargets, setSubscribedTargets] = useState<Array<SubscriptionValue>>([]) + const [subscribedTargets, setSubscribedTargets] = useState<SubscriptionMap>({}); + const { logout } = useAuth() const { t } = useTranslation('common') @@ -61,12 +64,15 @@ export const MenuProvider: React.FC<BasicProp> = ({ children }) => { const handleContextMenu = (event: React.MouseEvent<HTMLElement>) => { event.preventDefault(); - const targets = subscribedTargets.filter(({ target }) => target.contains(event.target as HTMLElement)) + + const targets = Object.values(subscribedTargets).filter( + ({ target }) => target.contains(event.target as HTMLElement) + ); setMenuPosition({ top: event.pageY, left: event.pageX }); - setMenuItems(targets) - setClickedHtmlElement(event.target as HTMLElement) - displayMenu() + setMenuItems(targets); + setClickedHtmlElement(event.target as HTMLElement); + displayMenu(); }; const displayMenu = () => { @@ -90,20 +96,27 @@ export const MenuProvider: React.FC<BasicProp> = ({ children }) => { const value = useMemo<MenuProviderType>(() => { return { - subscribe(target) { - const index = subscribedTargets.length; + subscribe(target: SubscriptionValue) { + const subscriptionId = crypto.randomUUID(); // Generate unique ID - setSubscribedTargets([...subscribedTargets, target]) + setSubscribedTargets(prev => ({ + ...prev, + [subscriptionId]: target + })); const subscription: MenuSubscription = { unsubscribe() { - setSubscribedTargets([...subscribedTargets.splice(index, 1)]) + setSubscribedTargets(prev => { + const next = { ...prev }; + delete next[subscriptionId]; + return next; + }); }, } - return subscription + return subscription; }, } as MenuProviderType - }, []) + }, []); return ( <MenuContext.Provider value={value}> diff --git a/react-ui/src/shared/provider/utils.provider.tsx b/react-ui/src/shared/provider/utils.provider.tsx index ca6aa1d3235efe3e1f48441fc7a39a47e9ce7fb7..3a76bbe69430ca8f5031935f8e1d11925c620610 100644 --- a/react-ui/src/shared/provider/utils.provider.tsx +++ b/react-ui/src/shared/provider/utils.provider.tsx @@ -1,4 +1,4 @@ -import { BasicProp } from "@helper/interfaces"; +import { BasicProp } from "@shared/types/interfaces.type"; import React, { createContext, useContext, useMemo } from "react"; import { useTranslation } from "react-i18next"; import { toast } from "react-toastify"; diff --git a/react-ui/src/shared/reducer/routine.reducer.ts b/react-ui/src/shared/reducer/routine.reducer.ts index a52ee84d3f16e89f5e899919d59fcb44428a9213..95d5f06e7d708965ec65b2960f6f56823a976f6b 100755 --- a/react-ui/src/shared/reducer/routine.reducer.ts +++ b/react-ui/src/shared/reducer/routine.reducer.ts @@ -1,58 +1,42 @@ import { PayloadAction, createSlice } from '@reduxjs/toolkit' +import { CategoryType } from '@shared/types/category.type' +import { ThunkDTO, ThunkPersist } from '@shared/types/thunk.type' import { RoutineManager } from '@utils/routine.manager' import { RootState } from '../../stores' import { startListening } from '../../stores/middleware/listener.middleware' import { setToken } from './user.reducer' -interface ThunkEntityDTO { - thunk: any - payload: Object - - /** - * Only one subscription per category is allowed. New subscription will unsubscribe and overwrite the old one - */ - category: CATEGORIES -} - -interface ThunkEntity extends ThunkEntityDTO { - id?: number - locked: boolean -} - export interface ReducerState { - thunks: { [key in keyof typeof CATEGORIES]: ThunkEntity | null } -} - -export enum CATEGORIES { - TABLE, - TAB, + thunks: Record<CategoryType, ThunkPersist | null> } const initialState: ReducerState = { thunks: { + DEVICE: null, TABLE: null, - TAB: null, + TAB: null }, + } + const RoutineSlice = createSlice({ name: 'routine', initialState, reducers: { - addRoutine: (state: any, { payload }: PayloadAction<ThunkEntityDTO>) => { - const newThunk: ThunkEntity = { ...payload, locked: true } - state.thunks[CATEGORIES[payload.category]] = newThunk - }, - - setThunkId: (state, { payload }: PayloadAction<{ id: number; category: CATEGORIES }>) => { - const thunk = state.thunks[CATEGORIES[payload.category] as any] - - if (!thunk) { - // TODO - throw new Error('Thunk not found') + addRoutine: (state: any, { payload }: PayloadAction<ThunkDTO>) => { + const thunk: ThunkPersist = { + category: payload.category, + payload: payload.payload, + thunkId: payload.thunk.id, + lastupdate: Date.now() } - state.thunks[CATEGORIES[payload.category] as any] = { ...thunk, id: payload.id, locked: false } + state.thunks[payload.category] = thunk + }, + + refreshUpdateTimer: (state: any, { payload }: PayloadAction<CategoryType>) => { + state.thunks[payload].lastupdate = Date.now() }, removeAll: (state) => { @@ -61,7 +45,7 @@ const RoutineSlice = createSlice({ }, }) -export const { addRoutine } = RoutineSlice.actions +export const { addRoutine, refreshUpdateTimer } = RoutineSlice.actions // on logout remove all routine startListening({ @@ -72,49 +56,37 @@ startListening({ }, }) -// on rehydrate add all persistet routines -// TODO -> thunk does not have the thunk function object due to its coming from the store that ignores the value. -// at this point we have to figure out how to get the thunk function out of the "string" name -// startListening({ -// predicate: ({ type }) => type === REHYDRATE, -// effect: async (_, listenerApi) => { -// const { routine } = listenerApi.getState() as RootState -// for (const [_, thunk] of Object.entries<ThunkEntity>(routine.thunks)) { -// if (!thunk) { -// continue -// } -// const dto: ThunkEntityDTO = thunk -// listenerApi.dispatch(addRoutine(dto)) -// } -// }, -// }) - -// add new routine +/** + * Add new routine + * + * This listener handles the connection between the RoutingManager that + * stores the non persistable thunk object and the peristable thunk information. + * The persistable information are stored in this reducer + */ startListening({ predicate: (action) => addRoutine.match(action), effect: async (action, listenerApi) => { - const { thunk } = action.payload as ThunkEntity + const { thunk } = action.payload as ThunkDTO const subscription = await listenerApi.dispatch(thunk(action.payload.payload)) - const thunkId = await RoutineManager.add(subscription.payload) - listenerApi.dispatch( - RoutineSlice.actions.setThunkId({ id: thunkId, category: action.payload.category }) - ) + + if (subscription.error) { + throw new Error('Error during routine execution: ' + subscription.error.message) + } + + RoutineManager.add(subscription.payload, action.payload.category) }, }) -// unsubscribe old routine +// unsubscribe old routine that is in the same category startListening({ predicate: (action) => addRoutine.match(action), effect: async (action, listenerApi) => { const { routine } = listenerApi.getOriginalState() as RootState - const lastThunk = routine.thunks[CATEGORIES[action.payload.category] as any] - if (lastThunk) { - if (!lastThunk.id) { - throw new Error() - // TODO - } + const category = action.payload.category; - RoutineManager.unsubscribe(lastThunk.id) + const lastThunk = routine.thunks[category as CategoryType] + if (lastThunk) { + RoutineManager.unsubscribe(category) } }, }) diff --git a/react-ui/src/shared/reducer/user.reducer.ts b/react-ui/src/shared/reducer/user.reducer.ts index af0f2d171675627a0a69f5aebd6e7b64125fba37..a0f2d422255f9a135236c4d8c2e3a70a5e51ec46 100755 --- a/react-ui/src/shared/reducer/user.reducer.ts +++ b/react-ui/src/shared/reducer/user.reducer.ts @@ -1,7 +1,6 @@ -import { api, RbacUser, UserServiceGetUsersApiArg } from '@api/api' +import { RbacUser } from '@api/api' import { setCookieValue } from '@helper/coookie' -import { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit' -import { RootState } from '..' +import { createSlice, PayloadAction } from '@reduxjs/toolkit' export interface UserSliceState { // defined by the frontend user input. This value is getting compared with the backend response @@ -34,27 +33,4 @@ export const { setToken } = userSlice.actions export const { setUser } = userSlice.actions export default userSlice.reducer -export const userReducerPath = userSlice.reducerPath - -export const fetchUser = createAsyncThunk('user/fetchUser', (_, thunkAPI) => { - const payload: UserServiceGetUsersApiArg = {} - - thunkAPI.dispatch(api.endpoints.userServiceGetUsers.initiate(payload)).then((response) => { - if (response.error || !response.data?.user?.length) { - // TODO proper error handling - throw new Error('Fetching the pnd list after successful login failed') - } - - const { user } = thunkAPI.getState() as RootState - - // TODO ask if this is the correct approach - const matchedUser = response.data.user.find((_user) => _user.name === user.username) - - if (!matchedUser) { - // TODO proper error handling - throw new Error('No user found with the provided username') - } - - thunkAPI.dispatch(setUser(matchedUser)) - }) -}) +export const userReducerPath = userSlice.reducerPath \ No newline at end of file diff --git a/react-ui/src/shared/routine/user.routine.ts b/react-ui/src/shared/routine/user.routine.ts new file mode 100644 index 0000000000000000000000000000000000000000..368ccf41246176c533b2394a581124200668f527 --- /dev/null +++ b/react-ui/src/shared/routine/user.routine.ts @@ -0,0 +1,37 @@ +import { api, PndServiceGetPndListApiArg, UserServiceGetUsersApiArg } from "@api/api" +import { setPnds } from "@component/devices/reducer/device.reducer" +import { createAsyncThunk } from "@reduxjs/toolkit" +import { setUser } from "@shared/reducer/user.reducer" +import { RootState } from "src/stores" + +export const fetchUser = createAsyncThunk('user/fetchUser', (_, thunkAPI) => { + const payload: UserServiceGetUsersApiArg = {} + + thunkAPI.dispatch(api.endpoints.userServiceGetUsers.initiate(payload)).then((response) => { + if (response.error || !response.data?.user?.length) { + // TODO proper error handling + throw new Error('Fetching the pnd list after successful login failed') + } + + const { user } = thunkAPI.getState() as RootState + const matchedUser = response.data.user.find((_user) => _user.name === user.username) + + if (!matchedUser) { + // TODO proper error handling => logout + throw new Error('No user found with the provided username') + } + + thunkAPI.dispatch(setUser(matchedUser)) + }) +}) + +export const fetchPnds = createAsyncThunk('device/fetchPnds', (_, thunkApi) => { + const payload: PndServiceGetPndListApiArg = { + timestamp: new Date().getTime().toString(), + } + + const subscription = thunkApi.dispatch(api.endpoints.pndServiceGetPndList.initiate(payload)) + subscription.unwrap().then((response) => { + thunkApi.dispatch(setPnds(response.pnd)) + }) +}) \ No newline at end of file diff --git a/react-ui/src/shared/style/box.scss b/react-ui/src/shared/style/box.scss deleted file mode 100755 index bd75fb00a6c1574584c85afafe6a91d8b858deb4..0000000000000000000000000000000000000000 --- a/react-ui/src/shared/style/box.scss +++ /dev/null @@ -1,26 +0,0 @@ -@import './colors.scss'; - -$box-padding: 10px; -$border-radius: 20px; - - -.c-box { - padding: $box-padding; - background-color: white; - box-shadow: 0px 4px 4px rgba(0,0,0, .35); - border-radius: $border-radius; -} - -.abstract-box { - padding: 16px $box-padding; - font-size: .90em; - border-radius: calc($border-radius / 2); -} - - -// @each $color, $value in $theme-colors { -// .#{$color}-box { -// @extend .abstract-box; -// background-color: $value !important; -// } -// } diff --git a/react-ui/src/shared/style/colors.scss b/react-ui/src/shared/style/colors.scss index 749af9e8eb8e86b0169c7f2a652dc0bada992181..9ba6ce0c05ccb1239eaea2233733aa956ef42df7 100755 --- a/react-ui/src/shared/style/colors.scss +++ b/react-ui/src/shared/style/colors.scss @@ -1,11 +1,50 @@ $theme-colors: ( - 'primary': #b350e0, - 'primary::hover': #ddaff3af, - 'bg-primary': #E1E1E1, - 'danger': #ffdcdc, - 'warning': #dbd116, - 'dark': #595959, - 'black': #000000, + "primary": #b350e0, + "primary-hover": #ddaff3af, + "primary-button": #ddaff3af, + "bg-primary": #ededed, + "danger": #ff0000, + "warning": #dbd116, + "dark": #595959, + "black": #000000, + "disabled": #8e8e8e ); - -@import '/node_modules/bootstrap/scss/bootstrap'; + +$box-shadow: 0px 4px 8px rgba(map-get($theme-colors, "primary"), 0.2); +$transition-duration: 0.3s; + +@import "/node_modules/bootstrap/scss/bootstrap"; + +// Gradients + +.border-gradient { + background: + linear-gradient(white, white) padding-box, + linear-gradient( + 180deg, + rgba(map-get($theme-colors, "primary"), 0.4) 0%, + rgba(map-get($theme-colors, "primary"), 0.2) 40%, + rgba(map-get($theme-colors, "primary"), 0.1) 100% + ) + border-box; + border: $border-width solid transparent; + + &::before { + content: ""; + position: absolute; + top: -$border-width; + left: -$border-width; + right: -$border-width; + bottom: -$border-width; + background: linear-gradient( + 180deg, + rgba(map-get($theme-colors, "primary"), 0.4) 0%, + rgba(map-get($theme-colors, "primary"), 0.2) 60%, + rgba(map-get($theme-colors, "primary"), 0.1) 100% + ); + border-radius: inherit; + z-index: -1; + opacity: 0; + transition: opacity $transition-duration ease-in-out; + } +} diff --git a/react-ui/src/shared/style/fonts.scss b/react-ui/src/shared/style/fonts.scss index c47d1a52fb36da1863fc511e7e1e4deb045694cf..3af44e1559b21507bd509acb4c954a204250f3ba 100755 --- a/react-ui/src/shared/style/fonts.scss +++ b/react-ui/src/shared/style/fonts.scss @@ -1,9 +1,12 @@ @font-face { font-family: Inter; - src: url("/fonts/Inter.ttf"); + src: + url("/fonts/inter-webfont.woff2") format("woff2"), + url("/fonts/inter-webfont.woff") format("woff"); + font-weight: normal; + font-style: normal; } - * { font-family: Inter; -} \ No newline at end of file +} diff --git a/react-ui/src/shared/style/index.scss b/react-ui/src/shared/style/index.scss index e210c84154bd1413e3b23ca906e9a555862599a4..b70f6c35e87e35090674a0ac0041e9118a329d3a 100755 --- a/react-ui/src/shared/style/index.scss +++ b/react-ui/src/shared/style/index.scss @@ -1,5 +1,7 @@ @import "./fonts.scss"; -@import './colors.scss'; -@import './utils.scss'; -@import './box.scss'; -@import './toast.scss'; +@import "./colors.scss"; +@import "./utils.scss"; +@import "./toast.scss"; +@import "./skeleton.scss"; + +@import "/node_modules/react-loading-skeleton/dist/skeleton.css"; diff --git a/react-ui/src/shared/style/skeleton.scss b/react-ui/src/shared/style/skeleton.scss new file mode 100644 index 0000000000000000000000000000000000000000..680cadd74c6d2c293772e36eb44f1feb896d2307 --- /dev/null +++ b/react-ui/src/shared/style/skeleton.scss @@ -0,0 +1,3 @@ +.react-loading-skeleton { + margin: 0.25em 0; +} diff --git a/react-ui/src/shared/style/utils.scss b/react-ui/src/shared/style/utils.scss index d8be654f7e67fc11d9626c2a52f5744af0dfbb79..d6f34d301416ac7aeb82aa740cd150e95efbd6c5 100755 --- a/react-ui/src/shared/style/utils.scss +++ b/react-ui/src/shared/style/utils.scss @@ -7,7 +7,3 @@ cursor: pointer; } } - -.icon { - font-size: 1.75em; -} diff --git a/react-ui/src/shared/types/category.type.ts b/react-ui/src/shared/types/category.type.ts new file mode 100644 index 0000000000000000000000000000000000000000..e08282341e803cf8b62bf0deec423fb0ebe62234 --- /dev/null +++ b/react-ui/src/shared/types/category.type.ts @@ -0,0 +1,17 @@ + +const DeviceListView = { + TABLE: "device_list/table", + TAB: "device_list/tab", +} + +const Shared = { + DEVICE: 'objects/device' +} + + +export const Category = { + ...DeviceListView, + ...Shared +} + +export type CategoryType = keyof typeof Category \ No newline at end of file diff --git a/react-ui/src/shared/helper/interfaces.ts b/react-ui/src/shared/types/interfaces.type.ts similarity index 100% rename from react-ui/src/shared/helper/interfaces.ts rename to react-ui/src/shared/types/interfaces.type.ts diff --git a/react-ui/src/shared/types/thunk.type.ts b/react-ui/src/shared/types/thunk.type.ts new file mode 100644 index 0000000000000000000000000000000000000000..ff037d79655b7596295b387c61de4755dcc2eff4 --- /dev/null +++ b/react-ui/src/shared/types/thunk.type.ts @@ -0,0 +1,24 @@ +import { CategoryType } from "./category.type" + + +// The actual Thunk type is hard to determine because is very generic +export type ThunkFunc = any + + +export interface ThunkDTO { + thunk: ThunkFunc + payload: Object + + /** + * Only one subscription per category is allowed. + * New subscription will unsubscribe and overwrite the old one + */ + category: CategoryType +} + +export interface ThunkPersist { + thunkId: number, + payload: Object + category: CategoryType, + lastupdate: number +} diff --git a/react-ui/src/shared/utils/loading-fallback.tsx b/react-ui/src/shared/utils/loading-fallback.tsx new file mode 100644 index 0000000000000000000000000000000000000000..d1c6daa4aa369ca157dbae653c6dd29f6f99d99a --- /dev/null +++ b/react-ui/src/shared/utils/loading-fallback.tsx @@ -0,0 +1,117 @@ +import React, { useEffect, useState } from 'react'; +import { Col, Container, Row } from 'react-bootstrap'; +import logo from '/public/logo.png'; + +interface DelayedRenderProps { + children: React.ReactNode; + loading?: { + minimumLoadingTime: number; + component: () => JSX.Element + } +} + +export const SplashScreen = () => { + const [dots, setDots] = useState(''); + + useEffect(() => { + const dotsInterval = setInterval(() => { + setDots(prev => prev.length >= 3 ? '' : prev + '.'); + }, 500); + + return () => clearInterval(dotsInterval); + }, []); + + return ( + <div className="splash-screen-overlay"> + <Container fluid className="h-100 d-flex align-items-center justify-content-center bg-bg-primary"> + <Row> + <Col className="text-center"> + <div className="loading-bounce mb-4"> + <img + src={logo} + alt="Logo" + className="img-fluid" + style={{ width: '120px', height: '120px', objectFit: 'contain' }} + /> + </div> + <div className="loading-text"> + <span className="h4 text-secondary">Loading</span> + <span className="h4 text-secondary dots-width">{dots}</span> + </div> + </Col> + </Row> + </Container> + + <style> + {` + .splash-screen-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: #f8f9fa; + z-index: 0; + display: flex; + align-items: center; + justify-content: center; + } + + .loading-bounce { + animation: bounce 1s infinite; + } + + @keyframes bounce { + 0%, 100% { + transform: translateY(0); + } + 50% { + transform: translateY(-20px); + } + } + + .loading-text { + display: flex; + justify-content: center; + align-items: center; + } + + .dots-width { + min-width: 24px; + text-align: left; + margin-left: 2px; + } + `} + </style> + </div> + ); +}; + +export const DelayedRender: React.FC<DelayedRenderProps> = ({ + children, + loading +}) => { + const [shouldRender, setShouldRender] = useState(false); + + useEffect(() => { + if (!loading) { + setShouldRender(true); + return; + } + + const timer = setTimeout(() => { + setShouldRender(true); + }, loading.minimumLoadingTime); + + return () => clearTimeout(timer); + }, [loading]); + + if (!shouldRender && loading) { + const LoadingComponent = loading.component; + return <LoadingComponent />; + } + + return <>{children}</>; +}; + +export default DelayedRender; \ No newline at end of file diff --git a/react-ui/src/shared/utils/routine.manager.ts b/react-ui/src/shared/utils/routine.manager.ts index ade07928976f5be714475325fceb2003ab6e75f0..1fee6723e7f36531f330160aadfc77d60ebfce82 100755 --- a/react-ui/src/shared/utils/routine.manager.ts +++ b/react-ui/src/shared/utils/routine.manager.ts @@ -1,67 +1,75 @@ +import { infoMessage, warnMessage } from '@helper/debug' import { QueryActionCreatorResult } from '@reduxjs/toolkit/query' +import { Category, CategoryType } from '@shared/types/category.type' type Routine = QueryActionCreatorResult<any> interface Entity { routine: Routine - id: number } -const initialState = { - routines: [] as Entity[], + +interface RoutineState { + routines: Record<CategoryType, Entity | null> +} + +const initalState: RoutineState = { + routines: { + DEVICE: null, + TABLE: null, + TAB: null + } } /** - * Routine manager is a singleton that holds all running routines. - * The redux store holds any persistable information about the routines. - * The routines objects itself are stored in the RoutineManager. - */ +* Routine manager is a singleton that holds all running routines. +* The redux store holds any persistable information about the routines. +* The routine objects itself are stored in the RoutineManager. +*/ export const RoutineManager = (() => { - const state = initialState - const add = (routine: Routine): number => { - const id = state.routines.length + let state = initalState - const newEntity: Entity = { + const add = (routine: Routine, category: CategoryType): boolean => { + const entity: Entity = { routine: routine, - id, } - state.routines = [...state.routines, newEntity] + state.routines = { + ...state.routines, + [category]: entity + } + infoMessage("Routine subscribed to category " + category) - return id + return true } const unsubscribeAll = () => { - state.routines.forEach(({ routine: subscription }) => { - _unsubscribe(subscription) - }) + Object.keys(state.routines) + .forEach((category) => { + unsubscribe(category as CategoryType) + }) - state.routines = initialState.routines + state = initalState } /** * @param id * @returns returns true if the routine was stopped, false if it was not found */ - const unsubscribe = (id: number): boolean => { - const routine = state.routines.find(({ id: routineId }) => routineId === id) + const unsubscribe = (category: CategoryType): boolean => { + const entity = state.routines[category] - if (routine) { - _unsubscribe(routine.routine) + if (entity) { + entity.routine.unsubscribe() + state.routines[category] = null + infoMessage("Routine unsubscribed from category " + category) } - return !!routine - } + if (!!entity) { + warnMessage("Desired routine to unsubscribe does not exist in category " + Category[category]) + } - /** - * Actual unsubscribe process. - * This process is extracted to have a single process of unsubscribing. - * - * @param subscription - */ - const _unsubscribe = (subscription: Routine) => { - subscription.unsubscribe() - // TODO remove from state + return !!entity } return { @@ -69,4 +77,4 @@ export const RoutineManager = (() => { unsubscribe, unsubscribeAll, } -})() +})() \ No newline at end of file diff --git a/react-ui/src/stores/persist.store.ts b/react-ui/src/stores/persist.store.ts index e12467ed9a3533da0cc1574e4fb9809e3858cb57..91d961cadc0283e2a530138096a7774e967ad6c0 100755 --- a/react-ui/src/stores/persist.store.ts +++ b/react-ui/src/stores/persist.store.ts @@ -1,4 +1,5 @@ import deviceReducer from '@component/devices/reducer/device.reducer' +import pluginReducer from '@component/devices/reducer/plugin.reducer' import jsonViewerReducer from '@shared/components/json_viewer/reducer/json_viewer.reducer' import routineReducer from '@shared/reducer/routine.reducer' import userReducer from '@shared/reducer/user.reducer' @@ -7,6 +8,8 @@ import { persistReducer } from 'redux-persist' import storage from 'redux-persist/es/storage' import { emptySplitApi } from './api.store' + + /** local storage config */ const rootPersistConfig = { key: 'root', @@ -19,6 +22,7 @@ const rootReducer = combineReducers({ device: deviceReducer, routine: routineReducer, json_viwer: jsonViewerReducer, + plugin: pluginReducer, [emptySplitApi.reducerPath]: emptySplitApi.reducer, }) diff --git a/react-ui/tsconfig.json b/react-ui/tsconfig.json index c679b7100669ddf234324cecde3dd37ab94c95d7..d40af31cce3f086a5b0b5c6870cfad85ce4d50a8 100755 --- a/react-ui/tsconfig.json +++ b/react-ui/tsconfig.json @@ -22,7 +22,6 @@ "baseUrl": ".", "paths": { - "@assets/*": ["assets/*"], "@api/*": ["src/shared/api/*"], "@reducer/*": ["src/stores/reducer/*"], "@provider/*": ["src/shared/provider/*"], diff --git a/react-ui/vite.config.mjs b/react-ui/vite.config.mjs index fc4ce4a01c9588f72d40aee0e7aeb16d002e068e..33fd69cc76fd094e53f168c6babdf0da367d897c 100755 --- a/react-ui/vite.config.mjs +++ b/react-ui/vite.config.mjs @@ -1,13 +1,34 @@ -import react from '@vitejs/plugin-react' -import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react'; +import { defineConfig } from 'vite'; export default defineConfig({ plugins: [react()], build: { - sourcemap: true, + sourcemap: false, + + rollupOptions: { + output: { + manualChunks: { + 'required': [ + 'bootstrap', 'react-bootstrap', + 'react', 'react-dom', 'react-router-dom', + 'redux', '@reduxjs/toolkit', 'react-redux', 'redux-observable', 'redux-persist', + 'i18next', 'react-i18next', + '@fortawesome/fontawesome-svg-core', + '@fortawesome/free-regular-svg-icons', + '@fortawesome/free-solid-svg-icons', + '@fortawesome/react-fontawesome' + ], + 'lazy': [ + 'react-toastify' + ] + } + } + } }, // develop server server: { + sourcemap: true, host: true, port: 3000, proxy: { @@ -36,7 +57,6 @@ export default defineConfig({ }, resolve: { alias: { - '@assets': '/assets', '@api': '/src/shared/api', '@reducer': '/src/stores/reducer', '@provider': '/src/shared/provider', diff --git a/react-ui/yarn.lock b/react-ui/yarn.lock index d054db6d6ed77067217fd0ca327f855376706356..5e4047ff1c1a76982bf2b4c0233b5da1adebda58 100755 --- a/react-ui/yarn.lock +++ b/react-ui/yarn.lock @@ -1486,6 +1486,13 @@ dependencies: prop-types "^15.8.1" +"@fullhuman/postcss-purgecss@^7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@fullhuman/postcss-purgecss/-/postcss-purgecss-7.0.2.tgz#ccacdbc312248c76c42cfac359f4ca5121001e67" + integrity sha512-U4zAXNaVztbDxO9EdcLp51F3UxxYsb/7DN89rFxFJhfk2Wua2pvw2Kf3HdspbPhW/wpHjSjsxWYoIlbTgRSjbQ== + dependencies: + purgecss "^7.0.2" + "@humanfs/core@^0.19.1": version "0.19.1" resolved "https://registry.yarnpkg.com/@humanfs/core/-/core-0.19.1.tgz#17c55ca7d426733fe3c561906b8173c336b40a77" @@ -2586,6 +2593,13 @@ resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.3.3.tgz#3654138d0da1b0c7916f6ed0dc1cc2b576d47650" integrity sha512-uTYkxTLkYp41nq/ULXyXMtkNT1vu5fXJoqad6uTNCOGat5t9cLgF4vMNLBXsTOXpdOI44XzKPY1M5RRm0bQHuw== +"@types/react-grid-layout@^1.3.5": + version "1.3.5" + resolved "https://registry.yarnpkg.com/@types/react-grid-layout/-/react-grid-layout-1.3.5.tgz#f4b52bf27775290ee0523214be0987be14e66823" + integrity sha512-WH/po1gcEcoR6y857yAnPGug+ZhkF4PaTUxgAbwfeSH/QOgVSakKHBXoPGad/sEznmkiaK3pqHk+etdWisoeBQ== + dependencies: + "@types/react" "*" + "@types/react-transition-group@^4.4.6": version "4.4.11" resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.4.11.tgz#d963253a611d757de01ebb241143b1017d5d63d5" @@ -3836,7 +3850,12 @@ cliui@^8.0.1: strip-ansi "^6.0.1" wrap-ansi "^7.0.0" -clsx@^2.1.0: +clsx@^1.1.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" + integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== + +clsx@^2.0.0, clsx@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.1.1.tgz#eed397c9fd8bd882bfb18deab7102049a2f32999" integrity sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA== @@ -3906,6 +3925,11 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" +commander@^12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3" + integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA== + commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -4061,6 +4085,11 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3, cross-spawn@^7.0.5: shebang-command "^2.0.0" which "^2.0.1" +crypto-js@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.2.0.tgz#4d931639ecdfd12ff80e8186dba6af2c2e856631" + integrity sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q== + crypto-random-string@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" @@ -5334,6 +5363,11 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== +fast-equals@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/fast-equals/-/fast-equals-4.0.3.tgz#72884cc805ec3c6679b99875f6b7654f39f0e8c7" + integrity sha512-G3BSX9cfKttjr+2o1O22tYMLq0DPluZnYtq1rXumE1SpL/F/SLIfHx08WYQoWSIpeMYf8sRbJ8++71+v6Pnxfg== + fast-glob@^3.2.9, fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" @@ -5690,6 +5724,18 @@ glob@^10.3.10: package-json-from-dist "^1.0.0" path-scurry "^1.11.1" +glob@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-11.0.0.tgz#6031df0d7b65eaa1ccb9b29b5ced16cea658e77e" + integrity sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g== + dependencies: + foreground-child "^3.1.0" + jackspeak "^4.0.1" + minimatch "^10.0.0" + minipass "^7.1.2" + package-json-from-dist "^1.0.0" + path-scurry "^2.0.0" + glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" @@ -6469,6 +6515,13 @@ jackspeak@^3.1.2: optionalDependencies: "@pkgjs/parseargs" "^0.11.0" +jackspeak@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-4.0.2.tgz#11f9468a3730c6ff6f56823a820d7e3be9bef015" + integrity sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw== + dependencies: + "@isaacs/cliui" "^8.0.2" + jake@^10.8.5: version "10.9.2" resolved "https://registry.yarnpkg.com/jake/-/jake-10.9.2.tgz#6ae487e6a69afec3a5e167628996b59f35ae2b7f" @@ -7277,6 +7330,11 @@ lru-cache@^10.2.0: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== +lru-cache@^11.0.0: + version "11.0.2" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-11.0.2.tgz#fbd8e7cf8211f5e7e5d91905c415a3f55755ca39" + integrity sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA== + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -7407,6 +7465,13 @@ minimalistic-assert@^1.0.0: resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== +minimatch@^10.0.0: + version "10.0.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-10.0.1.tgz#ce0521856b453c86e25f2c4c0d03e6ff7ddc440b" + integrity sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ== + dependencies: + brace-expansion "^2.0.1" + minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -7923,6 +7988,14 @@ path-scurry@^1.11.1: lru-cache "^10.2.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" +path-scurry@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-2.0.0.tgz#9f052289f23ad8bf9397a2a0425e7b8615c58580" + integrity sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg== + dependencies: + lru-cache "^11.0.0" + minipass "^7.1.2" + path-to-regexp@0.1.12: version "0.1.12" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.12.tgz#d5e1a12e478a976d432ef3c58d534b9923164bb7" @@ -8624,7 +8697,7 @@ prop-types-extra@^1.1.0: react-is "^16.3.2" warning "^4.0.0" -prop-types@^15.6.2, prop-types@^15.8.1: +prop-types@15.x, prop-types@^15.6.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -8653,6 +8726,16 @@ punycode@^2.1.0, punycode@^2.1.1, punycode@^2.3.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== +purgecss@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/purgecss/-/purgecss-7.0.2.tgz#b7dccc3ead65a4301eed98e014793719a511c633" + integrity sha512-4Ku8KoxNhOWi9X1XJ73XY5fv+I+hhTRedKpGs/2gaBKU8ijUiIKF/uyyIyh7Wo713bELSICF5/NswjcuOqYouQ== + dependencies: + commander "^12.1.0" + glob "^11.0.0" + postcss "^8.4.47" + postcss-selector-parser "^6.1.2" + q@^1.1.2: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -8772,6 +8855,14 @@ react-dom@^18.3.1: loose-envify "^1.1.0" scheduler "^0.23.2" +react-draggable@^4.0.3, react-draggable@^4.4.5: + version "4.4.6" + resolved "https://registry.yarnpkg.com/react-draggable/-/react-draggable-4.4.6.tgz#63343ee945770881ca1256a5b6fa5c9f5983fe1e" + integrity sha512-LtY5Xw1zTPqHkVmtM3X8MUOxNDOUhv/khTgBgrUvwaS064bwVvxT+q5El0uUFNx5IEPKXuRejr7UqLwBIg5pdw== + dependencies: + clsx "^1.1.1" + prop-types "^15.8.1" + react-error-boundary@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/react-error-boundary/-/react-error-boundary-4.1.2.tgz#bc750ad962edb8b135d6ae922c046051eb58f289" @@ -8784,6 +8875,23 @@ react-error-overlay@^6.0.11: resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.11.tgz#92835de5841c5cf08ba00ddd2d677b6d17ff9adb" integrity sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg== +react-grid-layout@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/react-grid-layout/-/react-grid-layout-1.5.0.tgz#b6cc9412b58cf8226aebc0df7673d6fa782bdee2" + integrity sha512-WBKX7w/LsTfI99WskSu6nX2nbJAUD7GD6nIXcwYLyPpnslojtmql2oD3I2g5C3AK8hrxIarYT8awhuDIp7iQ5w== + dependencies: + clsx "^2.0.0" + fast-equals "^4.0.3" + prop-types "^15.8.1" + react-draggable "^4.4.5" + react-resizable "^3.0.5" + resize-observer-polyfill "^1.5.1" + +react-hook-form@^7.54.2: + version "7.54.2" + resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-7.54.2.tgz#8c26ed54c71628dff57ccd3c074b1dd377cfb211" + integrity sha512-eHpAUgUjWbZocoQYUHposymRb4ZP6d0uwUnooL2uOybA9/3tPUvoAKqEWK1WaSiTxxOfTpffNZP7QwlnM3/gEg== + react-i18next@^15.0.0: version "15.1.4" resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-15.1.4.tgz#65c03c31a5e42202000652e163f22f23a9306a60" @@ -8812,6 +8920,11 @@ react-lifecycles-compat@^3.0.4: resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== +react-loading-skeleton@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/react-loading-skeleton/-/react-loading-skeleton-3.5.0.tgz#da2090355b4dedcad5c53cb3f0ed364e3a76d6ca" + integrity sha512-gxxSyLbrEAdXTKgfbpBEFZCO/P153DnqSCQau2+o6lNy1jgMRr2MmRmOzMmyrwSaSYLRB8g7b0waYPmUjz7IhQ== + react-redux@^9.1.2: version "9.2.0" resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-9.2.0.tgz#96c3ab23fb9a3af2cb4654be4b51c989e32366f5" @@ -8830,6 +8943,14 @@ react-refresh@^0.14.2: resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.2.tgz#3833da01ce32da470f1f936b9d477da5c7028bf9" integrity sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA== +react-resizable@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/react-resizable/-/react-resizable-3.0.5.tgz#362721f2efbd094976f1780ae13f1ad7739786c1" + integrity sha512-vKpeHhI5OZvYn82kXOs1bC8aOXktGU5AmKAgaZS4F5JPburCtbmDPqE7Pzp+1kN4+Wb81LlF33VpGwWwtXem+w== + dependencies: + prop-types "15.x" + react-draggable "^4.0.3" + react-router-dom@^6.23.1: version "6.28.0" resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.28.0.tgz#f73ebb3490e59ac9f299377062ad1d10a9f579e6" @@ -9123,6 +9244,11 @@ reselect@^5.1.0: resolved "https://registry.yarnpkg.com/reselect/-/reselect-5.1.1.tgz#c766b1eb5d558291e5e550298adb0becc24bb72e" integrity sha512-K/BG6eIky/SBpzfHZv/dd+9JBFiS4SWV7FIujVyJRux6e45+73RaUHXLmIR1f7WOMaQ0U1km6qwklRQxpJJY0w== +resize-observer-polyfill@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464" + integrity sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg== + resolve-cwd@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" diff --git a/renovate.json b/renovate.json old mode 100644 new mode 100755