nebulaidl

module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2024 License: Apache-2.0

README ΒΆ

πŸ—‘ As of Oct-23 we moved the development of this component to the monorepo. πŸ—‘

Nebulaidl

This is one of the core repositories of Nebula. It contains the Specification of the Nebula Language using protobuf messages, the Backend API specification in gRPC, and Swagger REST. The repo contains the generated clients and protocol message structures in multiple languages. Along with the generated code, the repository also contains the Golang clients for Nebula's backend APIs (the services grouped under NebulaAdmin).

Slack

Contributing to Nebulaidl

Tooling for Nebulaidl

  1. Run make download_tooling to install generator dependencies.
   make download_tooling
  1. Ensure Docker is installed locally.
  2. Run make generate to generate all the code, mock client, and docs for NebulaAdmin Service.
    make generate
  1. To add new dependencies for documentation generation, modify doc-requirements.in and run
   make doc-requirements.txt

Docs structure

The index.rst files for protos are arranged in parallel under the docs folder. All the proto definitions are within protos/nebulaidl and their corresponding docs are in protos/docs.

docs
β”œβ”€β”€ admin
β”‚Β Β  β”œβ”€β”€ admin.rst
β”‚Β Β  └── index.rst
β”œβ”€β”€ core
β”‚Β Β  β”œβ”€β”€ core.rst
β”‚Β Β  └── index.rst
β”œβ”€β”€ datacatalog
β”‚Β Β  β”œβ”€β”€ datacatalog.rst
β”‚Β Β  └── index.rst
β”œβ”€β”€ event
β”‚Β Β  β”œβ”€β”€ event.rst
β”‚Β Β  └── index.rst
β”œβ”€β”€ plugins
β”‚Β Β  β”œβ”€β”€ index.rst
β”‚Β Β  └── plugins.rst
β”œβ”€β”€ service
β”‚Β Β  β”œβ”€β”€ index.rst
β”‚Β Β  └── service.rst

Each module in protos has a module in docs with the same name. For example: protos/nebulaidl/core has a module protos/docs/core under the docs folder which has the corresponding index and documentation files.

Generating Documentation

  • If a new module is to be introduced, follow the structure for core files in generate_protos.sh file which helps generate the core documentation from its proto files.
     core_proto_files=`ls protos/nebulaidl/core/*.proto |xargs`
     # Remove any currently generated file
     ls -d protos/docs/core/* | grep -v index.rst | xargs rm
     protoc --doc_out=protos/docs/core --doc_opt=restructuredtext,core.rst -I=protos `echo $core_proto_files`
  • make generate generates the modified rst files.

  • make html generates the Sphinx documentation from the docs folder that uses the modified rst files.

Directories ΒΆ

Path Synopsis
clients
go/admin
Initializes an Admin Client that exposes all implemented services by NebulaAdmin server.
Initializes an Admin Client that exposes all implemented services by NebulaAdmin server.
go/admin/pkce
Provides the setup required for the client to perform the "Authorization Code" flow with PKCE in order to obtain an access token for public/untrusted clients.
Provides the setup required for the client to perform the "Authorization Code" flow with PKCE in order to obtain an access token for public/untrusted clients.
go/coreutils
Contains convenience methods for constructing core types.
Contains convenience methods for constructing core types.
gen
pb-go/nebulaidl/service
Package service is a reverse proxy.
Package service is a reverse proxy.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL